Social Media
YouTube Search
Search YouTube and get structured results — videos, shorts, channels, and playlists — with rich filters and cursor pagination, as JSON.
POST/api/v1/youtube/search
Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your Scavio API key (e.g. Bearer sk_live_your_key).
Body
application/jsonsearchstringrequiredSearch query (sent as search).
Example: lofi hip hop
upload_dateenum<string>Filter by recency: last_hour, today, this_week, this_month, this_year.
typeenum<string>Filter by result type: video, channel, playlist, movie.
durationenum<string>Filter by duration: short, medium, long.
sort_byenum<string>Sort order: relevance, date, view_count, rating.
featuresarray<string>Restrict results to videos with these features. Pass one or more of:
hd— HD videos only.4k— 4K videos only.subtitles— Videos with subtitles/CC only.creative_commons— Creative Commons licensed videos only.live— Live videos only.360— 360-degree videos only.3d— 3D videos only.hdr— HDR videos only.vr180— VR180 videos only.
cursorstringPagination cursor from a previous response (next_cursor). Keep passing it while has_more is true.
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
results = client.youtube.search("lofi hip hop", features=["hd"])
print(results)Response
"shorts": [],
"channels": [],
"playlists": [],
"next_cursor": "EpMDEgtsb2ZpIGhpcCBob3AaggNDQVI2QUhvTA",
"has_more": true
},
"response_time": 1842,
"credits_used": 2,
"credits_remaining": 4756
}