Introducing the Instagram APIRead more →

YouTube Search API. Videos, shorts and live streams matching your search.

Videos, shorts and live streams by keyword. We handle the proxies, blocks and platform changes.

In your agent: YouTube MCP server →

YouTube Search API at a glance

Returns the YouTube videos, shorts and live streams that match a keyword, across YouTube or in one channel, by best match or popularity. Each has its channel, view count, upload day, length and, across YouTube, the part of the description that matched. Streams on air have no views, upload time or length.

GET /v1/youtube/search_posts

Read the API reference
  • 1 credit per page, $0.75–$1.97 per 1,000 pages
  • 23 typed fields null when unknown
  • 30 videos, shorts and live streams per page, YouTube's relevance ranking (its search order)
  • query is all it needs, e.g. marathon training

Send one request. Get up to 30 videos, shorts and live streams back.

Copy the request in your language, or hand it to your agent. Sign up for an API key and your first 100 credits are free.

$ npm install socialtap
query = marathon training
GET /v1/youtube/search_postsTry in
// Node 18+: save this as app.mjs (an ES module) and run: node app.mjs
const params = new URLSearchParams({
  query: "marathon training",
});
const res = await fetch(`https://socialtap.dev/v1/youtube/search_posts?${params}`, {
  headers: { "x-api-key": process.env.SOCIALTAP_API_KEY ?? "" },
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
const { data, page, meta } = body;
console.log(data, meta.credits_charged);
200 OK · GET https://socialtap.dev/v1/youtube/search_postsLong arrays and strings are shortened here. Real responses are complete.Docs

One schema on 22 platforms.

The response reference lists every field, its type and when it is null. See the full schema.

  • Null means unknown

    A field YouTube doesn't show is null, never zero or an empty string, so a real zero always means zero.

  • What it accepts

    Words or a phrase, matched by YouTube's search as on youtube.com, in any language. YouTube's operators pass through: "exact phrase", intitle:word, -word, #hashtag.

  • Write one parser

    YouTube, TikTok, Instagram and 19 more platforms answer in these fields, so the code that reads one reads them all.

platformstring
Platform ID (tiktok, youtube, …).
idstring
Platform-native post ID (string; Instagram shortcode, Reddit with its t3_ prefix).
urlstring
Canonical post URL.
typestring
Normalized content shape. New values may be added; treat unknown values as other.
platform_typestring
The platform's own product label, lowercase (reel, short, story, live, tweet, …).
titlestring
Headline (YouTube title, Reddit title); null on caption-only platforms.
textstring
Caption, description or body as plain text.
link_urlstring
The page the post links to: a link post's target, a pin's destination, or the page its link card or link sticker opens; null when it links to none.

What teams build with the YouTube Search API.

  • Find videos about a product or topic

  • Track new uploads that mention a brand

  • Find shorts for a trend or hashtag

  • Find creators who cover a topic

  • See which live streams are on air for a game or event

Good to know before you build.

  • published_at is the latest time YouTube's relative upload label allows (listed in approximate_fields): "1 month ago" means one to two months back. The YouTube Video API returns the exact time.
  • text is the description snippet a result shows, so hashtags and mentions can miss some. text is null in a channel's search and with kind=short.
  • Words YouTube shows only to signed-in adults return private_or_unavailable. With kind=short they return an empty page.
  • A channel that doesn't exist returns not_found. No match, or a channel without search (YouTube's Music channel, an artist's Topic channel), returns an empty page.

1 credit per page. Failed requests are free.

Buy credits once and spend them on any endpoint, on any platform.

SourcePrice per successful pagePer 1,000 pages
Any source1 credit$0.75–$1.97
  • Cache hits are free.
  • Credits from packs and top-ups never expire.
  • A monthly plan's credits are spent first, and what is left of them ends at each renewal.
  • Prices exclude tax: sales tax is added at checkout where it applies.
  • Outside the US, plans and packs are sold to businesses: checkout asks for your VAT, GST or other business tax ID.

Questions about the YouTube Search API.

More in the API reference.

How much does the YouTube Search API cost?
A page of up to 30 videos, shorts and live streams costs 1 credit. Every successful page is charged, empty pages included. SocialTap credits cost $0.75–$1.97 per 1,000, depending on the plan or pack.
How do I get the next page?
Repeat the same request with cursor set to page.next_cursor from the previous response, keeping the other parameters. When page.has_more is false there are no more pages. Cursors expire after 1 hour.

Try it with your own search.

Type it in the playground, or copy the request into your code.

100free credits
  • No credit card
  • Failed requests are free
  • Works on all 280 endpoints
Start for free Read the docs