Google Video
Search Google Video to retrieve video results in JSON format.
Endpoint
GET /v1/video/{query}
Description
The Google Video Search endpoint allows you to search for videos on Google and retrieve results. The query parameter should be a URL-encoded query string that follows Google's search parameter format.
For reference on Google search parameters, check out our Google Search Operators guide.
Authentication
All requests require authentication using the X-Api-Key header. See the Authentication guide for more details.
Path Parameters
query (required)
Type: string
A URL-encoded query string. This should follow Google's search parameter format.
Examples:
q=iphone+reviewsq=search+api&num=100
Request Headers
X-Proxy-Location (optional)
Type: string
Specify the proxy location for the search. This determines the geographic location from which the search is performed.
Allowed values:
EU- European UnionCA- CanadaUS- United StatesIE- IrelandGB- United KingdomFR- FranceDE- GermanySE- SwedenIN- IndiaJP- JapanKR- South KoreaSG- SingaporeAU- AustraliaBR- Brazil
X-User-Agent (optional)
Type: string
Specify the device type for the search. Defaults to desktop if not provided.
Allowed values:
desktop- Desktop browser (default)mobile- Mobile device
Request Example
Using cURL
curl --request GET \
--url 'https://api.serply.io/v1/video/q=iphone+reviews' \
--header 'X-Api-Key: YOUR_API_KEY' \
--header 'X-Proxy-Location: US' \
--header 'X-User-Agent: desktop' | jq
Using JavaScript/Node.js
const response = await fetch('https://api.serply.io/v1/video/q=iphone+reviews', {
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'X-Proxy-Location': 'US',
'X-User-Agent': 'desktop'
}
});
const data = await response.json();
console.log(data);
Using Python
import requests
headers = {
'X-Api-Key': 'YOUR_API_KEY',
'X-Proxy-Location': 'US',
'X-User-Agent': 'desktop'
}
response = requests.get(
'https://api.serply.io/v1/video/q=iphone+reviews',
headers=headers
)
data = response.json()
print(data)
Response
The API returns a JSON object containing an array of video search results.
Response Structure
{
"results": [
{
"title": "Video Title",
"link": "https://example.com/video",
"description": "Video description text..."
}
],
"total": 1840000000,
"answer": null
}
Response Fields
results(array): An array of video result objectstitle(string): The title of the video resultlink(string): The URL of the video resultdescription(string): The description/snippet of the video result
total(number): The total number of video results availableanswer(array[string] | null): Optional answer box content, if available
Example Response
{
"results": [
{
"title": "Custom Search JSON API | Google Developers",
"link": "https://developers.google.com/custom-search/v1/overview",
"description": "Jun 11, 2019 - The Custom Search JSON API lets you develop websites and applications to retrieve and display search results from Google Custom Search ..."
},
{
"title": "Using REST to Invoke the API | Custom Search | Google ...",
"link": "https://developers.google.com/custom-search/v1/using_rest",
"description": "As a result, the API provides a single URI that acts as the service endpoint. You can retrieve results for a particular search by sending an HTTP GET request to its ..."
}
],
"total": 1840000000,
"answer": null
}
Status Codes
- 200 OK - Successful response
- 404 Not Found - The requested resource was not found
- 422 Unprocessable Entity - The request was well-formed but contains semantic errors
- 429 Too Many Requests - Rate limit exceeded
Error Responses
See the Errors guide for information on error response formats.