LurkAPI
Docs · Search YouTube

Search YouTube

Search YouTube by keyword for videos, Shorts, channels and playlists, with date, length and type filters.

1 credit per callFresh within 15 minutesMCP tool: youtube_search
GEThttps://api.lurkapi.com/v1/youtube/search

Example responseView as markdown

When to use this

Use it for trend, topic and competitor research: what YouTube's search page shows for a keyword, split into videos, shorts, channels, playlists and lives (streaming now). About 20 results per page. Narrow it with type, uploadDate, duration (videos only) and sortBy=popular.

Video results carry views as YouTube shows them, a description snippet and the channel. Counts may be rounded; video details returns exact views. Shorts carry title and views only; pass a Short's url to the video endpoint for the rest.

Pagination. Pass the response's continuationToken back as continuationToken (with the same query) for the next page; it's null on the last page.

Parameters

All parameters go in the query string.

ParameterDescription
query
stringrequired
Keywords, e.g. running shoes. YouTube's operators work, e.g. intitle:"air max".
Example
running shoes
type
stringoptional
What to search for. all mixes them like youtube.com.
One of
allvideosshortschannelsplaylists
Default
all
uploadDate
stringoptional
Only results uploaded in this window.
One of
anytodaythis_weekthis_monththis_year
Default
any
duration
stringoptional
Video length. Doesn't apply to Shorts.
One of
anyunder_3_minbetween_3_and_20_minover_20_min
Default
any
sortBy
stringoptional
relevance (YouTube's default) or popular (most viewed first).
One of
relevancepopular
Default
relevance
continuationToken
stringoptional
The continuationToken from the previous response, for the next page.

Example request

Replace YOUR_API_KEY with your key, or set LURKAPI_KEY for the code. Get a free key.

Language

Example response

A real response from this endpoint, captured from the live API and trimmed to a couple of items. Strings over 96 characters (mostly signed media URLs) are cut short and end in ….

Show the example response (3 KB)
{
  "success": true,
  "credits_remaining": 999992,
  "credits_charged": 1,
  "videos": [
    {
      "type": "video",
      "id": "z5mWgBMOFJk",
      "url": "https://www.youtube.com/watch?v=z5mWgBMOFJk",
      "title": "My Top 3 Running Shoes | Marathon Prep Training",
      "thumbnail": "https://i.ytimg.com/vi/z5mWgBMOFJk/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4q…",
      "viewCountText": "682,786 views",
      "viewCountInt": 682786,
      "publishedTimeText": "6 years ago",
      "publishedTime": "2020-10-01T14:32:05.335Z",
      "lengthText": "17:18",
      "lengthSeconds": 1038,
      "badges": [],
      "description": "Subscribe: http://bit.ly/subNickBare Follow Nick Bare: Facebook: http://…",
      "channel": {
        "id": "UCbVEx9qG_hLrb6FrWQJz_Tg",
        "title": "Nick Bare",
        "handle": "nickbarefitness",
        "url": "https://www.youtube.com/@nickbarefitness",
        "thumbnail": "https://yt3.ggpht.com/ytc/AIdro_mVx6fQ8UNrMx2sjhQ5JwJyQTCfSXAoznqRdRSZLo…"
      }
    },
    {
      "type": "video",
      "id": "GDL5GVlpuko",
      "url": "https://www.youtube.com/watch?v=GDL5GVlpuko",
      "title": "My Complete Guide To Running Shoes! (Everything You Need To Know)",
      "thumbnail": "https://i.ytimg.com/vi/GDL5GVlpuko/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4q…",
      "viewCountText": "282,242 views",
      "viewCountInt": 282242,
      "publishedTimeText": "10 months ago",
      "publishedTime": "2025-12-04T14:32:05.335Z",
      "lengthText": "20:25",
      "lengthSeconds": 1225,
      "badges": [
        "1 product",
        "4K"
      ],
      "description": "If you enjoyed the video, please like, comment and subscribe! Thank you …",
      "channel": {
        "id": "UCZPqG0yh_xPm2AyLjffbDvw",
        "title": "Ben Parkes",
        "handle": "BenParkes",
        "url": "https://www.youtube.com/@BenParkes",
        "thumbnail": "https://yt3.ggpht.com/ytc/AIdro_mDy4ZoQqcj7DiO_-1z6j2Y6Nu_PvFESGAsJagEM5…"
      }
    }
  ],
  "shorts": [
    {
      "type": "short",
      "id": "SVyIXZQABS8",
      "url": "https://www.youtube.com/shorts/SVyIXZQABS8",
      "title": "Which shoes to get for your Hyrox training? Boldfit Running Shoes",
      "thumbnail": "https://i.ytimg.com/vi/SVyIXZQABS8/oar2.jpg?sqp=-oaymwEgCJUDEOAESFWQAgHy…",
      "viewCountText": "44 views",
      "viewCountInt": 44
    },
    {
      "type": "short",
      "id": "rKuu1bK6qQY",
      "url": "https://www.youtube.com/shorts/rKuu1bK6qQY",
      "title": "Best Running Shoes for Long Runs 🏃",
      "thumbnail": "https://i.ytimg.com/vi/rKuu1bK6qQY/oar2.jpg?sqp=-oaymwEgCJUDEOAESFWQAgHy…",
      "viewCountText": "7M views",
      "viewCountInt": 7000000
    }
  ],
  "channels": [],
  "playlists": [],
  "lives": [],
  "continuationToken": "EugBEg1ydW5uaW5nIHNob2VzGtYBU0JTQ0FRdDZOVzFYWjBKTlQwWkthNElCQzBkRVREVkhW…"
}

Response fields

Every field of a successful response. [] marks a list: a[].b is the b of each item in a. nullable fields can be null; optional fields can be missing.

Show all 77 fields
FieldTypeDescription
successtrueAlways true here; errors have success: false.
credits_remainingnumberYour balance after this call. On anonymous playground calls: free tries left today.
credits_chargednumberCredits this call cost; 0 on free endpoints. On anonymous playground calls: tries used (1).
videosobject[]Videos, in result order.
videos[].type"video"Always video.
videos[].idstringVideo id, e.g. v9QtM6qnG50.
videos[].urlstringWatch link. Pass it to the video endpoint for likes, comments, the full description and exact views.
videos[].titlestringVideo title.
videos[].thumbnailstringnullableLargest thumbnail URL.
videos[].viewCountTextstringnullableViews as YouTube shows them, e.g. "82M views", or "1,204 watching" while live.
videos[].viewCountIntnumbernullableviewCountText as a number, rounded whenever YouTube abbreviates it (82M views → 82000000). Use video details for exact views.
videos[].publishedTimeTextstringnullableWhen it went up, as YouTube shows it, e.g. "10 days ago". null for live and upcoming videos.
videos[].publishedTimestringnullablepublishedTimeText as an estimated ISO 8601 time, counted back from when we fetched the page. Only as precise as the text: "1 year ago" means sometime that year.
videos[].lengthTextstringnullableLength as shown, e.g. "19:03". null for live and upcoming videos.
videos[].lengthSecondsnumbernullableLength in seconds.
videos[].badgesstring[]Labels YouTube shows on the result, e.g. "4K", "CC", "New" or "LIVE". Often empty.
videos[].descriptionstringnullableThe description snippet shown under the result, usually its first line or two.
videos[].channelobjectnullableThe channel behind it.
videos[].channel.idstringnullableChannel id, UC….
videos[].channel.titlestringnullableChannel name.
videos[].channel.handlestringnullableHandle without the @, e.g. BenParkes; null if YouTube shows none.
videos[].channel.urlstringnullableChannel page, e.g. https://www.youtube.com/@BenParkes.
videos[].channel.thumbnailstringnullableChannel picture URL; null when the result doesn't show one.
shortsobject[]Shorts, in result order.
shorts[].type"short"Always short.
shorts[].idstringThe Short's video id.
shorts[].urlstringhttps://www.youtube.com/shorts/<id>. Pass it to the video endpoint for likes, comments, date and length.
shorts[].titlestringThe Short's title.
shorts[].thumbnailstringnullableLargest (vertical) thumbnail URL.
shorts[].viewCountTextstringnullableViews as YouTube shows them, e.g. "22M views".
shorts[].viewCountIntnumbernullableviewCountText as a number, rounded as shown (22M views → 22000000).
channelsobject[]Channels, in result order.
channels[].type"channel"Always channel.
channels[].idstringChannel id, UC…. Pass it to channel details for the full stats.
channels[].urlstringChannel page.
channels[].titlestringChannel name.
channels[].handlestringnullableHandle without the @; null if YouTube shows none.
channels[].thumbnailstringnullableChannel picture URL.
channels[].descriptionstringnullableThe description snippet shown in the result.
channels[].subscriberCountTextstringnullableSubscribers as YouTube shows them, e.g. "128K subscribers".
channels[].subscriberCountnumbernullablesubscriberCountText as a number, rounded as shown.
channels[].isVerifiedbooleanHas YouTube's verified or official artist badge.
playlistsobject[]Playlists and mixes, in result order.
playlists[].type"playlist"Always playlist.
playlists[].idstringPlaylist id, e.g. PLB50X6wE7gSWNQJElg3NX4AH42QoouHOk (mixes start with RD).
playlists[].urlstringPlaylist page, https://www.youtube.com/playlist?list=<id>.
playlists[].titlestringPlaylist title.
playlists[].thumbnailstringnullableCover thumbnail URL (its first video).
playlists[].videoCountTextstringnullableSize as YouTube shows it, e.g. "30 videos".
playlists[].videoCountnumbernullablevideoCountText as a number.
playlists[].channelobjectnullableThe channel behind it.
playlists[].channel.idstringnullableChannel id, UC….
playlists[].channel.titlestringnullableChannel name.
playlists[].channel.handlestringnullableHandle without the @, e.g. BenParkes; null if YouTube shows none.
playlists[].channel.urlstringnullableChannel page, e.g. https://www.youtube.com/@BenParkes.
playlists[].channel.thumbnailstringnullableChannel picture URL; null when the result doesn't show one.
livesobject[]Streams that are live right now.
lives[].type"video"Always video.
lives[].idstringVideo id, e.g. v9QtM6qnG50.
lives[].urlstringWatch link. Pass it to the video endpoint for likes, comments, the full description and exact views.
lives[].titlestringVideo title.
lives[].thumbnailstringnullableLargest thumbnail URL.
lives[].viewCountTextstringnullableViews as YouTube shows them, e.g. "82M views", or "1,204 watching" while live.
lives[].viewCountIntnumbernullableviewCountText as a number, rounded whenever YouTube abbreviates it (82M views → 82000000). Use video details for exact views.
lives[].publishedTimeTextstringnullableWhen it went up, as YouTube shows it, e.g. "10 days ago". null for live and upcoming videos.
lives[].publishedTimestringnullablepublishedTimeText as an estimated ISO 8601 time, counted back from when we fetched the page. Only as precise as the text: "1 year ago" means sometime that year.
lives[].lengthTextstringnullableLength as shown, e.g. "19:03". null for live and upcoming videos.
lives[].lengthSecondsnumbernullableLength in seconds.
lives[].badgesstring[]Labels YouTube shows on the result, e.g. "4K", "CC", "New" or "LIVE". Often empty.
lives[].descriptionstringnullableThe description snippet shown under the result, usually its first line or two.
lives[].channelobjectnullableThe channel behind it.
lives[].channel.idstringnullableChannel id, UC….
lives[].channel.titlestringnullableChannel name.
lives[].channel.handlestringnullableHandle without the @, e.g. BenParkes; null if YouTube shows none.
lives[].channel.urlstringnullableChannel page, e.g. https://www.youtube.com/@BenParkes.
lives[].channel.thumbnailstringnullableChannel picture URL; null when the result doesn't show one.
continuationTokenstringnullablePass as continuationToken for the next page. null on the last page.

Caching and freshness

Responses are cached for up to 15 minutes, so a repeat call within that window can return the same data. It still costs 1 credit.

Errors

Errors return { success: false, error, code, docs } with the HTTP status below. Validation errors, 401/402/429 rejections and 5xx failures are free; not_found is charged (how charging works). All error codes.

StatusCodeMeaning
401missing_api_keyNo API key. Send it in the x-api-key header.
401invalid_api_keyThe key is unknown or was revoked.
402insufficient_creditsNot enough credits for this call. Buy a pack or wait for tomorrow's top-up.
405method_not_allowedEndpoints take GET with query params.
429rate_limitedToo many calls at once. Wait for the retry-after seconds, then retry.
500internal_errorSomething broke on our side. Retry; 5xx errors are free.
502upstream_errorThe platform didn't give a usable answer. Retry; 5xx errors are free.
503upstream_busyAll our connections to the platform are busy. Retry in a few seconds; 5xx errors are free.
504upstream_timeoutThe platform took over 30 seconds to answer. Retry; timeouts are free.

Use it in Claude

Once LurkAPI is connected to Claude, this endpoint is the youtube_search tool. Ask in plain English, for example:

Ask Claude
Use LurkAPI's youtube_search with query "running shoes" and summarize what you find.

Claude calls youtube_search with arguments like these, and each call costs 1 credit:

Tool arguments
{
  "query": "running shoes"
}

Tool results skip nulls and empty lists to save tokens.