The YouTube Search API provides real-time access to structured YouTube search results.Documentation Index
Fetch the complete documentation index at: https://docs.hasdata.com/llms.txt
Use this file to discover all available pages before exploring further.
Get Your API Key
Sign in at hasdata.com, go to your account settings, and copy your API key. All requests must include your key in thex-api-key header.
Request Cost and API Credits
Each request to the YouTube Search API consumes API Credits from your account balance.- Cost per request: 10 API Credits
- Credits are deducted only for successful requests.
- Your total available credits depend on your active plan.
Make Your First Request
API Parameters
| Parameter | Default Value | Required | Description |
|---|---|---|---|
q | BMW | Yes | The search query. |
gl | - | No | The two-letter country code for the country you want to limit the search to. |
hl | - | No | The two-letter language code for the language you want to use for the search. |
deviceType | - | No | Device type for the request. |
sp | - | No | Raw YouTube sp filter parameter. |
sortBy | - | No | Sort order of results. |
date | - | No | Filter by upload date. |
videoType | - | No | Filter by content type. |
length | - | No | Filter by video duration. |
filters[] | - | No | An array of feature filters to apply. Can include any combination of the supported values. |
paginationToken | - | No | Token returned in the previous response to fetch the next page. |