Skip to main content

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

ParameterDescriptionExampleRequiredNotes
queryThe search termcaféYesMust be URL encoded
locationGeographic locationParis,Paris,Ile-de-France,FranceYesMust follow format: City,City,Region,Country
google_domainGoogle domain to usegoogle.frNoDomain name without https://www.
glGoogle country codefrNoTwo-letter country code
hlInterface languagefrNoTwo-letter language code
search_typeType of searchvideosYesMust be set to videos
deviceDevice typedesktopNoOptions: desktop or mobile
pagePage number1NoRange: 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

FieldTypeDescription
urlstringDirect link to the video
titlestringVideo title
contentstringVideo description or excerpt
authorstringContent creator or channel name
sourcestringVideo platform (e.g., YouTube)
datestringPublication date
thumbnailstringURL 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 CodeDescription
200Success
400Invalid parameters
401Invalid or missing API key
429Too many concurrent connections
500Server 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