ssh.autos

Catalog / Social, content & reviews

SOCIAL, CONTENT & REVIEWS

YouTube Search: Videos, Shorts, Channels & Playlists

Scrape YouTube search results for any keyword: rank, title, channel, views, upload age, length and badges for videos, Shorts, channels and playlists.

PER CALL · X402 / MPP Not yet Not available per call yet. Use the Apify actor meanwhile. Ask for it per call
APIFY STORE Public actor From $0.002 per item. Open on Apify

Input options

FieldTypeDescriptionDefault
country string Two-letter country code for the search market, for example GB or DE: the results YouTube shows in that country. If left unset, uses US.
duration string Only videos of this length. Empty applies no length filter. For videos or all result types.
features array Only videos with all the selected features, as in YouTube's filter menu. Empty applies no feature filter.
language string YouTube interface language, for example en, es or de. If left unset, uses en. Titles are never translated.
maxItems integer Hard total across all searches, so you control the cost, for example 200. If left unset, uses 1000. 1000
maxPages integer Safety limit for result pages per search, for example 10. If left unset, uses 50. YouTube can end a search sooner. 50
maxResultsPerQuery integer How many results to collect for each search, for example 50. If left unset, uses 20 (5 for the empty-input example).
publishedAfter string Only videos published on or after this date: 2026-10-01, or a relative value such as 7 days or 6 months. Read from the upload age YouTube shows ("3 weeks ago"), so it is approximate; a video just before the date can be kept, a newer one is never dropped.
searchQueries array Same as Search terms; both lists are combined with duplicates removed, for example beginner guitar.
searchTerms array Words to search, one per line, for example python tutorial. A pasted YouTube search-results link also works. Empty input runs a five-result example.
sort string Relevance (YouTube's default order) or popularity. Popularity is YouTube's own ranking, not a strict view-count sort. If left unset, uses relevance.
startUrls array The common startUrls input format of other YouTube Actors: plain links or {"url": "…"} objects, for example [{"url": "https://www.youtube.com/results?search_query=python+tutorial"}]. Each search-results link runs as that search. Combined with the search terms above, duplicates removed.
type string Videos, Shorts, channels, playlists or every result type YouTube shows. If left unset, uses videos.
uploadDate string Only videos uploaded in the last day, week, month or year, as in YouTube's filter menu. Empty applies no date filter. For videos, Shorts or all result types.

Output schema

FieldTypeDescription
badges array
channelId string, null
channelName string, null
duration integer, null
durationText string, null
isLive boolean
isShort boolean
playlistId string, null
publishedAtEstimate string, null Approximate UTC upload time derived from the visible label; never an exact publication timestamp. Null for unsupported labels/languages.
publishedAtIsEstimate boolean
publishedText string, null
query string
rank integer
scrapedAt string
thumbnailUrl string, null
title string, null
type string
url string
videoId string, null
viewCount integer, null

About this data

Scrape YouTube search results for any keyword: rank, title, channel, views, upload age, length and badges for videos, Shorts, channels and playlists. Use YouTube's own filters (upload date, length, 4K, live, Creative Commons), sort by popularity, set the country. No login or API key.

Run it on Apify

This data source is a public actor on the Apify Store: YouTube Search Scraper: Videos, Shorts, Channels & Playlists. Run it with your Apify account and plan for larger, scheduled or exported runs.

Run command

# MCP prompt for Claude/Cursor/Muse
Use the Apify connector to run automatic/youtube-search-scraper with the input schema defined on Apify.

# Apify CLI / curl
apify call automatic/youtube-search-scraper -i '{"country":{"description":"Two-letter country code for the search market, for example GB or DE: the results YouTube shows in that country. If left unset, uses US.","editor":"textfield","sectionCaption":"Country and language","title":"Country","type":"string"},"duration":{"description":"Only videos of this length. Empty applies no length filter. For videos or all result types.","editor":"select","enum":["short","medium","long"],"enumTitles":["Under 3 minutes","3–20 minutes","Over 20 minutes"],"title":"Length","type":"string"},"features":{"description":"Only videos with all the selected features, as in YouTube's filter menu. Empty applies no feature filter.","editor":"select","items":{"enum":["live","4k","360","vr180","creative_commons"],"enumTitles":["Live now","4K","360°","VR180","Creative Commons"],"type":"string"},"title":"Features","type":"array"},"language":{"description":"YouTube interface language, for example en, es or de. If left unset, uses en. Titles are never translated.","editor":"textfield","title":"Interface language","type":"string"},"maxItems":{"default":1000,"description":"Hard total across all searches, so you control the cost, for example 200. If left unset, uses 1000.","editor":"number","maximum":10000,"minimum":1,"sectionCaption":"Advanced limits","title":"Maximum rows per run","type":"integer"},"maxPages":{"default":50,"description":"Safety limit for result pages per search, for example 10. If left unset, uses 50. YouTube can end a search sooner.","editor":"number","maximum":100,"minimum":1,"title":"Maximum pages per search","type":"integer"},"maxResultsPerQuery":{"description":"How many results to collect for each search, for example 50. If left unset, uses 20 (5 for the empty-input example).","editor":"number","maximum":5000,"minimum":1,"prefill":10,"title":"Results per search term","type":"integer"},"publishedAfter":{"description":"Only videos published on or after this date: 2026-10-01, or a relative value such as 7 days or 6 months. Read from the upload age YouTube shows (\"3 weeks ago\"), so it is approximate; a video just before the date can be kept, a newer one is never dropped.","editor":"textfield","title":"Published after","type":"string"},"searchQueries":{"description":"Same as Search terms; both lists are combined with duplicates removed, for example beginner guitar.","editor":"stringList","items":{"maxLength":500,"type":"string"},"maxItems":100,"title":"Search terms (alias)","type":"array"},"searchTerms":{"description":"Words to search, one per line, for example python tutorial. A pasted YouTube search-results link also works. Empty input runs a five-result example.","editor":"stringList","items":{"maxLength":500,"type":"string"},"maxItems":100,"prefill":["python tutorial"],"title":"Search terms","type":"array"},"sort":{"description":"Relevance (YouTube's default order) or popularity. Popularity is YouTube's own ranking, not a strict view-count sort. If left unset, uses relevance.","editor":"select","enum":["relevance","popularity"],"enumTitles":["Relevance","Popularity"],"title":"Sort by","type":"string"},"startUrls":{"description":"The common startUrls input format of other YouTube Actors: plain links or {\"url\": \"…\"} objects, for example [{\"url\": \"https://www.youtube.com/results?search_query=python+tutorial\"}]. Each search-results link runs as that search. Combined with the search terms above, duplicates removed.","editor":"json","maxItems":100,"title":"Search links (startUrls format)","type":"array"},"type":{"description":"Videos, Shorts, channels, playlists or every result type YouTube shows. If left unset, uses videos.","editor":"select","enum":["video","shorts","channel","playlist","all"],"enumTitles":["Videos","Shorts","Channels","Playlists","All result types"],"sectionCaption":"Search filters","title":"Result type","type":"string"},"uploadDate":{"description":"Only videos uploaded in the last day, week, month or year, as in YouTube's filter menu. Empty applies no date filter. For videos, Shorts or all result types.","editor":"select","enum":["today","week","month","year"],"enumTitles":["Today","This week","This month","This year"],"title":"Upload date","type":"string"}}'

Open on Apify

Machine-readable: openapi.json · llms.txt

Some links to Apify are affiliate links. We may earn a commission if you sign up and become a paying customer.