# YouTube API

> Search videos and channels, get a video whole, its transcript line by line and its comments, then list everything a channel has published. JSON with the same fields every time, from your code or your agent.

7 operations, 1 credit a call, one API key. The page for people: https://www.lobstr.io/store/youtube

## Operations

### Search videos: `youtube/videos/search`

One page of a YouTube search, about 20 videos in the order youtube.com shows them, each with its channel, views, duration, date, badges, chapters and thumbnails.

1 credit a call, 20 videos a page. Its page: https://www.lobstr.io/store/youtube/videos/search. Every option, field and error: https://api.lobstr.io/v2/catalog/youtube/videos/search.md

| Option | Takes | Default | What it is |
| --- | --- | --- | --- |
| `query` (required) | string |  | Words to search for, as typed in YouTube's search box. |
| `type` | all, videos, shorts | `all` | What the search finds: all, the search's own mix of videos and shorts (the shorts among the results say is_short); videos, videos only; shorts, shorts only. |
| `upload_date` | any, today, this_week, this_month, this_year | `any` | How recently the videos were uploaded, as the panel's "Upload date" filter. |
| `duration` | any, under_3_minutes, 3_to_20_minutes, over_20_minutes | `any` | The videos' length, as the panel's "Duration" filter. |
| `features` | array |  | What the videos must have, all of them, as the panel's "Features": live (live now), 4k, hd, subtitles (subtitles or closed captions), creative_commons (under a Creative Commons licence), 360 (360°), vr180, 3d, hdr, location (with a place), purchased (bought by the visitor: signed out, none). |
| `sort` | relevance, popularity | `relevance` | The order of the videos: relevance, YouTube's own search order; popularity, YouTube's ranking of the most popular, not views alone. |
| `language` | string | `en` | The language YouTube speaks to the visitor (en, fr, de, es, pt-BR, ja...): the texts of the records, dates, counts and badges, are written in it ("11 months ago", "il y a 11 mois"); the counts are read in it. |
| `country` | string | `US` | The visitor's country, two letters (US, GB, FR, IN...), whose people YouTube searches for. |

### Get a video: `youtube/videos/get`

One YouTube video whole: its title, description and links, views, likes, comments count, dates, channel, chapters, the moments viewers replay most, its storyboards, captions, audio tracks and renditions.

1 credit a call. Its page: https://www.lobstr.io/store/youtube/videos/get. Every option, field and error: https://api.lobstr.io/v2/catalog/youtube/videos/get.md

| Option | Takes | Default | What it is |
| --- | --- | --- | --- |
| `video` (required) | string |  | The video: its id (11 letters, digits, - or _) or any of its links (youtube.com/watch?v=..., youtu.be/..., /shorts/..., /live/..., /embed/..., m.youtube.com, music.youtube.com). |

### Get a video's transcript: `youtube/transcripts/get`

The transcript of a YouTube video, line by line with when each is said, by chapter, and its whole text: as the video's "Show transcript" panel gives it.

1 credit a call. Its page: https://www.lobstr.io/store/youtube/transcripts/get. Every option, field and error: https://api.lobstr.io/v2/catalog/youtube/transcripts/get.md

| Option | Takes | Default | What it is |
| --- | --- | --- | --- |
| `video` (required) | string |  | The video: its id (11 letters, digits, - or _) or any of its links (youtube.com/watch?v=..., youtu.be/..., /shorts/..., /live/..., /embed/...). |

### List a video's comments: `youtube/comments/list`

One page of a YouTube video's comments, 20 at a time, top or newest first, each with its author, likes, replies and date; or the replies to one comment.

1 credit a call, 20 comments a page. Its page: https://www.lobstr.io/store/youtube/comments/list. Every option, field and error: https://api.lobstr.io/v2/catalog/youtube/comments/list.md

| Option | Takes | Default | What it is |
| --- | --- | --- | --- |
| `video` (required) | string |  | The video: its id (11 letters, digits, - or _) or any of its links (youtube.com/watch?v=..., youtu.be/..., /shorts/..., /live/..., /embed/...). |
| `comment` | string |  | A comment of the video, to list its replies (10 a page, oldest first) instead of the video's comments: its id (id of a record, Ug...) or its link (watch?v=...&lc=Ug...). |
| `sort` | top, newest | `top` | The order of the video's comments, as its sort menu: top, YouTube's own order of the most relevant (the creator's pinned comment first); newest, the latest first (a pinned comment stays first). |

### Search channels: `youtube/channels/search`

One page of YouTube's search for channels, 20 channels in the order youtube.com shows them, each with its handle, subscribers, description and avatar.

1 credit a call, 20 channels a page. Its page: https://www.lobstr.io/store/youtube/channels/search. Every option, field and error: https://api.lobstr.io/v2/catalog/youtube/channels/search.md

| Option | Takes | Default | What it is |
| --- | --- | --- | --- |
| `query` (required) | string |  | Words to search for, as typed in YouTube's search box (a name, a subject, a brand). |
| `language` | string | `en` | The language YouTube speaks to the visitor (en, fr, de, es, pt-BR, ja...): subscribers_text is written in it ("254K subscribers", "1,6 M d’abonnés"), and subscribers read in it. |
| `country` | string | `US` | The visitor's country, two letters (US, GB, FR, IN...), whose people YouTube searches for. |

### Get a channel: `youtube/channels/get`

A YouTube channel and its About: subscribers, views, videos, the day it joined, its country, its links, its description, avatar and banner.

1 credit a call. Its page: https://www.lobstr.io/store/youtube/channels/get. Every option, field and error: https://api.lobstr.io/v2/catalog/youtube/channels/get.md

| Option | Takes | Default | What it is |
| --- | --- | --- | --- |
| `channel` (required) | string |  | The channel: its id (UC followed by 22 letters, digits, - or _), its handle (@name) or the address of any of its pages (https://www.youtube.com/@name, /channel/UC..., /c/name, /user/name, or a tab's address). |

### List a channel's videos: `youtube/videos/list`

A YouTube channel's videos, shorts or live streams, page after page, newest first, most viewed or oldest, as its tab lists them.

1 credit a call, 30 videos a page. Its page: https://www.lobstr.io/store/youtube/videos/list. Every option, field and error: https://api.lobstr.io/v2/catalog/youtube/videos/list.md

| Option | Takes | Default | What it is |
| --- | --- | --- | --- |
| `channel` (required) | string |  | The channel: its id (UC followed by 22 letters, digits, - or _), its handle (@name) or the address of any of its pages (https://www.youtube.com/@name, /channel/UC..., /c/name, /user/name, or a tab's address). |
| `tab` | videos, shorts, live | `videos` | The channel's tab to list: its videos, its shorts, or its live streams (those past, live now and scheduled). |
| `sort` | latest, popular, oldest | `latest` | The tab's order, as its chips above the list say it: the newest first, the most viewed first, or the oldest first. |

## Call it

From code, one endpoint for every operation:

```bash
curl https://api.lobstr.io/v2/run \
  -H "Authorization: Bearer $LOBSTR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"source":"youtube","operation":"videos/search","options":{"query":"n8n tutorial","upload_date":"this_month","duration":"over_20_minutes"}}'
```

The answer holds `results` (the records), `count`, `cost.credits` and `next`: the whole call for the following page, to send as it is; null on the last page. SDKs: `pip install lobstrio`, `npm install lobstrio` (https://docs.lobstr.io/sdks).

From an AI agent: the MCP server https://api.lobstr.io/v2/mcp with your API key, in Claude, ChatGPT, Cursor or any MCP client. Its tools: find_operations, get_operation, run_operation, get_balance, send_feedback. Setup for each agent: https://docs.lobstr.io/agents

The API key is in the dashboard, under API: https://app.lobstr.io/dashboard/api. No account yet? An agent can get one for the person it works for: https://www.lobstr.io/auth.md

## Why lobstr.io

- **One key, every source**: No Google Cloud project, no daily quota, no OAuth. One lobstr.io key reaches YouTube and 20 other sources, from Google Maps to LinkedIn Sales Navigator, on the same credits.
- **Built for agents**: Five MCP tools, nothing to learn: your agent finds the operation, reads what it takes and gives, runs it and follows next. Your code gets the same through the SDKs or plain HTTP.
- **Measured in public**: Every call of the last 90 days counts in the figures on this page, and a failed call is free. Each operation is also run every hour by our own checks.

## lobstr.io or the YouTube Data API

| | YouTube Data API | lobstr.io |
| --- | --- | --- |
| Searches | 100 a day by default, 50 results a call | As many as your credits hold, 20 videos or 20 channels a page, with YouTube’s filters |
| Transcripts | Only for videos you can edit: captions.download needs your sign-in and costs 200 units | Any public video’s transcript, whole, every line with its times |
| A video | Its title, description, tags, duration and counts | The same, with its chapters, the moments viewers replay most, its storyboards, captions and audio tracks |
| Every other call | 10,000 units a day, more after a quota and compliance audit | 1 credit a call: $0.50 to $2 per 1,000 calls, nothing to request |
| To start | A Google Cloud project and a key, with OAuth for captions | An API key, with 100 free credits a month |

From Google’s documentation, 3 December 2026.

## Price

1 credit a call, whatever the page holds; an empty page and a failed call are free. The plans:

- Free: $0 a month, 100 credits a month
- Starter: $20 a month, 10,000 credits a month
- Pro: $100 a month, 100,000 credits a month
- Team: $500 a month, 1,000,000 credits a month

Every plan compared: https://www.lobstr.io/pricing.md

## YouTube API reliability

Every call of the last 90 days, from our users and from our own checks, which run each operation every hour. A failed call is free.

| Operation | Calls | Successful | Median call |
| --- | --- | --- | --- |
| `youtube/videos/search` | 30 | 100.00% | 1.9 s |
| `youtube/videos/get` | 64 | 100.00% | 2.2 s |
| `youtube/transcripts/get` | 16 | 100.00% | 2.7 s |
| `youtube/comments/list` | 34 | 100.00% | 1.4 s |
| `youtube/channels/search` | 9 | 100.00% | 1.4 s |
| `youtube/channels/get` | 7 | 100.00% | 2.1 s |
| `youtube/videos/list` | 11 | 100.00% | 1.9 s |

## YouTube API FAQ

### Is there an official YouTube API?

Yes: the YouTube Data API, free within a daily quota of 100 searches and 10,000 units for its other calls, more after a quota and compliance audit. It gives captions only for videos you can edit. lobstr.io reads YouTube as people see it: any public video’s transcript, its comments, its chapters and the moments viewers replay most, at one price a call.

### Can I get the transcript of any YouTube video?

Yes, when its page shows one: youtube/transcripts/get gives every line with when it starts and ends, its chapter, and the whole text. It is the author’s captions in the video’s language when there are some, else YouTube’s own, made from the speech (is_auto_generated). A video without a transcript costs nothing.

### Can I get every comment of a video?

Yes. youtube/comments/list gives 20 comments a page, top or newest first: follow next until it is null. Pass a comment’s id as comment for its replies, 10 a page. A video whose comments are turned off costs nothing.

### Can I download the videos?

No. youtube/videos/get gives everything YouTube’s page says of a video, the renditions it encoded included (resolution, codec, size), never the stream itself.

### Do I need a Google Cloud account?

No. A lobstr.io API key is all it takes, with no daily quota to request, and the free plan gives 100 credits a month.

### What does a call cost?

1 credit, whatever the page holds: 1,000 calls cost $0.50 to $2 depending on the plan. An empty page, a video without a transcript and a failed call are free.

### Can my AI agent use it?

Yes. Add the lobstr.io MCP server to Claude, ChatGPT, Cursor or any MCP client: the agent finds the operation, runs it and follows next by itself. [Setup for each agent](https://docs.lobstr.io/agents).

### Is there an SDK?

Yes: lobstrio, on PyPI and npm. In Python, client.run("youtube/transcripts/get", video=...) runs any operation and client.iterate follows every page. [The SDKs](https://docs.lobstr.io/sdks).

### Can I combine YouTube with other sources?

Yes, on the same key and the same credits. Pass a link from a channel’s links to [websites/contacts/get](https://www.lobstr.io/store/websites/contacts/get) for the emails on its website, then read what X and Google News say on the same subject. An agent chains them by itself.

### How reliable is the YouTube API on lobstr.io?

Every call of the last 90 days is drawn on this page, day by day, and a failed call is free. Each operation is also run every hour by our own checks, so a change on YouTube shows within the hour.

## Related sources

- [X (Twitter): Search tweets](https://www.lobstr.io/store/x/tweets/search): What people post on X about the same subject, each tweet with its counts, media and author, with your X account. 20 credits a call.
- [Google News: Search articles](https://www.lobstr.io/store/google_news/articles/search): The news on the same subject, up to 100 articles as Google ranks them, each with its publisher’s link. 1 credit a call.
- [Stack Overflow: Search questions](https://www.lobstr.io/store/stackoverflow/questions/search): The questions developers ask on the same subject, each whole with its answers, votes and tags. 1 credit a call.
- [Websites: Get a website's contacts](https://www.lobstr.io/store/websites/contacts/get): The emails and profiles on a creator’s own website: pass it a link from the channel’s links. 1 credit a call.
