API Reference
YouTube Search
Search YouTube for videos. Returns video results with title, channel, publish date, and thumbnail. Video-only results (no channels or playlists).
Use this to search YouTube and get matching videos with title, description, channel, publish date, and thumbnail. Useful for topic research and finding videos to analyze.
10 credits per request.
Quick example
curl -G "https://api.webscraperapi.ai/v1/youtube_search" \
-H "Authorization: Bearer $WEBSCRAPERAPI_API_KEY" \
--data-urlencode "query=test query" \
--data-urlencode "max_results=2" \
--data-urlencode "output=json"max_results defaults to 10 and goes up to 50. Results are videos only, never channels or playlists.
Full API reference
Query Parameters
query*string
Search query.
Length
1 <= lengthmax_results?integer
Maximum results to return (max 50).
Default
10Range
1 <= value <= 50output?|
Output format. Defaults to json.
timeout_ms?|
Request timeout in milliseconds.
Response Body
application/json
application/json
curl -X GET "https://api.webscraperapi.ai/v1/youtube_search?query=string"null{
"error": {
"code": "string",
"message": "string",
"details": {}
}
}