YouTube Search
1 creditSearch YouTube for videos by keyword.
POST
/api/v1/tools/youtube/searchParameters
querystringrequired
Search query string.
maxResultsnumber
Maximum number of results to return. Defaults to 20.
fieldsstring[]
Fields to include per video. Omit for defaults: videoId, title, channelName, viewCount, duration, publishedTime. Use ["*"] for all fields. Available fields: videoId, title, channelName, viewCount, duration, publishedTime, thumbnailUrl, channelId.
Response Schema
dataobject
YouTube search result
videosobject[]
Array of video objects matching the query.
countnumber
Number of results returned
estimatedTotalResultsnumber
Estimated total results for the query
truncatedboolean
True if results were cut short. Only present when truncation occurred.
metaobject
Request metadata
toolstring
Tool name (youtube-search)
creditsUsednumber
Credits consumed (1)
requestIdstring
Unique request ID
Request
curl -X POST https://scraper.run/api/v1/tools/youtube/search \-H "Authorization: Bearer sc_live_..." \-H "Content-Type: application/json" \-d '{"query": "typescript tutorial","maxResults": 10}'
Response Example
{"data": {"videos": [{"videoId": "dQw4w9WgXcQ","title": "TypeScript Full Course for Beginners","channelName": "Dev Academy","viewCount": "1.2M views","duration": "3:24:10","publishedTime": "3 months ago"}],"count": 1,"estimatedTotalResults": 5400},"meta": {"tool": "youtube-search","creditsUsed": 1,"requestId": "req_abc123"}}