Videos Search API
The Google Videos Search API returns videos content related to your search query, primarily from YouTube and other video platforms. Access this endpoint by setting search_type=videos
in your request.
Request Format
GET /api/google?search_type=videos
Parameters
Parameter | Description | Example | Required | Notes |
---|---|---|---|---|
query | The search term | café | Yes | Must be URL encoded |
location | Geographic location | Paris,Paris,Ile-de-France,France | Yes | Must follow format: City,City,Region,Country |
google_domain | Google domain to use | google.fr | No | Domain name without https://www. |
gl | Google country code | fr | No | Two-letter country code |
hl | Interface language | fr | No | Two-letter language code |
search_type | Type of search | videos | Yes | Must be set to videos |
device | Device type | desktop | No | Options: desktop or mobile |
page | Page number | 1 | No | Range: 1-100 |
Response Format
{
"videos": Array<{
url: string, // URL of the video
title: string, // Video title
content: string, // Video description
author: string, // Channel or creator name
source: string, // Platform (e.g., YouTube)
date: string, // Publication date
thumbnail: string // URL of video thumbnail
}>,
"suggestion": Array<string>, // Related search suggestions
"metadata": {
status: string, // Success/failure status
request_id: string, // Unique identifier for request
created_at: string, // Request timestamp
updated_at: string, // Response timestamp
params: { // Echo of request parameters
query: string,
location: string,
google_domain: string,
gl: string,
hl: string,
search_type: string,
page: string | null,
device: string
}
}
}
Example Request
curl -X 'GET' \
'https://app.serpextractor.com/api/google?query=café&location=Paris%2CParis%2CIle-de-France%2CFrance&google_domain=google.fr&gl=fr&hl=fr&search_type=videos&device=desktop' \
-H 'accept: */*' \
-H 'X-API-Key: YOUR_API_KEY'
Response Fields
Video Object
Field | Type | Description |
---|---|---|
url | string | Direct link to the video |
title | string | Video title |
content | string | Video description or excerpt |
author | string | Content creator or channel name |
source | string | Video platform (e.g., YouTube) |
date | string | Publication date |
thumbnail | string | URL of video thumbnail image |
Pagination
Video search supports pagination:
- Results are typically returned in batches of 10
- Page parameter accepts values from 1-100
- Empty results indicate end of available pages
- Videos are generally sorted by relevance and date
Error Handling
Status Code | Description |
---|---|
200 | Success |
400 | Invalid parameters |
401 | Invalid or missing API key |
429 | Too many concurrent connections |
500 | Server error |
tip
When working with video results:
- Always check thumbnail availability before displaying
- Handle relative dates appropriately
- Be aware that video availability may change
caution
- Video URLs may become unavailable
- Thumbnail URLs may expire
- Video descriptions may be truncated
- Publication dates are in the source platform's timezone
- Not all videos may be accessible in all regions
- The search may include links to channels, not only videos