API reference · YouTube
youtube/bulk/search
Integrate this model through SandBase's unified API, with production-ready schemas and examples.
Production endpoint
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
POST
https://api.sandbase.ai/v1/runModel ID
youtube/bulk/search01
Input Schema
29 parameters · 0 required · 29 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
is3D | boolean | Optional | Will apply the 3D filter for search |
is4K | boolean | Optional | Will apply the 4K filter for search |
isHD | boolean | Optional | Will apply the HD filter for search |
hasCC | boolean | Optional | Will apply the Creative Commons filter for search |
is360 | boolean | Optional | Will apply the 360 degrees filter for search |
isHDR | boolean | Optional | Will apply the HDR filter for search |
isLive | boolean | Optional | Will apply the Live filter for search |
isVR180 | boolean | Optional | Will apply the VR180 filter for search |
isBought | boolean | Optional | Will apply the Purchased filter for search |
startUrls | array | Optional | Enter a link to a YouTube video, channel, playlist, hashtag or search results page. You can also import a CSV file or Google Sheet with a list of URLs.Note: Input from Search term will be ignored when using this option. If you only want to scrape shorts/streams, set Maximum search results to 0, otherwise they represented number of regular videos requested |
videoType | string | Optional | Select Youtube video type filter for search · Options: video, movie videomovie |
dateFilter | string | Optional | Select Youtube upload date filter for search · Options: hour, today, week, month, year hourtodayweekmonthyear |
maxResults | integer | Optional | Limit the number of videos you want to crawl. If you scrape a channel, acts as a limit for regular videos. · Min: 0 · Max: 999999 · Default: 0 |
hasLocation | boolean | Optional | Will apply the Location filter for search |
hasSubtitles | boolean | Optional | Will apply the Subtitles/CC filter for search |
lengthFilter | string | Optional | Select Youtube video length filter for search · Options: under4, between420, plus20 under4between420plus20 |
sortVideosBy | string | Optional | Maps to the sorting buttons on the top of the channel's 'Videos', 'Shorts' and 'Live' pages. · Options: NEWEST, POPULAR, OLDEST NEWESTPOPULAROLDEST |
sortingOrder | string | Optional | Select Youtube sorting parameter for search · Options: relevance, rating, date, views relevanceratingdateviews |
saveSubsToKVS | boolean | Optional | If set to true, the scraper will save the downloaded subtitles to the key-value store. Note: Download subtitles must be turned on for this option to work. |
searchQueries | array | Optional | Enter search terms just like you would enter it in YouTube's search bar. |
aiVideoSummary | boolean | Optional | If enabled, uses AI to generate a concise conceptual summary of the video covering both visual and audio content. · Default: false |
oldestPostDate | string | Optional | Only posts uploaded after or on this date will be scraped. Alternatively, specify how old the scraped videos should be in days. Putting 1 day will get you only today's posts, 2 days - yesterday's and today's, and so on. Note, that if you select this, sorting parameter will be auto-reset to NEWEST |
subtitlesFormat | string | Optional | Select in what format you want to download subtitles · Options: srt, vtt, xml, plaintext · Default: "srt" srtvttxmlplaintext |
maxResultStreams | integer | Optional | Limit the number of Stream videos you want to crawl. · Min: 0 · Max: 999999 · Default: 0 |
maxResultsShorts | integer | Optional | Limit the number of Shorts videos you want to crawl. · Min: 0 · Max: 999999 · Default: 0 |
downloadSubtitles | boolean | Optional | If set to true, the scraper will download subtitles for the video and convert them to .srt format. |
subtitlesLanguage | string | Optional | Language to download subtitles in.Note: Download subtitles must be turned on for this option to work. · Options: any, en, de, es, fr, it, ja, ko, nl, pt, ru · Default: "en" anyendeesfritjakonlptru |
aiVideoDescription | boolean | Optional | If enabled, uses AI to generate a time-segmented description of the video, covering both visual and audio content for each segment. · Default: false |
preferAutoGeneratedSubtitles | boolean | Optional | If set to true, automatically generated subtitles are preferred to user subtitles. Note: A subtitle language must be selected and download subtitles must be turned on for this option to work. |
02
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
Async Workflow
This model uses asynchronous execution. Submit a request and poll for the result.
- Submit — POST to /v1/run, receive an
id - Poll — GET /v1/run/{id} until status is
completed,failed, ortimeout - Retrieve — Read
outputsfrom the completed response
03
Code Examples
Ready-to-run snippets
# Step 1: Submit
curl -X POST https://api.sandbase.ai/v1/run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "youtube/bulk/search",
"maxResults": 0,
"aiVideoSummary": false,
"subtitlesFormat": "srt",
"maxResultStreams": 0,
"maxResultsShorts": 0,
"subtitlesLanguage": "en",
"aiVideoDescription": false,
"prompt": "a beautiful sunset over mountains"
}'
# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
-H "Authorization: Bearer YOUR_API_KEY"
