Skip to main content
The Custom Search JSON API does not have a dedicated searchType=video parameter, but you can reliably surface video results by targeting video platforms directly with siteSearch and by using query operators that match video-hosting page patterns. The most effective approach is to restrict your search to youtube.com — the world’s largest public video index — and combine that with descriptive query terms. You can also target other platforms such as vimeo.com or dailymotion.com using the same technique.

How video search works

Google indexes the metadata and transcripts of publicly available videos. When you restrict your search to a video platform domain using siteSearch, the results returned are video watch pages. Each result’s link is a direct URL to the video player; snippet typically contains the video description; and pagemap often contains structured data including duration, view count, upload date, and thumbnail URLs extracted from the page’s Open Graph and Schema.org markup.
To search across multiple video platforms simultaneously, configure your Programmable Search Engine in the Control Panel to include youtube.com, vimeo.com, and any other platforms as Included sites. You can then omit the per-request siteSearch parameter.
string
required
Your video search query. You can use standard Google operators to sharpen results. For example:
  • q=python+tutorial+intitle:beginner — matches “beginner” in the page title
  • q=jazz+guitar+lesson — broad keyword match across title and description
The domain to restrict results to. Set to youtube.com for YouTube-only results, vimeo.com for Vimeo, or any other video platform.
string
Set to i (include) to restrict results exclusively to siteSearch. Set to e (exclude) to strip results from that platform.
string
Although most video watch pages are HTML documents, you can use fileType to find directly linked video files (e.g., mp4, webm) when they are indexed. This is uncommon for major platforms but useful for open-media repositories.
string
Limit results to videos indexed within a time window. Format: d[N], w[N], m[N], y[N]. Use d7 for the last week of uploads, which surfaces trending or recently published content.
string
Set to date to return the most recently indexed videos first rather than sorting by relevance.
integer
Number of results per page. Accepts 110. Defaults to 10.
integer
Pagination offset (1-based, max 91). Combine with num to page through up to 100 video results.

Make your first video search request

1

Choose your target platform

Decide whether you want YouTube-only results, multi-platform results, or results from a specific video host. For most use cases, siteSearch=youtube.com with siteSearchFilter=i is the right starting point.
2

Build the request

Combine siteSearch, siteSearchFilter, and a descriptive q value:
3

Add recency and sorting filters

Surface the newest content by combining dateRestrict and sort=date:

Full curl examples

Fetch the ten most recent YouTube tutorials on Rust programming published in the last 30 days:

Sample video result item

A YouTube result’s pagemap typically contains rich structured data. The videoobject key (when present) carries duration, upload date, view count, and a thumbnail URL extracted from the page’s Schema.org markup:

Extract video metadata from pagemap

Check pagemap.videoobject[0].thumbnailurl first. Fall back to pagemap.metatags[0]["og:image"] for a wider thumbnail.
ISO 8601 date available at pagemap.videoobject[0].uploaddate (format: YYYY-MM-DD):
Duration in ISO 8601 format at pagemap.videoobject[0].duration (e.g., PT6H12M means 6 hours 12 minutes):
Available at pagemap.videoobject[0].interactioncount as a string:
pagemap data is extracted from the page’s structured markup at crawl time and is not guaranteed to be present or up to date. Always code defensively with optional chaining and fallbacks. Fields like interactioncount (view count) reflect the value at the time of the last crawl, not real-time platform data.

Targeting specific video content types

Error reference

Combine siteSearch=youtube.com with language filtering (lr=lang_es for Spanish, lr=lang_fr for French) to surface video content in a target language. See Advanced Filters for the full lr value list.