100 free credits. No credit card required.Start building
Logo
YouTube logo
100 free credits. No credit card required

YouTube Search API

Returns YouTube search results for a keyword: videos, channels, playlists, shorts, and live streams, each with title, thumbnail, views, and channel.

GET /v1/youtube/search

Last updated November 2026Maintained by the SocialCrawl team

When to use the YouTube Search API

Use it for a general keyword search across every content kind; search/advanced returns videos only but adds date, license, and country filters.

From the API reference

Searches YouTube by keyword. Returns matching videos, shorts, and live streams (an untyped search returns all three; type scopes to one kind, including channels and playlists). Each video result includes title, URL, thumbnail, view count, publish date, duration, channel info, and badges. DATES: post.published_at is exact by default. Without includeExtras=true the upstream sends only a date it derived from a relative label such as "4 months ago" (measured up to four months off), so every such row is joined to the per-video lookup for its exact publish second, at no extra credit (one lookup per page, about 0.2 to 0.7 seconds). A row the lookup could not resolve keeps the estimate, marked by post.ext.published_precision, and _warnings says so (exact_dates_partial or exact_dates_unavailable). Send exact_dates=false to skip the lookup and get the supplier's estimate with that marker. Durations for Shorts need includeExtras=true. Send include=engagement to fill likes, comments, the duration, the exact publish time and the channel id on every video and Short in the same call from the per-video lookup (faster than includeExtras, and it keeps the full page), and include=channel to add each channel's subscriber count (post.ext.author_followers); each costs 1 credit per distinct video or channel filled, at most 5 per page. TITLES: the free per-video lookup swaps YouTube's English machine-translated listing title for the creator's own; a title not swapped carries post.ext.title_maybe_translated: true (exact_dates=false skips the lookup).

Searching 69 platforms in parallel

·TikTok logoTikTok·Instagram logoInstagram·YouTube logoYouTube·Facebook logoFacebook·X logoX·LinkedIn logoLinkedIn·Reddit logoReddit·Threads logoThreads·Pinterest logoPinterest·Twitch logoTwitch·Truth Social logoTruth Social·Snapchat logoSnapchat·Kick logoKick·Bluesky logoBluesky·Kwai logoKwai·Rumble logoRumble·Spotify logoSpotify·Apple Music logoApple Music·TikTok Shop logoTikTok Shop·Amazon Shop logoAmazon Shop·Google Shopping logoGoogle Shopping·Trustpilot logoTrustpilot·TripAdvisor logoTripAdvisor·Yelp logoYelp·Linktree logoLinktree·Komi logoKomi·Pillar logoPillar·lnk.bio logolnk.bio·Facebook Ads logoFacebook Ads·Google Ads logoGoogle Ads·LinkedIn Ads logoLinkedIn Ads·Google Search logoGoogle Search·Google News logoGoogle News·Finance logoFinance·Polymarket logoPolymarket·Tavily logoTavily·Hacker News logoHacker News·GitHub logoGitHub·Perplexity logoPerplexity·Naver logoNaver·Utility logoUtility·Universal Search logoUniversal Search
·TikTok logoTikTok·Instagram logoInstagram·YouTube logoYouTube·Facebook logoFacebook·X logoX·LinkedIn logoLinkedIn·Reddit logoReddit·Threads logoThreads·Pinterest logoPinterest·Twitch logoTwitch·Truth Social logoTruth Social·Snapchat logoSnapchat·Kick logoKick·Bluesky logoBluesky·Kwai logoKwai·Rumble logoRumble·Spotify logoSpotify·Apple Music logoApple Music·TikTok Shop logoTikTok Shop·Amazon Shop logoAmazon Shop·Google Shopping logoGoogle Shopping·Trustpilot logoTrustpilot·TripAdvisor logoTripAdvisor·Yelp logoYelp·Linktree logoLinktree·Komi logoKomi·Pillar logoPillar·lnk.bio logolnk.bio·Facebook Ads logoFacebook Ads·Google Ads logoGoogle Ads·LinkedIn Ads logoLinkedIn Ads·Google Search logoGoogle Search·Google News logoGoogle News·Finance logoFinance·Polymarket logoPolymarket·Tavily logoTavily·Hacker News logoHacker News·GitHub logoGitHub·Perplexity logoPerplexity·Naver logoNaver·Utility logoUtility·Universal Search logoUniversal Search
·TikTok logoTikTok·Instagram logoInstagram·YouTube logoYouTube·Facebook logoFacebook·X logoX·LinkedIn logoLinkedIn·Reddit logoReddit·Threads logoThreads·Pinterest logoPinterest·Twitch logoTwitch·Truth Social logoTruth Social·Snapchat logoSnapchat·Kick logoKick·Bluesky logoBluesky·Kwai logoKwai·Rumble logoRumble·Spotify logoSpotify·Apple Music logoApple Music·TikTok Shop logoTikTok Shop·Amazon Shop logoAmazon Shop·Google Shopping logoGoogle Shopping·Trustpilot logoTrustpilot·TripAdvisor logoTripAdvisor·Yelp logoYelp·Linktree logoLinktree·Komi logoKomi·Pillar logoPillar·lnk.bio logolnk.bio·Facebook Ads logoFacebook Ads·Google Ads logoGoogle Ads·LinkedIn Ads logoLinkedIn Ads·Google Search logoGoogle Search·Google News logoGoogle News·Finance logoFinance·Polymarket logoPolymarket·Tavily logoTavily·Hacker News logoHacker News·GitHub logoGitHub·Perplexity logoPerplexity·Naver logoNaver·Utility logoUtility·Universal Search logoUniversal Search
·TikTok logoTikTok·Instagram logoInstagram·YouTube logoYouTube·Facebook logoFacebook·X logoX·LinkedIn logoLinkedIn·Reddit logoReddit·Threads logoThreads·Pinterest logoPinterest·Twitch logoTwitch·Truth Social logoTruth Social·Snapchat logoSnapchat·Kick logoKick·Bluesky logoBluesky·Kwai logoKwai·Rumble logoRumble·Spotify logoSpotify·Apple Music logoApple Music·TikTok Shop logoTikTok Shop·Amazon Shop logoAmazon Shop·Google Shopping logoGoogle Shopping·Trustpilot logoTrustpilot·TripAdvisor logoTripAdvisor·Yelp logoYelp·Linktree logoLinktree·Komi logoKomi·Pillar logoPillar·lnk.bio logolnk.bio·Facebook Ads logoFacebook Ads·Google Ads logoGoogle Ads·LinkedIn Ads logoLinkedIn Ads·Google Search logoGoogle Search·Google News logoGoogle News·Finance logoFinance·Polymarket logoPolymarket·Tavily logoTavily·Hacker News logoHacker News·GitHub logoGitHub·Perplexity logoPerplexity·Naver logoNaver·Utility logoUtility·Universal Search logoUniversal Search
YouTube API

What can you do with the Search API?

The Search endpoint gives you structured YouTube data with computed fields in a single request. No scraping infrastructure to build or maintain.

Example Request

# GET /v1/youtube/search: Metered: holds 1 credit per page up front and refunds what the call does not use. Cache hits are free and failed calls are refunded.
# Check the price first for 0 credits: add dry_run=1 to the query. Nothing is fetched or charged.
# --max-time 15: this endpoint's measured p99 latency x 1.5.
# --retry 3: retries timeouts, 429 and 5xx, honoring Retry-After.
# -o response.json keeps only the final attempt's body.
# One Idempotency-Key per request, reused on every retry, so a retried call is never charged twice.
# Next page: send pagination.next_cursor back as cursor until pagination.has_more is false.
IDEMPOTENCY_KEY=$(od -An -N16 -tx1 /dev/urandom | tr -d ' \n')
curl -sS --max-time 15 --retry 3 -o response.json \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  "https://www.socialcrawl.dev/v1/youtube/search?query=javascript+tutorial&type=videos&label=sponsored&relevance=filter" && cat response.json
# GET /v1/youtube/search: Metered: holds 1 credit per page up front and refunds what the call does not use. Cache hits are free and failed calls are refunded.
# Check the price first for 0 credits: add dry_run=1 to the query. Nothing is fetched or charged.
import os
import random
import time
import uuid

import requests

API_KEY = os.environ.get("SOCIALCRAWL_API_KEY", "YOUR_API_KEY")
TIMEOUT_S = 15  # this endpoint's measured p99 latency x 1.5.
MAX_RETRIES = 3
URL = "https://www.socialcrawl.dev/v1/youtube/search"


def backoff(attempt):
    # Exponential backoff with jitter: about 1 s, 2 s, then 4 s.
    return 2 ** attempt * (0.5 + random.random() / 2)


def socialcrawl(params):
    # One Idempotency-Key per request, reused on every retry, so a retried call is never charged twice.
    idempotency_key = str(uuid.uuid4())
    for attempt in range(MAX_RETRIES + 1):
        try:
            res = requests.get(
                URL,
                params=params,
                headers={"x-api-key": API_KEY, "Idempotency-Key": idempotency_key},
                timeout=TIMEOUT_S,
            )
            body = res.json()
        except (requests.RequestException, ValueError):
            # A timeout, a dropped connection or a non-JSON gateway page: retry with the same key.
            if attempt == MAX_RETRIES:
                raise
            time.sleep(backoff(attempt))
            continue
        if body["success"]:
            return body
        error = body["error"]
        # Branch on error["type"], never on the message text.
        if error["type"] == "RESOURCE_NOT_FOUND":
            return None  # refunded: nothing to read
        retry_after = res.headers.get("Retry-After")
        # SERVICE_UNAVAILABLE without Retry-After is a withdrawn endpoint: permanent.
        permanent = error["type"] == "SERVICE_UNAVAILABLE" and retry_after is None
        if not error.get("retryable") or permanent or attempt == MAX_RETRIES:
            raise RuntimeError(f"{error['type']}: {error['message']} (request_id {body['request_id']})")
        # Retry-After (seconds) wins; otherwise back off.
        time.sleep(float(retry_after) if retry_after else backoff(attempt))


params = {
    "query": "javascript tutorial",
    "type": "videos",
    "label": "sponsored",
    "relevance": "filter",
}

# Walk the list: send pagination.next_cursor back as cursor until has_more is false.
MAX_PAGES = 10  # each page is one call
items = []
for _ in range(MAX_PAGES):
    body = socialcrawl(params)
    if body is None:
        break
    items.extend(body["data"]["items"])
    page = body.get("pagination") or {}
    if not page.get("has_more") or not page.get("next_cursor"):
        break
    params["cursor"] = page["next_cursor"]
print(f"{len(items)} items")
// GET /v1/youtube/search: Metered: holds 1 credit per page up front and refunds what the call does not use. Cache hits are free and failed calls are refunded.
// Check the price first for 0 credits: add dry_run=1 to the query. Nothing is fetched or charged.
const API_KEY = process.env.SOCIALCRAWL_API_KEY ?? "YOUR_API_KEY";
const TIMEOUT_MS = 15_000; // this endpoint's measured p99 latency x 1.5.
const MAX_RETRIES = 3;

type Page = { next_cursor: string | null; has_more: boolean };
type SocialCrawlResponse =
  | { success: true; data: any; pagination?: Page; credits_used: number; request_id: string }
  | { success: false; error: { type: string; message: string; retryable: boolean }; request_id: string };

const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
// Exponential backoff with jitter: about 1 s, 2 s, then 4 s.
const backoffMs = (attempt: number) => 2 ** attempt * 1000 * (0.5 + Math.random() / 2);

async function socialcrawl(url: URL) {
  // One Idempotency-Key per request, reused on every retry, so a retried call is never charged twice.
  const idempotencyKey = crypto.randomUUID();
  for (let attempt = 0; ; attempt++) {
    let res: Response;
    let body: SocialCrawlResponse;
    try {
      res = await fetch(url, {
        headers: {
          "x-api-key": API_KEY,
          "Idempotency-Key": idempotencyKey,
        },
        signal: AbortSignal.timeout(TIMEOUT_MS),
      });
      body = (await res.json()) as SocialCrawlResponse;
    } catch (error) {
      // A timeout, a dropped connection or a non-JSON gateway page: retry with the same key.
      if (attempt >= MAX_RETRIES) throw error;
      await sleep(backoffMs(attempt));
      continue;
    }
    if (body.success) return body;
    // Branch on error.type, never on the message text.
    if (body.error.type === "RESOURCE_NOT_FOUND") return null; // refunded: nothing to read
    const retryAfter = res.headers.get("Retry-After");
    // SERVICE_UNAVAILABLE without Retry-After is a withdrawn endpoint: permanent.
    const permanent = body.error.type === "SERVICE_UNAVAILABLE" && retryAfter === null;
    if (!body.error.retryable || permanent || attempt >= MAX_RETRIES) {
      throw new Error(`${body.error.type}: ${body.error.message} (request_id ${body.request_id})`);
    }
    // Retry-After (seconds) wins; otherwise back off.
    await sleep(retryAfter ? Number(retryAfter) * 1000 : backoffMs(attempt));
  }
}

const url = new URL("https://www.socialcrawl.dev/v1/youtube/search");
url.searchParams.set("query", "javascript tutorial");
url.searchParams.set("type", "videos");
url.searchParams.set("label", "sponsored");
url.searchParams.set("relevance", "filter");

// Walk the list: send pagination.next_cursor back as cursor until has_more is false.
const MAX_PAGES = 10; // each page is one call
const items: unknown[] = [];
for (let page = 0; page < MAX_PAGES; page++) {
  const body = await socialcrawl(url);
  if (!body) break;
  items.push(...body.data.items);
  const next = body.pagination?.next_cursor;
  if (!body.pagination?.has_more || !next) break;
  url.searchParams.set("cursor", next);
}
console.log(`${items.length} items`);

Parameters worth sending

  • label=sponsored Marks each post that is paid or sponsored, at no extra credits; intent and niche are free too.
  • relevance=filter Drops rows that are not about your query, at no extra credits; relevance=score keeps them and adds a score.

Parameters

ParameterRequiredDescription
queryYesSearch keyword or phrase.
uploadDateNoUpload date filter. Reliable on its own (no `type`). With `type=shorts`, windows narrower than `this_year` are rejected with a 400 because YouTube returns an empty set for them; `this_year` is accepted but measured to return ~5x fewer unique Shorts across a paginated walk (the upstream re-serves the same items under an advancing `continuationToken`), so the recommended pattern for Shorts recency is no `uploadDate` at all plus `includeExtras=true` and a client-side filter on `post.published_at`. With other `type` values the upstream currently ignores the date filter and may mix content kinds; filter client-side there too. For an EXACT date window rather than these coarse buckets, use `/v1/youtube/search/advanced`, whose `published_after`/`published_before` take RFC-3339 bounds and are genuinely applied. (today | this_week | this_month | this_year)
sortByNoSort order: relevance or popular. `popular` cannot be combined with `type=shorts` (rejected with a 400. YouTube serves that combination unreliably); it also caps the page at ~20 results. It is also NOT a strict view-count sort: `popular` is a popularity-weighted ranking, and results do not come back in descending view order. Measured on 4 of 4 test keywords: a `new york` search returned 9.5M, then 502.9M, then 66K views in that order. If you need a view-faithful ordering, use `/v1/youtube/search/advanced` with `order=viewCount` and `includeExtras=true`: its ranking leads with the true top results, and the returned `engagement.views` lets you sort the page exactly client-side. (relevance | popular)
typeNoType of content to return. `type=channels` returns one page of about 20 channels, with `has_more: false` and no `next_cursor`, because the provider cannot continue a channel search (measured 25/10/2026); videos, shorts and playlists page normally. NOTE on Shorts results (`type=shorts`, and the Shorts an untyped search mixes in): the Shorts shelf item carries NO channel object upstream (0 of 98 items across 3 keywords on 10/08/2026, 25 of 25 without one on 26/09/2026, raw upstream; `includeExtras=true` does not add it). By default the free per-video lookup that supplies the exact date also fills `post.ext.channel_id` and `post.author.display_name` on those rows, at no extra credit. `post.author.username` (the @handle) and `post.author.avatar_url` stay null on them: send `include=engagement,channel` to fill both and the subscriber count. With `exact_dates=false` no lookup runs and the whole author stays null on Shorts. Video results are unaffected (20/20 carry the full author). `/v1/youtube/search/advanced` also carries `channel_id` on every result at 1 credit, though it has no Shorts filter. (videos | shorts | channels | playlists)
durationNoVideo duration filter. KNOWN UPSTREAM ISSUE: currently not applied by the provider and it can degrade the `type` filter; prefer filtering client-side on `post.content.duration_seconds`. (under_3_min | between_3_and_20_min | over_20_min)
regionNo2-letter country code of the country to put the proxy in.
continuationTokenNoContinuation token to get more results. Get `continuationToken` from a previous response.
includeExtrasNoSet to `true` to add the like count and comment count (`post.engagement.likes` / `.comments`) and the video description (`post.ext.description`) to each video result. Left off, those three are null. Dates do not need it: `post.published_at` is exact by default either way (see `exact_dates`). For Shorts results it additionally supplies `post.content.duration_seconds`, which those items never carry otherwise. Costs latency and page depth: measured 2387ms and 20 rows without, 9763ms and 16 rows with, on the same query. It does NOT add channel identity to Shorts results (see `type`) and it never adds a subscriber count. For both, send `include=engagement,channel` instead: the video join supplies every row's channel id, and the channel join adds the subscriber count, in this same call. For full per-video details use `/v1/youtube/video`.
includeNoSet to `engagement`, `channel`, or both (`engagement,channel`) to fill more of every row in this one call. `engagement` fills `post.engagement.views`, `.likes` and `.comments`, `post.content.duration_seconds`, `post.ext.channel_id` and `post.author.display_name` where the row lacks them, and replaces a date derived from a label such as "4 months ago" with the exact publish time (removing `post.ext.published_precision`). `channel` puts the channel's subscriber count on `post.ext.author_followers` (YouTube's own figure, which it rounds to three significant figures above 1,000) and fills the channel's `post.author.display_name`, `.avatar_url` and `.username` where missing. It also adds the country the channel's owner set, as an ISO 3166-1 alpha-2 code on `post.ext.author_country` (null when the channel sets none). Send both to cover rows that arrive without a channel id: the video join supplies it and the channel join then uses it. Each join costs 1 credit per distinct video or channel it filled, and never more than 5 per 50; ids that could not be filled are refunded. Channel and playlist result rows are not videos: the video join skips them. Each join adds 0.2 to 0.7 seconds on a fresh page (one lookup per 50 ids, never more than 8 seconds). Read `data.hydration` for the rows, lookups, credits held and kept, and the time.
exact_datesNoExact publish dates are on by default and free. A row whose date the upstream derived from a relative label such as "4 months ago" (measured up to four months off) is joined to the per-video lookup for its exact publish second, at no extra credit: one lookup per page (two on a page past 50 rows, side by side), adding about 0.2 to 0.7 seconds (never more than 3). The same lookup swaps the listing title, often YouTube's English machine translation, for the creator's own, and `computed.language` follows it; a title not swapped carries `post.ext.title_maybe_translated: true`. Set to `false` to skip the lookup: rows then carry the supplier's date estimate (a day-granular or coarser label truncated to midnight UTC), marked by `post.ext.published_precision` and `post.ext.published_label`, and the listing title, marked by `post.ext.title_maybe_translated`. A row the lookup could not resolve keeps those values and markers, and `_warnings` carries `exact_dates_partial` (some rows) or `exact_dates_unavailable` (none); on `channel/videos`, whose dates are already exact, the warnings are `original_titles_partial` and `original_titles_unavailable`. (true | false)
relevanceNoOptional. Without this param every row already carries computed.relevance against your query, free ({ p, sense, depth, spam }: is this row about what your query means, or a different thing that shares its words?), and nothing is dropped or reordered. score asks for it explicitly and waits for every row; filter also drops the rows that are not about your query, and lists their ids in data.relevance.dropped_ids. Your query is the topic; nothing to configure. A row that could not be judged is never dropped and carries relevance: null. Pagination is unchanged, so a filtered page can hold fewer rows. Free with your query as the topic; with relevant_to it adds 1 credit per started 25 newly judged rows (rows already judged for the same topic are free, and so is a cached page). (score | filter)
relevance_thresholdNoOptional, only with relevance. The probability (0 to 1) a row must reach to be kept by relevance=filter. Default 0.5. Lower keeps more rows, higher keeps fewer.
relevant_toNoOptional, only with relevance. Up to 200 characters describing what you mean, used as the topic instead of the query. Use it when the query is ambiguous, for example query=cleopatra with relevant_to=Cleopatra, the IGT slot game.
judgmentsNoOptional, on (the default) or off. By default every row gains free SocialCrawl judgments (computed.labels, and computed.relevance on search endpoints), reported in data.labels (mode default) and data.relevance (origin default), each with a status (complete, partial or skipped) and pending: the rows still being judged when the page was sent, which carry null now and are filled on your next call or cached read. Default judgments never add credits, never change an existing field, and never drop or reorder a row. off returns the page exactly as before, with none of those keys. label=none does the same. (on | off)
dry_runNoOptional. When 1, return a cost preview for this labelled or relevance-filtered request without fetching the page or judging any row. data.estimate reports rows_expected, rows_cached, label_credits_min, label_credits_max and base_credits. 0 credits charged. (1)
fitNoOptional. When goal, keep the rows and fields needed for the goal you pass in goal= (plus any that are uncertain, and the first and last), and replace the rest with a stub. data.held_back lists the held ids and a recall id that re-reads the full page from cache at no extra charge. Without this param the page is unchanged. (goal)
goalNoRequired by fit=goal. What you are trying to do, in your own words, up to 300 characters.
fit_tokensNoOptional, only with fit=goal. Soft cap on how much of the page to keep, in tokens. Uncertain blocks and the first and last block are kept even if they exceed it.
labelNoOptional CSV of SocialCrawl labels to add to every post. Without this param every page already carries sponsored, intent and niche, free; label= adds the labels you name to them (the defaults keep running). sponsored, intent and niche are free when asked for too; mention, quality, ai_style, intent with offer=, and injection add 1 credit per started 25 newly judged posts. judgments=off (or label=none) turns the default labels off. sponsored: is the post a paid or gifted promotion (p, 0 to 1), did it carry a disclosure marker such as #ad or 광고 (disclosed), is it likely paid with no marker (undisclosed), and which of the accounts it mentions does it promote (brand, or null). These are signals to review, never a finding. mention (needs brand=): is the post about that brand rather than something that shares its name (about_brand, 0 to 1), how it feels about the brand on five levels (sentiment_level 0 to 4 and sentiment_score 0 to 1, null when the post is not about the brand), is it sarcastic, which aspect it talks about (taste_or_quality, price_or_value, availability_or_delivery, health_or_safety, advertising_or_campaign, customer_service, none), and did the author buy or use it (first_hand). intent: what the author is mainly doing (label: asking_for_recommendation, comparing_options, switching_away, complaining, promoting, news_or_discussion, other, or null when unsure, with confidence), whether they read as a potential buyer rather than a seller (buyer, seller), how pressing the need is (urgency, 0 to 3), and, when you pass offer=, whether your offer would plausibly help them (fits_offer). niche: which of the 33 niches of the published taxonomy sc-niche-v1 the caption belongs to, or personal_no_niche, or other (label, confidence, taxonomy), with label null when the caption is too thin to tell or the pick is unsure. It reads the caption only, not the video. quality: how much checkable detail the caption carries (fact_density 0 to 3), whether it mainly asks for likes, replies, shares, follows or tags (engagement_bait, 0 to 1), whether it is written to provoke anger as a way to get engagement (rage_bait, 0 to 1; about the writing, never the side taken), whether it only repeats someone else's news or view (secondhand, 0 to 1), and what the post is mainly doing (post_aim: inform, opinion, sell, entertain, provoke, other). exclude=engagement_bait drops posts whose engagement_bait is 0.8 or higher. ai_style: writing patterns common in AI-generated text, judged on the text alone. It does not say who wrote the post, and a person who writes in this style is flagged too. Six patterns are judged, each a probability (0 to 1): binary_contrast ("This is not X. It's Y."), faux_insight ("Here's what nobody tells you" and throat-clearing openers), colon_reveal ("The best part: it learns."), profound_kicker (ends on an aphorism or mic-drop line), puffery ("marks a pivotal moment", "highlighting the importance of") and rhetorical_setup ("What if I told you", a question the post answers itself, "Not a X. Not a Y. A Z."). Four are counted in the text: slop_words (words and phrases such as delve, leverage, robust, game changer, at the end of the day), em_dashes, emoji_bullets (lines that start with an emoji or a symbol bullet) and one_line_paragraphs (paragraphs that are one short line). pattern_count is how many patterns are present (a judged pattern at 0.8 or higher, slop_words 1 or more, em_dashes 2 or more, emoji_bullets 2 or more, one_line_paragraphs 5 or more) and markers lists their names, comma-separated. A post with less than about eight words of text is only counted, with every judged pattern 0. The judged patterns read the first 400 and the last 150 characters of a long post, and the counts read the whole post. exclude=ai_style drops posts with 2 or more patterns. ai_written: how likely the post was written by an AI model, from SocialCrawl's own text classifier, reading the opening of the post (about 1,000 characters): p (0 to 1, calibrated), level (likely (p 0.95 or higher), possible (p 0.71 or higher) or unlikely) and model (the model name; a new name means a new scale). A post under 8 words is too short to read: p null, level too_short. It is a probability, not proof: a person can be flagged and an AI-written post can pass, and the shorter the post the less certain it is. exclude=ai_written drops likely posts. injection flags text that addresses an AI system and tries to direct it (flagged, p); it never drops or rewrites a row. A post that could not be judged carries labels: null. Posts already labelled for anyone are free, and so is a cached page. data.labels reports what was judged and billed.
excludeNoOptional CSV (engagement_bait, ai_style, ai_written). engagement_bait, only with label=quality, drops posts whose engagement_bait probability is 0.8 or higher. ai_style, only with label=ai_style, drops posts that show 2 or more of its writing patterns (pattern_count 2 or higher). ai_written, only with label=ai_written, drops posts whose level is likely (p 0.95 or higher), or whose p reaches your ai_written_threshold; a post too short to read is never dropped. Dropped posts are listed in data.labels.dropped_ids. A post that could not be judged is never dropped.
ai_written_thresholdNoOptional, only with label=ai_written and exclude=ai_written. The p (0 to 1) at which exclude=ai_written drops a post. Default 0.95 (level likely). 0.71 also drops possible posts: more AI posts go, and more posts by people with them.
brandNoRequired by label=mention, ignored otherwise. The brand or product the posts are judged against, up to 300 characters, for example brand=Buldak. Without it label=mention is skipped with the warning label_mention_needs_brand and is not billed.
brand_descriptionNoOptional, with label=mention. One plain sentence saying what the brand is, for example brand_description=Samyang's spicy instant noodle brand. Use it when the name is also an ordinary word or another company's name.
offerNoOptional, with label=intent. One or two plain sentences saying what you sell, up to 300 characters, for example offer=A web design agency that builds websites for small businesses. Adds fits_offer to every post; without it fits_offer is null.
label_evidenceNoOptional, only with label=. When 1, every labelled row also carries computed.labels_evidence.<preset> = { quote, sentence_index }: the sentence in the row that most clearly shows the label, copied verbatim. Absent or null when no single sentence shows it. (1)
sinceNoOnly rows published on or after this date: YYYY-MM-DD (midnight UTC) or an ISO 8601 timestamp. Rows older than it are left off each page. This list is not in date order, so the walk does not stop at the date: keep following `next_cursor`, and each page costs what a page costs even when every row on it is filtered out. A row with no date is kept. `published_after`, `start_date`, `from_date`, `publish_time` (`yesterday`, `this-week`, `this-month`, `last-3-months`, `last-6-months`) and `max_age_days` are accepted and applied as `since`.
untilNoOnly rows published on or before this date: YYYY-MM-DD (that whole UTC day is included) or an ISO 8601 timestamp. Newer rows are left off each page and the walk does not stop, so older pages follow. A row with no date is kept. `published_before`, `end_date` and `to_date` are accepted and applied as `until`.
min_viewsNoKeep only rows with at least this many views (`post.engagement.views`). A row whose view count is unknown is discarded, so every returned row meets the floor. Filtering runs on our side after each page is fetched, so every page walked is billed as usual; `data.walk.discarded` counts what was removed and why. Each page is its own entry in `GET /v1/credits/transactions`, under the page's request id listed in `data.walk.request_ids`.
max_age_daysNoKeep only rows published within this many days (`post.published_at`), 1 to 3650. A row with no date is discarded. Filtering runs on our side after each page is fetched, so every page walked is billed as usual; `data.walk.discarded` counts what was removed and why. Each page is its own entry in `GET /v1/credits/transactions`, under the page's request id listed in `data.walk.request_ids`.
sort_rowsNo`views`: return the kept rows ordered by view count, highest first, across every page walked. Rows without a view count go last. (views)
max_pagesNo1 to 50 (default 1, or 50 when `max_items` or `max_credits` is sent). Walk up to this many pages in one call and return the rows from all of them (after any filter). Each page walked is billed exactly as one call to this endpoint (a cached page is free) and counts against your rate limit; its charge and any refund are recorded under the page's own request id, listed in `data.walk.request_ids`. The walk stops early at the last page, or when the request's time budget runs low; `data.walk.stopped` says why (`end`, `max_pages`, `max_items`, `max_credits`, `time_budget`, `page_error`) and `pagination.next_cursor` continues from where it stopped.
max_itemsNo1 to 5000. Get more in one call: keep walking pages until the response holds at least this many rows (after any filter), then stop with `data.walk.stopped: "max_items"`. The last page is returned whole (it was billed), so `data.items` can hold up to one page more than this, and `pagination.next_cursor` resumes right after it without skipping a row. Walks up to 50 pages unless `max_pages` says fewer; each page is billed as one call (a cached page is free). Add `max_credits` to cap the spend. A long walk can stop on the time budget first (`"time_budget"`): send the returned cursor with the same params to continue.
max_creditsNo1 to 100000. The most this call may spend, across every page it walks. A page starts only while the credits already spent plus that page's price (or, when higher, the most any page of this walk has cost) still fit, so the call never goes past it; the walk then stops with `data.walk.stopped: "max_credits"` and the cursor to resume. Sent alone, it walks as far as the budget goes (up to 50 pages). A value below the price of one page is a free 400 whose `error.details.page_credits` names that price. Credits a row join (`include=`) adds are known only once a page has run, so page 1 is checked against its own price.
seenNoAn id you choose (1 to 64 letters, digits, `.`, `_` or `-`). Rows your account already received under the same `seen` id are removed from the page, and the page price falls with the share of repeats: page credits x new rows / rows on the page, rounded up, so a page of nothing but repeats is free. Only the page's own price is discounted: credits for joined data (`include=`) are charged only for rows you have not received, and are never discounted. The memory lasts 24 hours from the last call that used the id, holds row ids only, and is private to your account. Use one id across a set of related searches; `data.walk.repeats` counts what was removed.
Example Response

What does the YouTube Search API return?

Every response follows one unified schema. Here is a real, unmodified response body, so you can see the exact fields you get back before spending a credit.

Example response
{
  "success": true,
  "platform": "youtube",
  "endpoint": "/v1/youtube/search",
  "data": {
    "items": [
      {
        "post": {
          "id": "W6NZfCO5SIk",
          "url": "https://www.youtube.com/watch?v=W6NZfCO5SIk",
          "content": {
            "text": "Sample comment text (redacted).",
            "media_urls": null,
            "thumbnail_url": "https://i.ytimg.com/vi/W6NZfCO5SIk/hq720.jpg?sqp=-oaymwEnCNAFEJQDSFryq4qpAxkIARUAAIhCGAHYAQHiAQoIGBACGAY4AUAB&rs=AOn4CLBAlzpYlr0w53HlpbOkOxXqVe137g",
            "duration_seconds": 2897
          },
          "author": {
            "username": "user_25043d",
            "display_name": "user_5ad2fb",
            "avatar_url": "https://example.com/avatars/user_429502.png",
            "verified": null
          },
          "engagement": {
            "views": 15344643,
            "likes": null,
            "comments": null,
            "shares": null,
            "saves": null
          },
          "flags": {
            "nsfw": null,
            "spoiler": null,
            "pinned": null,
            "deleted": false
          },
          "published_at": "2018-04-24T02:37:33.000Z",
          "ext": {
            "content_type": "video",
            "description": null,
            "channel_id": "UCWv7vMbMWH4-V0ZXdmDpPBA",
            "published_label": "8 years ago"
          }
        },
        "computed": {
          "engagement_rate": null,
          "language": "en",
          "content_category": "other",
          "estimated_reach": 18413572,
          "relevance": {
            "p": 0.97,
            "sense": "target",
            "depth": 2.96,
            "spam": 0.06
          },
          "labels": {
            "sponsored": {
              "p": 0.03,
              "disclosed": false,
              "undisclosed": false,
              "brand": null
            },
            "intent": {
              "label": "promoting",
              "confidence": 0.97,
              "buyer": false,
              "seller": 0.84,
              "fits_offer": null,
              "urgency": 0.15
            },
            "niche": {
              "label": "technology",
              "confidence": 1,
              "taxonomy": "sc-niche-v1"
            }
          }
        }
      },
      {
        "post": {
          "id": "EerdGm-ehJQ",
          "url": "https://www.youtube.com/watch?v=EerdGm-ehJQ",
          "content": {
            "text": "Sample comment text (redacted).",
            "media_urls": null,
            "thumbnail_url": "https://i.ytimg.com/vi/EerdGm-ehJQ/hq720.jpg?sqp=-oaymwEnCNAFEJQDSFryq4qpAxkIARUAAIhCGAHYAQHiAQoIGBACGAY4AUAB&rs=AOn4CLAcTFrvMm74ZMBst8pu_4oMw65A2w",
            "duration_seconds": 80157
          },
          "author": {
            "username": "user_323c9b",
            "display_name": "user_0595e9",
            "avatar_url": "https://example.com/avatars/user_ff68e3.png",
            "verified": null
          },
          "engagement": {
            "views": 9706193,
            "likes": null,
            "comments": null,
            "shares": null,
            "saves": null
          },
          "flags": {
            "nsfw": null,
            "spoiler": null,
            "pinned": null,
            "deleted": false
          },
          "published_at": "2024-05-09T07:28:14.000Z",
          "ext": {
            "content_type": "video",
            "description": null,
            "channel_id": "UCB6dvaWu0N8uVq2yKsZ5s5g",
            "published_label": "2 years ago"
          }
        },
        "computed": {
          "engagement_rate": null,
          "language": null,
          "content_category": "education",
          "estimated_reach": 11647432,
          "relevance": {
            "p": 0.97,
            "sense": "target",
            "depth": 2.99,
            "spam": 0.08
          },
          "labels": {
            "sponsored": {
              "p": 0.03,
              "disclosed": false,
              "undisclosed": false,
              "brand": null
            },
            "intent": {
              "label": "promoting",
              "confidence": 0.97,
              "buyer": false,
              "seller": 0.8,
              "fits_offer": null,
              "urgency": 0.04
            },
            "niche": {
              "label": "technology",
              "confidence": 1,
              "taxonomy": "sc-niche-v1"
            }
          }
        }
      }
    ],
    "next_cursor": "sc1.eyJjIjoiRXFzREVoTnFZWFpoYzJOeWFYQjBJSFIxZEc5eWFXRnNHcEFEUldkSlVVRlZaMVZuWjBWTVZucGFUMWR0V2tSVWVsWlVVMWQxUTBGUmRFWmFXRXByVWpJd2RGcFhhRXRWV1VsQ1F6SjRiV0pYWTNSU1ZXODBXakl3TUdkblJVeFZSM1JoVkcwNE0xUlZXazlTYldWRFFWRjBjMkV3YkVkU2FsSjBXVlYwVGxaWlNVSkRNMmhNVkROc1JWSklWbEpWTVZwYVoyZEZURkp1VW1oVlZrNXJZMjEzTTFkVlIwTkJVWFJWWVZjNU5GWlVRak5hUlRGU1dqUkpRa013Vm0xUlYzYzFXVzVrTmxac2NISm5aMFZNVTFkb05VMUdSalpoVlhoRldtcERRMEZSZERKaU1IaExUVEJPZEZsVk1IaGpORWxDUXpCV2JHSnVXakpWYTA1cVZtMTNNR2RuUlV4a1YyY3dXakJqTTFSSFNrVlZSa2REUVZGMGIxcEZhM2xaYmtaUVlXNXJlbGswU1VKRE0wcE5WVWhrUkZGWVJqVlJNRVpHWjJkRlRHSlZjRlZhVlZvMFZUSldiMVJyUjBOQlVYUTJZakphVG1KdGVITmhNVnB0VTFsSlFrTXphR3BOTWtabVVUQndiMkZyVG1wblowVk1URmh3VFZKWE9XMVNiVVUxV0RCdFEwRlJkRmxUVlRsTlkxYzVVVk5GVGt0T1RFbENRbWR2UlVOQ1VWRkJaeVV6UkNVelJLQUNCQmlCNE9nWUlndHpaV0Z5WTJndFptVmxaQSUzRCUzRCIsInMiOlsiVzZOWmZDTzVTSWsiLCJFZXJkR20tZWhKUSIsImxmbWctRUo4Z200IiwiUGtaTm83TUZORmciLCJsa0lGRjRtYUtNVSIsInhLT3lERHVRU1ZZIiwiRnRhUVNkcmw3WUEiLCJUaW94VTB3ZE1RZyIsIkVmQWw5Ynd6VlprIiwiSWh5MFF6aUxEZjAiLCJ2b0xKM0NtYU0xcyIsIkVlbnZ2UkNjVmw0IiwidWg0Z0c3TGJEUFEiLCJoZEkyYnFPankzYyIsInJMUHdDQXF5Q0FFIiwibUpUZUZ4U2VoTkEiLCJ6b2ZNbmxsa1ZmSSIsInhjM2FfQ0poakNjIiwiLXpMRW9mRmE5X0kiLCJYSU9McW9QSENKNCJdfQ",
    "total": null,
    "relevance": {
      "mode": "score",
      "topic_source": "query",
      "rows": 20,
      "scored": 20,
      "cached": 13,
      "kept": 20,
      "dropped": 0,
      "dropped_ids": [],
      "unjudged": 0,
      "too_short": 0,
      "threshold": 0.5,
      "extra_credits": 0,
      "methodology_version": "relevance/2",
      "origin": "default",
      "pending": 0,
      "pending_ids": [],
      "status": "complete"
    },
    "labels": {
      "presets": [
        "sponsored",
        "intent"
      ],
      "rows": 20,
      "labelled": 20,
      "cached": 13,
      "skipped": 0,
      "unjudged": 0,
      "dropped": 0,
      "dropped_ids": [],
      "extra_credits": 0,
      "methodology_version": "labels/1",
      "mode": "default",
      "status": "complete",
      "pending": 0,
      "pending_ids": []
    },
    "dropped": 0
  },
  "credits_used": 1,
  "request_id": "req_example000000",
  "cached": false,
  "pagination": {
    "next_cursor": "sc.eyJ2IjoyLCJjIjoic2MxLmV5SmpJam9pUlhGelJFVm9UbkZaV0Zwb1l6Sk9lV0ZZUWpCSlNGSXhaRWM1ZVdGWFJuTkhjRUZFVWxka1NsVlZSbFphTVZadVdqQldUVlp1Y0dGVU1XUjBWMnRTVldWc1dsVlZNV1F4VVRCR1VtUkZXbUZYUlhCeVZXcEpkMlJHY0ZoaFJYUldWMVZzUTFGNlNqUmlWMHBZV1ROU1UxWlhPREJYYWtsM1RVZGtibEpWZUZaU00xSm9Wa2N3TkUweFVsWlhhemxUWWxkV1JGRldSakJqTWtWM1lrVmtVMkZzU2pCWFZsWXdWR3hhV2xOVlNrUk5NbWhOVmtST2MxSldTa2xXYkVwV1RWWndZVm95WkVaVVJrcDFWVzFvVmxack5YSlpNakV6VFRGa1ZsSXdUa0pWV0ZKV1dWWmpOVTVHV2xWUmFrNWhVbFJHVTFkcVVrcFJhMDEzVm0weFVsWXpZekZYVnpWclRteGFjMk5JU201YU1GWk5WVEZrYjA1Vk1VZFNhbHBvVmxob1JsZHRjRVJSTUVaU1pFUkthVTFJYUV4VVZFSlBaRVpzVmsxSWFHcE9SV3hEVVhwQ1YySkhTblZYYWtwV1lUQTFjVlp0TVROTlIyUnVVbFY0YTFZeVkzZFhha0pxVFRGU1NGTnJWbFpTYTJSRVVWWkdNR0l4Y0VaaE0yeGFZbXRhVVZsWE5YSmxiR3N3VTFWS1JFMHdjRTVXVldoclVrWkdXVkpxVmxKTlJWcEhXakprUmxSSFNsWmpSbFpoVmxadk1GWlVTbGRpTVZKeVVqQk9RbFZZVVRKWmFrcGhWRzFLZEdWSVRtaE5WbkIwVlRGc1NsRnJUWHBoUjNCT1RXdGFiVlZVUW5kaU1rWnlWRzF3Ymxvd1ZrMVVSbWgzVkZaS1dFOVhNVk5pVlZVeFYwUkNkRkV3UmxKa1JteFVWbFJzVGxreFl6VlZWazVHVkd0MFQxUkZiRU5SYldSMlVsVk9RMVZXUmtKYWVWVjZVa05WZWxKTFFVTkNRbWxDTkU5bldVbG5kSHBhVjBaNVdUSm5kRnB0Vm14YVFTVXpSQ1V6UkNJc0luTWlPbHNpVnpaT1dtWkRUelZUU1dzaUxDSkZaWEprUjIwdFpXaEtVU0lzSW14bWJXY3RSVW80WjIwMElpd2lVR3RhVG04M1RVWk9SbWNpTENKc2EwbEdSalJ0WVV0TlZTSXNJbmhMVDNsRVJIVlJVMVpaSWl3aVJuUmhVVk5rY213M1dVRWlMQ0pVYVc5NFZUQjNaRTFSWnlJc0lrVm1RV3c1WW5kNlZscHJJaXdpU1doNU1GRjZhVXhFWmpBaUxDSjJiMHhLTTBOdFlVMHhjeUlzSWtWbGJuWjJVa05qVm13MElpd2lkV2cwWjBjM1RHSkVVRkVpTENKb1pFa3lZbkZQYW5rell5SXNJbkpNVUhkRFFYRjVRMEZGSWl3aWJVcFVaVVo0VTJWb1RrRWlMQ0o2YjJaTmJteHNhMVptU1NJc0luaGpNMkZmUTBwb2FrTmpJaXdpTFhwTVJXOW1SbUU1WDBraUxDSllTVTlNY1c5UVNFTktOQ0pkZlEiLCJlIjoieW91dHViZS9zZWFyY2giLCJwIjoiY29udGludWF0aW9uVG9rZW4ifQ",
    "has_more": true,
    "page_size": 20
  },
  "credits_remaining": 9999,
  "source": "captured",
  "captured_at": "2026-10-02T07:23:05.586Z",
  "redacted": true
}

Live sample illustrating the unified response shape. Field values reflect the record you query.

API Details

How does the YouTube Search API work?

Send a GET request with your API key and get back clean, structured JSON in our unified schema. Supported computed fields are populated when the source provides the required inputs.

Method

GET

Response

JSON

Why SocialCrawl

Why use SocialCrawl for YouTube Search data?

We handle the complexity of YouTube data extraction so you can focus on building. Unified schema, AI enrichment, and zero platform logic in your code.

Developer First

How do you scrape social media data in seconds?

The fastest social media scraping API for developers. Scrape profiles, posts, comments, and analytics from 69 platforms covering 10B+ monthly active users.

One schema, every platform

Query 69 platforms with identical response structures. Write your integration once.

Computed fields, not just scraped

When an endpoint supports these metrics and the source provides the required inputs, the normalized record includes engagement_rate, estimated_reach, content_category, and language. Ready to use.

See your data before you code

Visual Data Explorer. Paste any URL, get rich result cards, sortable tables, CSV export.

import requests

response = requests.get(
    'https://www.socialcrawl.dev/v1/tiktok/profile',
    params={'handle': 'charlidamelio'},
    headers={'x-api-key': 'sc_YOUR_API_KEY'}
)
data = response.json()
[ .JSON ]
{
  "success": true,
  "platform": "tiktok",
  "data": {
    "author": {
      "username": "charlidamelio",
      "followers": 152400000
    },
    "engagement": {
      "likes": 12400000000,
      "engagement_rate": 0.087
    },
    "metadata": {
      "language": "en",
      "content_category": "lifestyle"
    }
  }
}
+ 69 platforms
FAQ

Have a question? We got answers

Find answers to frequently asked questions about SocialCrawl's API, pricing, and capabilities.

Contact us
How do I search YouTube with a keyword via API?
Send a GET request to /v1/youtube/search with query=your keyword. The response is a list of matching videos with titles, view counts, channel info, thumbnails, and publish dates. Add include=engagement for like and comment counts, the duration and the exact publish time, and include=channel for each channel's subscriber count.
Can I filter search results by upload date?
Yes. Pass uploadDate=today, this_week, this_month, or this_year to narrow results. Combine with sortBy=popular to find the most-viewed videos uploaded this week, for example.
How do I only search for YouTube Shorts?
Pass filter=shorts in the query parameters. Note the filter only works when you search by keyword. It's incompatible with uploadDate and sortBy, which apply to long-form results.
Can I search from a specific country's perspective?
Yes. Pass region=US, region=KR, region=GB, or any 2-letter country code to route the request through a proxy in that country. This surfaces regionally ranked results.
Do I need the YouTube Data API for search?
No. SocialCrawl's search endpoint does not consume Google Cloud quota and does not require an API key from Google. One key, one endpoint, 1 to 19 credits per request, no OAuth.

Ask AI about SocialCrawl

Ready to scrape YouTube Search data?

Get your API key and start pulling YouTube data in under 60 seconds.

Start for free

🤖 AI agent or LLM? Read this page as markdown