The YouTube Ads API on AdScrape gives you the same data the dashboard renders, exposed as a small REST surface. Every call returns JSON with consistent envelopes — there are no XML or form-encoded responses. YouTube-specific endpoints, auth, and credit rules.
- REST + JSONUTF-8 JSON in/out. Errors and success share one envelope shape.
- Brand & keyword searchQuery by VidTao brand_id, channel name, or free-text keyword across creatives.
- Per-key analyticsEvery call logged with endpoint, status, latency, and credits spent.
- Pay per ad returned1 credit / ad delivered. Empty pages are free — terminate cleanly.
- Managed VidTao backendAdScrape signs into VidTao and refreshes Firebase tokens for you.
- Soft launchYouTube routes are preview today — billing flips on at GA.
- 1. Create a key. Settings → API Keys → Create. Copy the
sk_live_…once — you won't see it again. - 2. Probe status. Hit
GET /api/v1/youtube/status— a 200 means VidTao is configured server-side and you're good to scrape. - 3. Fire your first search. Returns ranked creatives + a
session_tokenyou can drain page-by-page.
curl -X POST https://api.adscrape.in/api/v1/youtube/search \
-H "X-API-Key: sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"query":"nike","max_results":25}'Every billable endpoint requires a key in the X-API-Key header. Bearer JWT works too if you're calling from a logged-in dashboard. Keys are scoped per user, support per-key RPM overrides, and revoke instantly from Settings → API Keys.
curl -X POST https://api.adscrape.in/api/v1/youtube/search \
-H "X-API-Key: sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"query":"nike"}'AdScrape bills in credits backed by a transparent USD rate. New accounts get 10 free credits. Every charge lands in your ledger at Settings → Billing.
POST /api/v1/youtube/searchper ad returned$0.05 / adCharged only for delivered creatives. Empty results cost 0.
POST /api/v1/youtube/suggestionsper result block$0.01 / suggestionBrand typeahead. Cached 1h on (query, region) — cache hits are free.
GET /api/v1/youtube/statusfree—Service health probe. Always free.
Rate limits are per API key, evaluated in 60-second windows. Bursting beyond the cap returns HTTP 429 with a Retry-After header. Plans inherit the master AdScrape limits — there is no separate YouTube tier.
- Free
30Enough for ad-hoc tests + 10 free credits.
- Starter
60Solo marketers and side projects.
- Growth
120Agencies running multiple brands in parallel.
- Scale
600Pipelines, dashboards, and bulk research.
Errors share one envelope shape: { "detail": "...", "code": "..." }. Treat any non-2xx as a no-charge — credits are debited only after the response is successfully streamed.
400validation_errorBody or query failed Pydantic validation. The detail field names the offending field.
401missing_keyNo X-API-Key header and no valid JWT cookie.
402insufficient_creditsWallet would go negative — top up or upgrade plan.
429rate_limitedPer-minute cap exceeded. Honour Retry-After.
502upstream_errorVidTao returned a transient error. Retry with backoff.
503service_unavailableVidTao session not yet authenticated server-side. Check /youtube/status.
/api/v1/youtube/search 1 credit / adScrape YouTube ad creatives via VidTao. Pass a brand_id for the cleanest results, or a free-text query for advertiser-name fuzzy matching.
queryoptionalstringFree-text advertiser/keyword. One of query or brand_id required.brand_idoptionalstringVidTao brand identifier from /youtube/suggestions.max_resultsoptionalintegerMax creatives returned (1–100). Playground is clamped to 5.Defaults to25.regionoptionalstringISO 3166-1 alpha-2 country code to scope creatives.Defaults to"US".session_tokenoptionalstringPass back to /search to paginate the same session.
curl -X POST https://api.adscrape.in/api/v1/youtube/search \
-H "X-API-Key: sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"query":"nike","max_results":25,"region":"US"}'{
"summary": { "count": 24, "region": "US", "query": "nike" },
"ads": [
{
"ad_archive_id": "yt_abc123",
"advertiser": "Nike",
"channel_id": "UCUF...",
"title": "Just Do It — Spring 2026",
"format": "skippable_in_stream",
"duration_sec": 30,
"first_seen": "2026-03-14T08:21:00Z",
"video_url": "https://api.adscrape.in/m/yt_abc123.mp4"
}
],
"session_token": "yt_sess_5f8e...",
"has_more": true
}/api/v1/youtube/suggestions 1 credit / batchResolve a partial advertiser string to VidTao brand_ids. Use the brand_id from this response for the cleanest /search results.
queryrequiredstring1–60 chars. The partial brand name to expand.limitoptionalintegerMax suggestions to return (1–20).Defaults to5.
curl -X POST https://api.adscrape.in/api/v1/youtube/suggestions \
-H "X-API-Key: sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"query":"nik","limit":5}'{
"suggestions": [
{ "brand_id": "vt_nike", "name": "Nike", "verified": true, "country": "US" },
{ "brand_id": "vt_nikon", "name": "Nikon", "verified": true, "country": "JP" },
{ "brand_id": "vt_nikola", "name": "Nikola Motors", "verified": false, "country": "US" }
],
"cached": false
}/api/v1/youtube/status freeHealth probe. Confirms the server has working VidTao credentials before you spend credits.
{
"ok": true,
"vidtao_authenticated": true,
"last_token_refresh": "2026-05-16T08:00:00Z"
}Next steps
The dashboard, your keys, and your billing live one tab away.