YouTube Search API — Videos, Channels & Playlists
Pricing
$2.00 / 1,000 successful youtube search requests
YouTube Search API — Videos, Channels & Playlists
Scrape YouTube search results by keyword. Extract videos, channels, playlists, Shorts shelves, views and thumbnails. Filters, country/language settings and pagination. Pay per successful request, not result.
Pricing
$2.00 / 1,000 successful youtube search requests
Rating
0.0
(0)
Developer
Gaurav Kumar Choudhary
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
9 hours ago
Last modified
Categories
Share
At a glance
- Collect: YouTube search cards for videos, channels or playlists.
- Input: use the runnable example below or the prefilled Input form.
- Output: the default dataset supports JSON/CSV/Excel export; see output modes below.
- Billing: $2 per 1,000 successful search-page requests, with all returned cards included. No startup fee. Platform usage may be additional.
- Limits: Search metadata is not full video enrichment. No video downloads, transcript extraction or full comments.
Search YouTube by keyword and export structured video, channel and playlist search results. Research content topics, discover creators, compare search visibility and build automated data pipelines without supplying a YouTube Data API key or proxy configuration.
Pricing: $2 per 1,000 successful requests
One successful search-page request costs $0.002, with all returned results included. No startup fee and no extra per-video charge. Each additional successful pagination request costs another $0.002. Valid searches with zero matches are still successful billable requests; invalid inputs and failed fetches are not charged by this Actor. Apify platform charges, if applicable, are separate.
Example: 100 requests returning 20 video rows each cost $0.20 for 2,000 videos. Counts vary, so this is an illustration, not a result-count guarantee.
Quick start
{"queries":["python tutorial","budget travel"],"maxRequests":2,"maxPagesPerQuery":1,"hl":"en","gl":"us"}
For channel discovery use searchPreset: "channels"; for playlist search use "playlists". Sorting and date, duration, quality or live filters are available as presets. Select one preset at a time; advanced combinations require a valid YouTube sp token. Tokens can change and YouTube may silently ignore outdated filters.
Compact video mode
{"queries":["python tutorial"],"num":30,"maxRequests":1}
Get up to 30 videos in a single request. Compact mode cannot combine with any filter preset, sp, or multiple pages. It omits mixed channel/playlist/Shorts cards, snippets and pagination; view counts may be rounded. Fewer videos can be returned when the feed runs out. truncated flags internal truncation when reported.
Standard mode and pagination
Omit num for standard search metadata and mixed results. Increase maxPagesPerQuery to follow continuation pages, or resume one keyword using sp from SUMMARY.pages[].nextPageToken. The global maxRequests cap includes failed attempts and prevents unbounded paging. Duplicate keywords and duplicate rows within the same result bucket across pages are skipped.
Output
The default dataset contains one row per returned item. Export JSON, CSV, Excel or XML using Apify. Fields include query, recordType, sourceBucket, title, link, video_id, views, views_original, length, published_date, description, channel, thumbnail, subscribers, video_count, live, page, fetchedAt and metadataMode. Fields depend on the result type and may be null.
SUMMARY in the default key-value store records request counts, row counts, per-page continuation tokens, truncation, safe failure messages and budget stopping. Recommendation shelves are included by default; ads are opt-in. Shorts shelves appear only when YouTube supplies them.
API and automation
Call this Actor through Apify's API with its Actor ID or gauravlabs~youtube-search-api. Integrate dataset exports into n8n, Make, Zapier or your own scripts. Schedule runs in Apify to track the same keywords over time.
Scope and limitations
This is a keyword search scraper, not a full channel crawler, video-details extractor, complete playlist downloader, comments API, transcript API or media downloader. Channel and playlist results are search cards, not complete inventories. Captions filtering finds captioned videos; it does not extract transcripts. No likes or comment counts are promised. Search snippets are not full video descriptions. Results change with locale, time and YouTube experiments; availability and ordering are not guaranteed. Relative published dates remain localized text. No lifetime free-account quota is advertised or implemented.
Support and custom use cases
Open an Actor issue or contact Gaurav Labs through the developer profile for setup help, custom workflows, additional data sources or specific business requirements. Include your run ID and non-sensitive input. Never post credentials.
Independent tool; not affiliated with, endorsed by or an official API of YouTube or Google. Use public data responsibly and comply with applicable terms and laws.
Minimal API example
Store your own Apify token in APIFY_TOKEN; never paste it into public input or code. This example uses the same small input as the prefilled form.
import osimport requestsresponse = requests.post("https://api.apify.com/v2/acts/gauravlabs~youtube-search-api/run-sync-get-dataset-items",headers={"Authorization": "Bearer " + os.environ["APIFY_TOKEN"]},json={"queries":["python tutorial"]},timeout=300,)response.raise_for_status()print(response.json())
For large batches, start an asynchronous run with /runs, wait for its final status, and retrieve its default dataset. HTTP success when starting a run does not prove the extraction succeeded.
Minimal output shape (illustrative)
The following shows one documented field, not a fresh result or a promised yield. Inspect the output reference above for the complete schema.
{"metadataMode": "standard"}
Practical workflow and accuracy notes
Creator discovery: use searchPreset: "channels". Video research: use standard search for richer cards or num for compact videos. Playlist discovery: use searchPreset: "playlists". views_original preserves available source text and may be rounded; search metadata is not verified current channel/video analytics.