Skip to content
NewIntroducing lobstr.io API v2: Web Data for AI Agents
YouTube APITry it

Try the YouTube API

Pick an operation: its request in cURL, Python or Node, and its answer.

1Request
Words to search for, as typed in YouTube's search box.
How recently the videos were uploaded, as the panel's "Upload date" filter.
The videos' length, as the panel's "Duration" filter.
1 credit a call
Code, from the fields above
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"
    }
  }'
2Response

An example answer. Run it on your own input.

{
  "object": "run",
  "id": "run_4rsl3cx4t6t25g5ngbm5ssccua",
  "livemode": true,
  "source": "youtube",
  "operation": "videos/search",
  "version": "1.0.1",
  "schema_url": "https://api.lobstr.io/v2/catalog/youtube/videos/search",
  "options": {
    "query": "n8n tutorial",
    "upload_date": "this_month",
    "duration": "over_20_minutes"
  },
  "fields": null,
  "status": "succeeded",
  "count": 1,
  "has_more": false,
  "next": null,
  "cost": {
    "credits": 1
  },
  "results": [
    {
      "object": "video",
      "position": 1,
      "id": "n8nTutor1al",
      "ids": {
        "video_id": "n8nTutor1al",
        "channel_id": "UCa1b2c3d4e5f6g7h8i9j0kL"
      },
      "url": "https://www.youtube.com/watch?v=n8nTutor1al",
      "title": "n8n Tutorial for Beginners: Build Your First Workflow",
      "description_snippet": "Learn n8n from scratch and build your first automation in under an hour ...",
      "duration_seconds": 2843,
      "duration_text": "47:23",
      "views": 18342,
      "watching": null,
      "published_text": "2 weeks ago",
      "is_live": false,
      "is_upcoming": false,
      "scheduled_at": null,
      "is_short": false,
      "badges": [
        "4K",
        "CC"
      ],
      "channel": {
        "id": "UCa1b2c3d4e5f6g7h8i9j0kL",
        "title": "Automation Academy",
        "handle": "@automationacademy",
        "url": "https://www.youtube.com/@automationacademy",
        "is_verified": true,
        "is_artist": false,
        "thumbnails": [
          {
            "url": "https://yt3.ggpht.com/automation-academy=s68-c-k-c0x00ffffff-no-rj",
            "width": 68,
            "height": 68
          }
        ]
      },
      "collaborators": [],
      "chapters": [
        {
          "title": "Introduction",
          "start_seconds": 0,
          "time_text": "0:00",
          "is_match": false,
          "thumbnails": [
            {
              "url": "https://i.ytimg.com/vi/n8nTutor1al/hqdefault_0.jpg",
              "width": 336,
              "height": 188
            }
          ]
        },
        {
          "title": "Your first trigger",
          "start_seconds": 312,
          "time_text": "5:12",
          "is_match": true,
          "thumbnails": [
            {
              "url": "https://i.ytimg.com/vi/n8nTutor1al/hqdefault_312000.jpg",
              "width": 336,
              "height": 188
            }
          ]
        }
      ],
      "ai_summary": null,
      "thumbnails": [
        {
          "url": "https://i.ytimg.com/vi/n8nTutor1al/hq720.jpg",
          "width": 360,
          "height": 202
        },
        {
          "url": "https://i.ytimg.com/vi/n8nTutor1al/hq720.jpg",
          "width": 720,
          "height": 404
        }
      ],
      "moving_thumbnail": {
        "url": "https://i.ytimg.com/an_webp/n8nTutor1al/mqdefault_6s.webp",
        "width": 320,
        "height": 180
      },
      "source_url": "https://www.youtube.com/results?search_query=n8n+tutorial&sp=EgQIBBgC",
      "observed_at": "2026-12-03T12:00:00Z"
    }
  ]
}

YouTube API operations

7 operations, one key, the same envelope: results, count, cost and next for the following page.

Get a video

1 credita call

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.

OptionTakesWhat it is
video*stringThe 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

1 credita call

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.

OptionTakesWhat it is
video*stringThe 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

1 credita call20 comments a page

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.

OptionTakesWhat it is
video*stringThe video: its id (11 letters, digits, - or _) or any of its links (youtube.com/watch?v=..., youtu.be/..., /shorts/..., /live/..., /embed/...).

Get a channel

1 credita call

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

OptionTakesWhat it is
channel*stringThe 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

1 credita call30 videos a page

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

OptionTakesWhat it is
channel*stringThe 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).

Use the YouTube API in your agent

One key, then your agent or your code calls every operation of this page.

  1. 01

    Connect lobstr.io

    Add the lobstr.io MCP server to Claude, ChatGPT, Cursor or any MCP client, or take an API key for your code.

    Claude
    ChatGPT
    Cursor
  2. 02

    Ask, or call

    Tell your agent what you need from YouTube: it finds the operations that fit and runs them. From your code, it is one POST to /v2/run.

    Find this month’s n8n tutorials over 20 minutes, then tell me what the three most viewed teach and what viewers say about them.

    Search videos
    Get a video's transcript
    List a video's comments
  3. 03

    Pay per call

    1 credit a call that returns data, from your plan’s credits. The free plan gives 100 credits a month.

    20 videos 1
    Empty pageFree
    Failed callFree

Why lobstr.io

What you get when your agent or your code calls YouTube through lobstr.io.

01

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.

02

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.

lobstr.ioConnected
find_operations
get_operation
run_operation
get_balance
send_feedback
03

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.

Last 30 days

lobstr.io or the YouTube Data API

What Google’s own YouTube Data API gives, and what lobstr.io gives, for the same videos.

YouTube Data APIlobstr.io
Searches100 a day by default, 50 results a callAs many as your credits hold, 20 videos or 20 channels a page, with YouTube’s filters
TranscriptsOnly for videos you can edit: captions.download needs your sign-in and costs 200 unitsAny public video’s transcript, whole, every line with its times
A videoIts title, description, tags, duration and countsThe same, with its chapters, the moments viewers replay most, its storyboards, captions and audio tracks
Every other call10,000 units a day, more after a quota and compliance audit1 credit a call: $0.50 to $2 per 1,000 calls, nothing to request
To startA Google Cloud project and a key, with OAuth for captionsAn API key, with 100 free credits a month

From Google’s documentation, 3 December 2026.

What it costs

Set what you need from each operation in a month: the credits add up, and the plan that holds them is the price.

Every plan
Search videos1005 credits
Get a video100100 credits
Get a video's transcript100100 credits
List a video's comments1,00050 credits
Search channels00 credits
Get a channel00 credits
List a channel's videos00 credits

1 credit a call: 20 or 30 videos, 20 comments or 20 channels.

A month

$20

255 credits a month: Starter holds 10,000.

Live

YouTube API reliability

Every call counts; a day is green at 95% successful.

Successful calls
100.00%
Median call
2.0 s
90 days agoToday
95% or more (SLA)90 to 95%75 to 90%Under 75%

A call fails when the site does not answer or we cannot read its answer; a wrong input is not counted.

YouTube API FAQ

What people ask before calling the YouTube API.

Videos, transcripts and comments

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 (isautogenerated). 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.

Using the API

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.

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.

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 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.

Ready to call it?

An API key in a minute, then the call above, from your code or your agent.