# Ratings

The Stream Ratings endpoint retrieves user ratings on streams and episodes.

## Parameters <a href="#parameters" id="parameters"></a>

The items parameter allows you to filter items based on the name or ID of the item. If the item parameter is not provided the endpoint will return the latest 50 items.

<table><thead><tr><th width="194"></th><th></th></tr></thead><tbody><tr><td><strong>Key</strong></td><td><strong>Value</strong></td></tr><tr><td><strong>items</strong></td><td><strong>Array of Strings</strong> <br>Item name or ID</td></tr></tbody></table>

## Examples

### Get Ratings For The Latest Streams

The example below retrieves user ratings for the latest streams.

```
curl -X POST \
  v1/logs/stream-ratings \
  -H 'Authorization: Basic <Your Base64 Encoded Token>'
```

### Get Ratings For A Single Stream

The example below retrieves user ratings for a single stream.

```
curl -X POST \
  v1/logs/stream-ratings \
  -H 'Authorization: Basic <Your Base64 Encoded Token>'\
  -d '{
    "items" : ["Reply All"]
  }'

```

## Success Response

A successful response will return an array of items with each item containing a `stream` and corresponding `ratings` data.&#x20;

### Rating Item

|              |                                                    |
| ------------ | -------------------------------------------------- |
| **Key**      | **Type**                                           |
| **stream**   | Object. The overall likes and dislikes of a stream |
| **episodes** | Array of episodes                                  |

### Episode Item

|             |                                                  |
| ----------- | ------------------------------------------------ |
| **Key**     | **Type**                                         |
| **name**    | String                                           |
| **type**    | String. audio, podcast, video or youtube         |
| **views**   | Int. The number of times the episode was viewed. |
| **icon**    | String. The episode icon URL                     |
| **reviews** | Object. The episode likes and dislikes.          |

```
{
    "status": "success",
    "data": [
        {
            "stream": {
                "name": "In a Nutshell",
                "type": "youtube",
                "ID": "EV26-ZTMD-21CV"
            },
            "ratings": {
                "stream": {
                    "total": 12,
                    "dislikes": 1,
                    "likes": 11
                },
                "episodes": [
                    {
                        "name": "The Most Dangerous Stuff in the Universe - Strange Stars Explain",
                        "type": "youtube",
                        "views": 11,
                        "icon": "<url of episode icon>",
                        "reviews": {
                            "likes": 10,
                            "dislikes": 1,
                            "total": 11
                        }
                    },
                    {
                        "name": "Building a Marsbase is a Horrible Idea: Let’s do it!",
                        "type": "youtube",
                        "views": 2,
                        "icon": "<url of episode icon>",
                        "reviews": {
                            "likes": 1,
                            "dislikes": 0,
                            "total": 1
                        }
                    },
                    ..etc
                ]
            }
        },
        ...etc
    ],
    "hash": "15b8fbb27e89a26102ef15de0b21e2d0",
    "response_time": 0.15944385528564453
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://everyday-digital.gitbook.io/falkor-dev-docs/streams/ratings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
