YouTube Search Results - Data API Endpoint

Search Results by youtube api key, channel id, channel type, event type, language, location coordinates, location radius and order.

Get bulk Search Results data from the YouTube API | Official API: | 👥  Contributors: steve 🚩  Report

✏️ Inputs

YouTube API Key auth_token Required

Your YouTube API Key - see how to get your YouTube API Key if you need help.

Channel ID channel_id Optional

Restrict the video search to a specific channel.

E.g. UCArmutk8nAbYQdaYzgqKOwA
Channel Type channel_type Optional

Restrict the search to a specific channel type of either:

  • any All channels
  • show Only shows
E.g. any
Event Type event_type Optional

Set this if you want to search for live events.

NOTE: You must change the “type” parameter to video when using this option

  • completed
  • live
  • upcoming
E.g. live
Language language Optional

Return results that are most relevant to the provided language. See here for language codes:

E.g. en
Location Coordinates location_coordinates Optional

Restrict the search to videos tagged in a specific location. These must be coordinates and you must also supply a “Location Radius”.

E.g. 37.42307,-122.08427
Location Radius location_radius Optional

When searching by location, also provide a radius in m, km, ft. Be sure to set “Type” to video.

E.g. 1m
Order order Optional

Sort order of the results. From the official YouTube API:

The order parameter specifies the method that will be used to order resources in the API response. The default value is relevance.

Acceptable values are:

  • date – Resources are sorted in reverse chronological order based on the date they were created.
  • rating – Resources are sorted from highest to lowest rating.
  • relevance – Resources are sorted based on their relevance to the search query. This is the default value for this parameter.
  • title – Resources are sorted alphabetically by title.
  • videoCount – Channels are sorted in descending order of their number of uploaded videos.
  • viewCount – Resources are sorted from highest to lowest number of views. For live broadcasts, videos are sorted by number of concurrent viewers while the broadcasts are ongoing.
E.g. relevance
Pagination Token page_token Optional

Pagination token from the previous response. Leave this blank at first and then look for the nextPageToken value in the response’s root collection to get the next page of results.

Published After published_after Optional

Taken from

The publishedAfter parameter indicates that the API response should only contain resources created at or after the specified time. The value is an RFC 3339 formatted date-time value (1970-01-01T00:00:00Z).

E.g. 2021-01-01T00:00:00Z
Published Before published_before Optional

Taken from

The publishedBefore parameter indicates that the API response should only contain resources created before or at the specified time. The value is an RFC 3339 formatted date-time value (1970-01-01T00:00:00Z).

E.g. 2021-02-01T00:00:00Z
Query query Optional


The q parameter specifies the query term to search for.

Your request can also use the Boolean NOT (-) and OR (|) operators to exclude videos or to find videos that are associated with one of several search terms. For example, to search for videos matching either “boating” or “sailing”, set the q parameter value to boating|sailing. Similarly, to search for videos matching either “boating” or “sailing” but not “fishing”, set the q parameter value to boating|sailing -fishing. Note that the pipe character must be URL-escaped when it is sent in your API request. The URL-escaped value for the pipe character is %7C.

E.g. boating|sailing -fishing
Region Code region_code Optional

Restrict results to videos that can only be viewed in certain countries. See country codes here:

E.g. US
Related To Video ID related_video_id Optional

Provide this value to return back a list of videos that are related to this one.

IMPORTANT You need to set the type to video for this to work.

E.g. Bie32IZlMtY
Safe Search safe_search Optional

Whether to moderate the content returned. Default is moderate, other possible values are:

  • none Show all the results, may be inappropriate
  • strict Exclude all restricted content (“safe search”)
E.g. moderate
Topic ID topic_id Optional

Restrict results to the provided topic. You can get topic IDs by querying for channel details: and then add topicDetails to the part input.

E.g. /m/07c1v
Video Caption video_caption Optional

Specify which types of videos to return based on their captions. Possible values are:

  • any - Return all videos (default)
  • closedCaption - Only return videos with captions
  • none - Only return videos without captions
E.g. any
Video Category ID video_category_id Optional

Execute and provide your country in the regionCode to see a list of possible categories.

E.g. 1
Pagination Limit limit Default 50

Pagination Limit

Part part Default snippet

Parts to return in the response. Just enter in snippet per the documentation:

Type type Default video,channel,playlist

Type of results to return:

  • channel
  • playlist
  • video

IMPORTANT Many advanced search functions only work with type video, so if you get a strange error then try changing this to video.

📝 Notes

Posted by steve on June 29, 2022, 6:31 a.m. 🚩  Report

⚡️ Endpoint

GET{{part}}&key={{auth_token}}&q={{query}}&maxResults={{ limit }}&pageToken={{ page_token }}&eventType={{ event_type }}&type={{ type }}&publishedAfter={{ published_after }}&publishedBefore={{ published_before }}&order={{ order }}&relatedToVideoId={{ related_video_id }}&channelId={{ channel_id }}&channelType={{ channel_type }}&location={{ location_coordinates }}&locationRadius={{ location_radius }}&regionCode={{ region_code }}&relevanceLanguage={{ language }}&safeSearch={{ safe_search }}&topicId={{ topic_id }}&videoCaption={{ video_caption }}&videoCategoryId={{ video_category_id }}