Use this API endpoint to search YouTube for videos, channels, and playlists with advanced filtering options.
GET https://api.supadata.ai/v1/youtube/search
Each request requires an x-api-key
header with your API key available after signing up. Get your API key here.
Parameter | Type | Required | Description |
---|---|---|---|
query | string | Yes | Search query string |
type | string | No | Filter by content type. Options: all (default), video , channel , playlist , movie |
uploadDate | string | No | Filter by upload date. Options: all (default), hour , today , week , month , year |
duration | string | No | Filter by video duration. Options: all (default), short (<4min), medium (4-20min), long (>20min) |
sortBy | string | No | Sort order of results. Options: relevance (default), rating , date , views |
features | array | No | Array of special features to filter by. Options: hd , subtitles , creative-commons , 3d , live , 4k , 360 , location , hdr , vr180 |
limit | number | No | Maximum number of results to return (1-5000). When provided, API automatically paginates to fetch up to this many results |
nextPageToken | string | No | Token for fetching the next page of results. When provided, other filter parameters are ignored |
limit
parameter.
limit
)limit
parameter, the API automatically handles pagination for you:
limit
or runs out of resultsnextPageToken
is returned since all requested results are includedlimit
)limit
parameter, you get manual control over pagination:
nextPageToken
is included in the response for fetching additional pagesnextPageToken
, all other filter parameters are ignoredlimit
parameter to fetch multiple pages automatically will consume credits for each page retrieved