Google Videos API
The Google Videos API offers a dynamic video search service. It accumulates video results from the most popular sources across the globe, categorizes similar videos, and presents them according to each user's search query. The API offers access to the specific source for each video, granting users the freedom to choose their preferred topic and select videos from various publishers.
API Parameters
Search Query
-
- Name
-
q - Required
- Required
- Description
-
This parameter is used for the terms you want to search on Google Videos. Queries can include operators and advanced filters like "cooking tutorials",
site:,inurl:,intitle:,as_dt, oras_eq.
Device
-
- Name
-
device - Required
- Optional
- Description
-
The default parameter
desktopdefines the search on a desktop device. Themobileparameter defines the search on a mobile device. Thetabletparameter defines the search on a tablet device.
Geographic Location
-
- Name
-
location - Required
- Optional
- Description
-
This parameter is used to specify the canonical location of the search. For exact targeting or to see all available options, check out the Locations API. If multiple locations match your input, the most popular one will be selected.
-
- Name
-
uule - Required
- Optional
- Description
-
This parameter sets the exact Google-encoded location for the search, and
uuleandlocationcannot be used at the same time. SearchApi builds it for you when you use thelocationparameter, but you can provide your own if you want precise control.
Localization
-
- Name
-
google_domain - Required
- Optional
- Description
-
The default parameter
google.comdefines the Google domain of the search. Check the full list of supported Googlegoogle_domaindomains.
-
- Name
-
gl - Required
- Optional
- Description
-
The default parameter
usdefines the country of the search. Check the full list of supported Googleglcountries.
-
- Name
-
hl - Required
- Optional
- Description
-
The default parameter
endefines the interface language of the search. Check the full list of supported Googlehllanguages.
-
- Name
-
lr - Required
- Optional
- Description
-
The lr parameter restricts search results to documents written in a particular language or a set of languages. The accepted format for this parameter is
lang_{2-letter country code}. For instance, to filter documents written in Japanese, the value should be set tolang_jp. To incorporate multiple languages, a value likelang_it|lang_derestricts the search to documents written in either Italian or German. Google identifies the document language based on the top-level domain (TLD) of the document's URL, any language meta tags present, or the language utilized within the document's body text. Check the full list of supported Googlelrlanguages.
-
- Name
-
cr - Required
- Optional
- Description
-
The cr parameter restricts search results to documents originating in a particular country. Google determines the country of a document by the top-level domain (TLD) of the document's URL or by Web server's IP address geographic location. Check the full list of supported Google
crcountries.
Filters
-
- Name
-
nfpr - Required
- Optional
- Description
-
This parameter controls whether results from queries that have been auto-corrected for spelling errors are included. To exclude these auto-corrected results, set the value to
1. By default, the value is0, meaning auto-corrected results are included.
-
- Name
-
filter - Required
- Optional
- Description
-
This parameter controls whether the "Duplicate Content" and "Host Crowding" filters are enabled. Set the value to
1to enable these filters, which is the default setting. To disable these filters, set the value to0.
-
- Name
-
safe - Required
- Optional
- Description
-
This parameter toggles the SafeSearch feature for the results. SafeSearch operates by filtering out adult content from your search results. Google's filters use proprietary technology to check keywords, phrases and URLs. While no filters are 100 percent accurate, SafeSearch will remove the overwhelming majority of adult content from your search results. Set the value to
activeto enable SafeSearch. To disable it, set the value tooff. By default, SafeSearch is disabled.
-
- Name
-
tbs - Required
- Optional
- Description
-
This parameter restricts results to URLs based on encoded values. For instance,
dur:swould return only results that are shorter than 4 min.
-
- Name
-
time_period - Required
- Optional
- Description
-
This parameter restricts results to URLs based on date. Supported values are:
last_hour- data from the past hour.last_day- data from the past 24 hours.last_week- data from the past week.last_month- data from the past month.last_year- data from the past year.
tbsparameter.
-
- Name
-
duration - Required
- Optional
- Description
-
This parameter restricts results to URLs based on video duration. Supported values are:
short- short videos (0-4 min.).medium- medium videos (4-20 min.).long- long videos (20+ min.).
tbsparameter.
-
- Name
-
quality - Required
- Optional
- Description
-
This parameter restricts results to URLs based on video quality. By default, all videos are returned. To retrieve only videos with high quality,
highparam should be used.
Note: this parameter is not compatible with a customtbsparameter.
-
- Name
-
captioned - Required
- Optional
- Description
-
This parameter restricts results to URLs based on video captions. By default, all videos are returned. To retrieve only videos with closed caption,
closedparam should be used.
Note: this parameter is not compatible with a customtbsparameter.
-
- Name
-
source - Required
- Optional
- Description
-
This parameter restricts results to URLs based on source. Supported values are:
youtube,cncc,cnn,ted,cbsnews,twitter,tiktok,facebook,timesnownews,nbcnews,foxnews.
Note: this parameter is not compatible with a customtbsparameter.
Pagination
-
- Name
-
num - Required
- Optional
- Description
-
This parameter specifies the number of results to display per page. Use in combination with the
pageparameter to implement pagination functionality.
-
- Name
-
page - Required
- Optional
- Description
-
This parameter indicates which page of results to return. By default, it is set to
1. Use in combination with the num parameter to implement pagination.
Engine
-
- Name
-
engine - Required
- Required
- Description
-
Parameter defines an engine that will be used to retrieve real-time data. It must be set to
google_videos.
API key
-
- Name
-
api_key - Required
- Required
- Description
-
The
api_keyauthenticates your requests. Use it as a query parameter (https://www.searchapi.io/api/v1/search?api_key=YOUR_API_KEY) or in the Authorization header (Bearer YOUR_API_KEY).
Zero Data Retention
-
- Name
-
zero_retention - Enterprise Only
- Enterprise Only
- Required
- Optional
- Description
-
Set this parameter to
trueto disable all logging and persistent storage. No request parameters, HTML, or JSON responses are stored or logged. Suitable for high-compliance use cases. Debugging and support may be limited while enabled.
API Examples
Full Response
https://www.searchapi.org/api/v1/search?engine=google_videos&q=scraping+guides
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.org/api/v1/search"
params = {
"engine": "google_videos",
"q": "scraping guides"
}
response = requests.get(url, params=params)
print(response.text)
{
"search_metadata": {
"id": "search_OxE2l6wMgOJVSBbwp9PbYq4K",
"status": "Success",
"created_at": "2023-06-21T17:56:04Z",
"request_time_taken": 1.35,
"parsing_time_taken": 0.04,
"total_time_taken": 1.39,
"request_url": "https://www.google.com/search?q=Scraping+guides&oq=Scraping+guides&gl=us&hl=en&tbm=vid&ie=UTF-8",
"html_url": "https://wwww.searchapi.io/api/v1/searches/search_OxE2l6wMgOJVSBbwp9PbYq4K.html",
"json_url": "https://wwww.searchapi.io/api/v1/searches/search_OxE2l6wMgOJVSBbwp9PbYq4K"
},
"search_parameters": {
"engine": "google",
"q": "Scraping guides",
"google_domain": "google.com",
"hl": "en",
"gl": "us"
},
"search_information": {
"query_displayed": "Scraping guides",
"total_results": 5110000,
"time_taken_displayed": 0.32
},
"videos": [
...
{
"position": 3,
"title": "Beginners Guide To Web Scraping with Python - YouTube",
"link": "https://www.youtube.com/watch?v=QhD015WUMxE",
"displayed_link": "www.youtube.com › watch",
"snippet": "The web is full of data. Lots and lots of data. Data prime for scraping. But manually going to a website and copying and pasting the data ...",
"highlighted": [
"scraping"
],
"length": "7:36",
"source": "YouTube",
"date": "Nov 27, 2021",
"channel": "Tinkernut",
"key_moments": [
{
"time": "00:00",
"seconds": 0,
"title": "Introduction",
"link": "https://www.youtube.com/watch?v=QhD015WUMxE&t=0",
"thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR4jPIu2ZKf7Qhi0lwiSscoljg9ruzc1Nn1Lcj3xYtNbQ&s"
},
...
],
"thumbnail": "data:image/jpeg;base64,..."
},
...
],
"related_searches": [
{
"query": "web scraping using python beautifulsoup",
"link": "https://www.google.com/search?gl=us&hl=en&tbm=vid&q=Web+scraping+using+Python+BeautifulSoup&sa=X&ved=2ahUKEwiwxcja99T_AhW9kYkEHWFtBxsQ1QJ6BAgYEAE"
},
...
]
}
Videos Carousel
https://www.searchapi.org/api/v1/search?device=mobile&engine=google_videos&q=How+to+scrape+websites
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.org/api/v1/search"
params = {
"engine": "google_videos",
"q": "How to scrape websites",
"device": "mobile"
}
response = requests.get(url, params=params)
print(response.text)
{
"videos_carousel": [
{
"position": 1,
"title": "How to Easily Scrape Websites with Python and Beautiful Soup (Web Scraping with Python)",
"snippet": "From 8:45 How to scrape a single page",
"link": "https://www.youtube.com/watch?v=A1s1aGHoODs&t=525",
"displayed_link": "YouTube • The PyCoach",
"length": "23:13",
"thumbnail": "data:image/jpeg;base64,..."
},
...
]
}
Shorts Response
https://www.searchapi.org/api/v1/search?device=mobile&engine=google_videos&q=Rami+Malek
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.org/api/v1/search"
params = {
"engine": "google_videos",
"q": "Rami Malek",
"device": "mobile"
}
response = requests.get(url, params=params)
print(response.text)
{
"shorts": [
{
"position": 1,
"title": "Oscar Winner Rami Malek wins Best Actor | 91st Oscars",
"link": "https://www.youtube.com/shorts/D3IbOSmUlf0",
"source": "YouTube",
"author": "Oscars",
"thumbnail": "data:image/jpeg;base64,..."
},
...
]
}