siteSearch parameter. The most effective approach targets YouTube directly — either by adding site:youtube.com to the query or by setting siteSearch=youtube.com. When Google indexes a video page, it embeds schema.org VideoObject structured data in the result’s pagemap, giving you rich metadata like duration, thumbnail, upload date, and description without any additional API calls.
Endpoint
How Video Search Works
1
Scope your engine or query to video sources
Point your search at YouTube or other video platforms using the
siteSearch parameter or a site: query operator. You can also configure your Programmable Search Engine to include only video-hosting domains.2
Send the standard web search request
Use the same endpoint and required parameters (
key, cx, q) as a normal web search. No special searchType value is needed.3
Extract video metadata from pagemap
Each result item includes a
pagemap object. Look for pagemap.videoobject to find schema.org VideoObject fields such as name, description, duration, uploaddate, and thumbnailurl.Request Parameters
Required Parameters
string
required
Your Google API key.
string
required
Your Programmable Search Engine ID.
string
required
The video search query. You can embed
site:youtube.com directly in this string as an alternative to using siteSearch. Example: "machine learning tutorial site:youtube.com".Site Scoping Parameters
string
Restricts results to a specific domain. Set to
youtube.com to target YouTube, or use another video platform’s domain such as vimeo.com or dailymotion.com.string
Controls whether
siteSearch includes or excludes the domain.i— include only results from the specified site.e— exclude results from the specified site.
i when targeting a video platform.Filtering and Sorting Parameters
integer
default:"10"
Number of results to return per page. Accepted values are
1 through 10.integer
default:"1"
Index of the first result. Use with
num to paginate through up to 100 results.string
Sort order of results. Pass
date to sort by upload/index date and retrieve the most recently published videos first.string
Limits results to videos indexed within a time window. Format:
[d|w|m|y][number]. For example, d7 returns videos indexed in the last 7 days.string
Restricts results to pages written in a specific language. Example:
lang_en.string
Biases results toward a specific country. Accepts a two-letter ISO 3166-1 alpha-2 country code.
string
default:"off"
SafeSearch setting. Pass
active to filter explicit content.string
Requires every result to contain this exact phrase.
string
Adds alternative terms — results must match at least one term from
q or one term from orTerms.Example Requests
- YouTube via siteSearch
- YouTube via site: operator
- Multiple video platforms
cURL
Example Response
Response Fields
Video results use the standard web result structure. The video-specific information lives insideitems[].pagemap.videoobject[].
string
The title of the video page as indexed by Google.
string
The URL of the video watch page, e.g.
https://www.youtube.com/watch?v=....string
Human-readable hostname, e.g.
"www.youtube.com".string
A text excerpt from the video page — often the video description.
array
An array of schema.org
VideoObject entries extracted from the page’s structured data. Usually contains a single entry. May be absent if the page does not include VideoObject markup.array
Open Graph and other meta tags from the video page. The
og:type value "video.other" indicates a video result.Tips and Patterns
Building a video search UI
Building a video search UI
Use
pagemap.videoobject[0].thumbnailurl for the result card image and pagemap.videoobject[0].duration for the runtime badge. Parse the ISO 8601 duration string with a library such as iso8601-duration (JavaScript) or isodate (Python) to display a human-readable format like "3h 12m".Filtering by upload recency
Filtering by upload recency
Combine
sort=date with dateRestrict=w1 to return only videos uploaded or indexed in the last week. This is useful for news-style video feeds where freshness matters.Handling missing pagemap.videoobject
Handling missing pagemap.videoobject
Not every video page includes schema.org
VideoObject markup. Always guard against a missing pagemap.videoobject field in your code and fall back to items[].snippet for the description and items[].link for the URL.The
duration field follows ISO 8601 duration format: PT[H]H[M]M[S]S. For example, PT1H30M means 1 hour and 30 minutes.