# YouTube scraper API for transcripts, comments, videos and channels

> Get a public video’s transcript as timed segments, its comments, its metadata and chapters, plus search results and channel pages. Structured JSON from one key, with no Google Cloud project and no Data API quota.

Canonical page: https://scrapercompany.com/youtube-api. Endpoints and prices checked against the API on 2026-10-11.

YouTube transcripts feed AI and RAG pipelines, summaries, search indexes and content research. Comments, counts and channel pages feed creator analytics and brand monitoring. Google’s official YouTube Data API needs a Google Cloud project, counts every call against a daily quota, and only downloads caption tracks for videos you have permission to edit, so it cannot return the transcript of someone else’s video. This API reads public YouTube pages instead.

Ask for a transcript and you get every caption language the video has, each marked as creator-made or auto-generated, and one track as timed segments plus the joined text. Creator captions are chosen over auto-generated ones when both exist. YouTube rounds most numbers it shows (“1.7M views”), so counts are integers only where YouTube printed them exactly, and the text is always kept. Search answers are split into videos, Shorts, channels and playlists, with YouTube’s own filters for type, upload date, length and features.

## What you get

- `segments[]`: the transcript as timed lines: start_s, duration_s and text
- `text`: the whole transcript joined into one string, ready for search or an LLM
- `available_languages[]`: every caption track the video has: language, name, and manual or auto-generated (asr)
- `views, likes, length_seconds`: exact view and like counts and the video length (video endpoint)
- `chapters[]`: chapter titles and start times, and whether the creator or YouTube made them
- `comments[]`: text, author, likes, reply count, and pinned and creator-heart flags
- `videos[], shorts[], channels[], playlists[]`: search results, split by kind
- `subscribers_text, video_count_text`: a channel’s counts as YouTube prints them, with its latest videos

## Endpoints and price per call

| Endpoint | Method and path | What it returns | Credits per successful call | Price per call |
| --- | --- | --- | --- | --- |
| [Transcript](https://scrapercompany.com/docs/reference/youtube-transcript) | `POST /v1/youtube/transcript` | One caption track as timed segments and full text, with every language the video has | 2 credits | $0.0020 on Starter, $0.0012 on Growth, $0.0008 on Scale |
| [Search](https://scrapercompany.com/docs/reference/youtube-search) | `POST /v1/youtube/search` | One page of results split into videos, Shorts, channels and playlists, with YouTube’s filters | 2 credits | $0.0020 on Starter, $0.0012 on Growth, $0.0008 on Scale |
| [Video details](https://scrapercompany.com/docs/reference/youtube-video) | `POST /v1/youtube/video` | Title, full description, exact views and likes, dates, keywords and chapters | 2 credits | $0.0020 on Starter, $0.0012 on Growth, $0.0008 on Scale |
| [Comments](https://scrapercompany.com/docs/reference/youtube-comments) | `POST /v1/youtube/comments` | One page of about 20 comment threads, top or newest, and their replies | 2 credits | $0.0020 on Starter, $0.0012 on Growth, $0.0008 on Scale |
| [Channel](https://scrapercompany.com/docs/reference/youtube-channel) | `POST /v1/youtube/channel` | A channel’s details and its latest videos, about 30 per page | 2 credits | $0.0020 on Starter, $0.0012 on Growth, $0.0008 on Scale |

Pricing: Free $0/month for 1,000 credits; Starter $49/month for 50,000 credits; Growth $149/month for 250,000 credits; Scale $399/month for 1,000,000 credits. Failed requests (4xx or 5xx) and empty results cost 0 credits. Free during the beta. https://scrapercompany.com/pricing

## Example

`POST /v1/youtube/transcript`, 2 credits per successful call.

```bash
curl -X POST "https://api.scrapercompany.com/v1/youtube/transcript" \
  -H "x-api-key: $SCRAPERCOMPANY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "video_id": "8jPQjjsBbIc"
  }'
```

Response (trimmed):

```json
{
  "search_parameters": {
    "engine": "youtube_transcripts",
    "video_id": "8jPQjjsBbIc",
    "hl": "en",
    "gl": "US"
  },
  "video": {
    "video_id": "8jPQjjsBbIc",
    "title": "How to stay calm when you know you'll be stressed | Daniel Levitin | TED",
    "channel_id": "UCAuUUnT6oDeKwE6v1NGQxug",
    "author": "TED",
    "length_seconds": 740
  },
  "language": {
    "code": "en",
    "name": "English",
    "kind": "manual",
    "translatable": true,
    "is_default": true
  },
  "available_languages": [
    {
      "code": "ar",
      "name": "Arabic",
      "kind": "manual",
      "translatable": true,
      "is_default": false
    },
    {
      "code": "en",
      "name": "English",
      "kind": "manual",
      "translatable": true,
      "is_default": true
    }
  ],
  "segments": [
    {
      "start_s": 13.24,
      "duration_s": 2.56,
      "text": "A few years ago, I broke into my own house."
    },
    {
      "start_s": 16.88,
      "duration_s": 1.216,
      "text": "I had just driven home,"
    }
  ],
  "text": "A few years ago, I broke into my own house. I had just driven home, it was around midnight in the dead of Montreal winter,",
  "meta": {
    "source": "youtube",
    "client": "IOS",
    "wire_bytes": 141794,
    "elapsed_s": 0.44
  }
}
```

## FAQ

### Does YouTube have an official API?

Yes. The YouTube Data API v3 is Google’s official API. It needs a Google Cloud project, counts every request against a daily quota, and its caption download method only works for videos you have permission to edit, so it does not return transcripts of other channels’ videos. This API is independent of YouTube and Google: it reads public YouTube pages and uses no Data API quota.

### Can this YouTube transcript API get any video’s transcript?

Any public video that has captions, whether the creator uploaded them or YouTube generated them automatically. Pass the video id or URL, and optionally a lang code; available_languages lists every track and whether it is manual or auto-generated (asr). A video without captions, or without a track in the language you ask for, returns a 404 and is not charged. Age-restricted videos have no transcript through this API.

### Can the API translate a transcript?

No. It returns the caption tracks a video actually has, in their own languages, and does not request YouTube’s machine translations. Pick a track with lang from the codes in available_languages.

### Why are some counts null?

YouTube rounds most counts on search results, channel grids and comments (“1.7M views”, “14K”). The API returns an integer only when YouTube printed the exact number, and always keeps the text in fields such as views_text and likes_text. The video endpoint returns exact views and likes.

### How do I page through search results, comments and channel videos?

Each response includes next_page_token; send it back to get the next page. A comment’s replies_page_token returns its replies through the same comments endpoint. An empty page is not charged.

### Do failed requests cost credits?

No. A failed or blocked call (any 4xx or 5xx response) costs 0 credits, and so does a search page that comes back empty. You pay only for successful results.

### How do I get an API key?

Create an account on the sign-up page. Public sign-up is invite-only during the beta, so join the waitlist there and we will email you when your account is ready. The Free plan includes 1,000 credits a month, and the API is free while it is in beta. You create and rotate keys yourself in the dashboard.

## Read next

- [Transcript reference](https://scrapercompany.com/docs/reference/youtube-transcript)
- [Comments reference](https://scrapercompany.com/docs/reference/youtube-comments)
- [Video details reference](https://scrapercompany.com/docs/reference/youtube-video)
- [All APIs](https://scrapercompany.com/apis.md)
