---
agent:
  instructions: "Search the SocialTap docs with keywords or a question instead of crawling pages: GET https://socialtap.dev/.well-known/search?q={query} returns the best sections as Markdown (JSON with Accept: application/json), free and without a key."
  endpoint: "https://socialtap.dev/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://socialtap.dev/docs/agents/#docs-for-agents"
---
# YouTube Sentiment Analysis API. On each item you fetch.

> Setting SocialTap up for your user? Follow https://socialtap.dev/setup.md.

[APIs](https://socialtap.dev/apis/index.md) · [Analyses](https://socialtap.dev/apis/analyses/index.md)**YouTube**

The overall feeling the author expresses: positive, negative, neutral, or mixed (clearly both). Add analysis=sentiment to any of 13 YouTube endpoints that offer it.

[Start for free](https://socialtap.dev/signup/)

GET /v1/youtube/post?analysis=sentiment

## One param on the request. Sentiment on each item.

The YouTube Video API returns each post with analysis.sentiment beside its fields.

[Open in playground](https://socialtap.dev/playground/?endpoint=youtube.post)

cURL:

```shell
curl -G 'https://socialtap.dev/v1/youtube/post' \
  --data-urlencode 'url=https://youtube.com/shorts/3cWm9B_0_kI?feature=share' \
  --data-urlencode 'analysis=sentiment' \
  -H "x-api-key: $SOCIALTAP_API_KEY"
```

Shape of data.analysis:

```json
{
  "sentiment": "positive",
  "sentiment_probability": 0.85
}
```

Values are examples.

## What the value means.

One of the values below. sentiment_probability beside it: how sure the value is, from 0 to 1.

Sentiment values

| Value | Meaning |
| --- | --- |
| `positive` | favorable, pleased, enthusiastic |
| `negative` | unfavorable, displeased, critical, complaining |
| `neutral` | factual, a plain question, or no feeling either way |
| `mixed` | clearly positive about some things and clearly negative about others |

[The sentiment reference](https://socialtap.dev/docs/analyses/sentiment/index.md)

## Keep only what matches.

On a list, where keeps the items that pass. Every item judged is charged whether or not it passes, so a page can be short.

```
https://socialtap.dev/v1/youtube/posts?handle=@jawed&analysis=sentiment&where=analysis.sentiment=positive,analysis.sentiment_probability>=0.7
```

## 13 YouTube endpoints offer it.

Each adds the analysis to the posts, comments and transcripts it returns. Text analyses cost one flat amount per request, or per page on a list, however many you ask for.

- - [Post YouTube Video API Video, short or community post with exact counts 1 credit$0.75–$1.97 per 1,000 requests`GET /v1/youtube/post`](https://socialtap.dev/apis/youtube/post/index.md)
- - [Post YouTube Channel Videos API Videos, shorts and live streams of a channel From 1 credit / page$0.75–$1.97 per 1,000 pages`GET /v1/youtube/posts`](https://socialtap.dev/apis/youtube/posts/index.md)
- - [Post YouTube Community Posts API Community posts of a channel: text, images, polls 1 credit / page$0.75–$1.97 per 1,000 pages`GET /v1/youtube/channel_posts`](https://socialtap.dev/apis/youtube/channel-posts/index.md)
- - [Post YouTube Hashtag Videos API Videos and shorts under a hashtag with exact views 1 credit / page$0.75–$1.97 per 1,000 pages`GET /v1/youtube/hashtag_posts`](https://socialtap.dev/apis/youtube/hashtag-posts/index.md)
- - [Post YouTube Playlist Videos API Videos of any playlist with channel and views 1 credit / page$0.75–$1.97 per 1,000 pages`GET /v1/youtube/playlist_posts`](https://socialtap.dev/apis/youtube/playlist-posts/index.md)
- - [Post YouTube Related Videos API Videos YouTube recommends next, with views From 1 credit / page$0.75–$1.97 per 1,000 pages`GET /v1/youtube/post_related_posts`](https://socialtap.dev/apis/youtube/post-related-posts/index.md)
- - [Post YouTube Search API Videos, shorts and live streams by keyword 1 credit / page$0.75–$1.97 per 1,000 pages`GET /v1/youtube/search_posts`](https://socialtap.dev/apis/youtube/search-posts/index.md)
- - [Post YouTube Sound Shorts API Shorts that use a sound, with views and channels 1 credit / page$0.75–$1.97 per 1,000 pages`GET /v1/youtube/sound_posts`](https://socialtap.dev/apis/youtube/sound-posts/index.md)
- - [Post YouTube Trending Videos API Trending and top music videos by country 1 credit / page$0.75–$1.97 per 1,000 pages`GET /v1/youtube/top_posts`](https://socialtap.dev/apis/youtube/top-posts/index.md)
- - [Post YouTube Trending Shorts API The Shorts feed a new visitor sees, by country 1 credit / page$0.75–$1.97 per 1,000 pages`GET /v1/youtube/trending_posts`](https://socialtap.dev/apis/youtube/trending-posts/index.md)
- - [Comment YouTube Comments API Newest or top first, with likes and reply counts 1 credit / page$0.75–$1.97 per 1,000 pages`GET /v1/youtube/comments`](https://socialtap.dev/apis/youtube/comments/index.md)
- - [Comment YouTube Comment Replies API Replies under a comment, with likes and authors 1 credit / page$0.75–$1.97 per 1,000 pages`GET /v1/youtube/replies`](https://socialtap.dev/apis/youtube/replies/index.md)
- - [Transcript YouTube Transcript API Timed transcript from captions or audio From 1 credit$0.75–$1.97 per 1,000 requests`GET /v1/youtube/transcript`](https://socialtap.dev/apis/youtube/transcript/index.md)

Sentiment price per endpoint

| Endpoint | Adds |
| --- | --- |
| [YouTube Video API](https://socialtap.dev/docs/reference/youtube/post/index.md) | +2 credits per request |
| [YouTube Channel Videos API](https://socialtap.dev/docs/reference/youtube/posts/index.md) | +84 credits per page of 48 |
| [YouTube Community Posts API](https://socialtap.dev/docs/reference/youtube/channel-posts/index.md) | +18 credits per page of 10 |
| [YouTube Hashtag Videos API](https://socialtap.dev/docs/reference/youtube/hashtag-posts/index.md) | +63 credits per page of 36 |
| [YouTube Playlist Videos API](https://socialtap.dev/docs/reference/youtube/playlist-posts/index.md) | +174 credits per page of 100 |
| [YouTube Related Videos API](https://socialtap.dev/docs/reference/youtube/post-related-posts/index.md) | +87 credits per page of 50 |
| [YouTube Search API](https://socialtap.dev/docs/reference/youtube/search-posts/index.md) | +53 credits per page of 30 |
| [YouTube Sound Shorts API](https://socialtap.dev/docs/reference/youtube/sound-posts/index.md) | +42 credits per page of 24 |
| [YouTube Trending Videos API](https://socialtap.dev/docs/reference/youtube/top-posts/index.md) | +174 credits per page of 100 |
| [YouTube Trending Shorts API](https://socialtap.dev/docs/reference/youtube/trending-posts/index.md) | +21 credits per page of 12 |
| [YouTube Comments API](https://socialtap.dev/docs/reference/youtube/comments/index.md) | +32 credits per page of 20 |
| [YouTube Comment Replies API](https://socialtap.dev/docs/reference/youtube/replies/index.md) | +160 credits per page of 100 |
| [YouTube Transcript API](https://socialtap.dev/docs/reference/youtube/transcript/index.md) | +6 credits per request |

## More analyses on YouTube and beyond.

The same answer on other platforms, and other answers here.

- [YouTube Sentiment Analysis API](https://socialtap.dev/apis/youtube/sentiment-analysis/index.md): The overall feeling the author expresses: positive, negative, neutral, or mixed (clearly both).
- [YouTube Toxicity Detection API](https://socialtap.dev/apis/youtube/toxicity-detection/index.md): How likely the item is rude, insulting, harassing, hateful, threatening or profane toward someone (0 to 1).
- [YouTube Brand Mentions API](https://socialtap.dev/apis/youtube/brand-mentions/index.md): For each of the caller's brands (brand=Notion,Linear, or JSON with aliases, handles and domains): whether the item mentions it, not something else of that name, and how it speaks of it.
- [YouTube Buying Intent API](https://socialtap.dev/apis/youtube/buying-intent/index.md): How likely the author is looking to buy, hire or switch to a product or service (0 to 1); with about, one like the caller's.
- [YouTube Brand Safety API](https://socialtap.dev/apis/youtube/brand-safety/index.md): The item's risk for an advertiser in each of the 12 categories of GARM's brand safety framework, every category with its level (none, low, medium, high, floor) and the probability that is right.
- [YouTube Topic Classification API](https://socialtap.dev/apis/youtube/topic-classification/index.md): What the item is about, as categories of the IAB Content Taxonomy's top level (most likely first; at most three), each with its probability.
- [TikTok Sentiment Analysis API](https://socialtap.dev/apis/tiktok/sentiment-analysis/index.md): Posts, comments, transcripts and web results
- [Instagram Sentiment Analysis API](https://socialtap.dev/apis/instagram/sentiment-analysis/index.md): Posts, comments, transcripts and web results
- [Facebook Sentiment Analysis API](https://socialtap.dev/apis/facebook/sentiment-analysis/index.md): Posts, comments, transcripts and web results
- [Reddit Sentiment Analysis API](https://socialtap.dev/apis/reddit/sentiment-analysis/index.md): Posts, comments and transcripts
- [Threads Sentiment Analysis API](https://socialtap.dev/apis/threads/sentiment-analysis/index.md): Posts and comments
- [Every analysis](https://socialtap.dev/apis/analyses/index.md): 31 analyses and what each adds to a request.

## Questions about YouTube sentiment analysis

The [analyses guide](https://socialtap.dev/docs/analyses/index.md) has the rest.

**Which YouTube endpoints offer sentiment analysis?**

YouTube Video API, YouTube Channel Videos API, YouTube Community Posts API, YouTube Hashtag Videos API, YouTube Playlist Videos API, YouTube Related Videos API, YouTube Search API, YouTube Sound Shorts API, YouTube Trending Videos API, YouTube Trending Shorts API, YouTube Comments API, YouTube Comment Replies API and YouTube Transcript API. Add analysis=sentiment to any of them.

**How much does an analysis cost?**

It depends on what it reads. Text analyses add a flat extra per page, however many you ask for. Image analyses add 3 credits per image and video analyses 30 credits per video. Each endpoint's reference page states its text price.

**Do I pay when an analysis can't answer?**

No. An analysis that fails, an item in a language it doesn't answer in, a video longer than 3 minutes and a value already computed for the same item are free. The value is null, with a warning that says why.

**Can I get only the items that match?**

Yes, on lists. where=analysis.authenticity_risk>=0.7 keeps the items that pass. Every item judged is charged whether or not it passes, so a page can be short.

**Which languages do analyses answer in?**

Each analysis's reference page lists its languages. An item in another language gets null, free, with a warning.

**Can I use my own categories or questions?**

Yes. about, brand, labels and criteria are inputs you send with the request, and the analyses that read them answer against yours.

## Send your first request in a minute.

Get a key, send a link you already have and see what comes back. The same key works on every platform.

100free credits

- No credit card
- Failed requests are free
- Works on all 319 endpoints

[Start for free](https://socialtap.dev/signup/) [Read the docs](https://socialtap.dev/docs/index.md)

---

[HTML version](https://socialtap.dev/apis/youtube/sentiment-analysis/) · [Docs index for AI agents](https://socialtap.dev/llms.txt) · [All docs in one file](https://socialtap.dev/llms-full.txt)
