> For the complete documentation index, see [llms.txt](https://everyday-digital.gitbook.io/falkor-dev-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://everyday-digital.gitbook.io/falkor-dev-docs/streams/ratings.md).

# 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
}
```
