Skip to content

Query API

Matthew Wright edited this page Jan 26, 2022 · 15 revisions

The tool provides a pseudo-api with query parameters that allow manipulation of the page elements so that you can share a search you made or implement a linked custom search from your own site/tool.

Channel page

The following parameter(s) will work with just the channel page /youtube-geofind/

Parameter Accepted values
channels string, comma separated list of channel url(s) or ids
e.g.
UChirEOpgFCupRAk5etXqPaA
https://www.youtube.com/user/vicenews,https://www.youtube.com/channel/UChirEOpgFCupRAk5etXqPaA,https://www.youtube.com/user/thesamlivecast

Example(s)

Location & Topic pages

The following parameter(s) are shared by both the location /youtube-geofind/location and topic /youtube-geofind/topic pages.

Parameter Accepted values
keywords string, keywords exactly like you could put into YouTube search
sort string, may only be one of the specified values that show in the select box in the page
One of these only: date, rating, relevance, title, videoCount, viewCount
relevanceLanguage string, may only be one of the specified values that show in the select box in the page
Any ISO-639 language code that is available in the dropdown or any
safeSearch string, may only be one of the specified values that show in the select box in the page
One of these only: strict, moderate, none
duration string, may only be one of the specified values that show in the select box in the page
One of these only: any, short, medium, long
timeframe string, may only be one of the specified values that show in the select box in the page
One of these only: any, hour-1, hour-3, hour-6, hour-12, hour-24, day-7, day-30, day-90, day-365, custom
start RFC-3339 date-string of format yyyy-MM-ddThh:mm:ss. may only be used with timeframe=custom. must be before end date.
e.g. 2018-12-24
end RFC-3339 date-string of format yyyy-MM-ddThh:mm:ss. may only be used with timeframe=custom. must be after start date.
e.g. 2018-12-26
pages integer, may be any integer between 1 and 1000
live boolean true or false
creativeCommons boolean true or false
hd boolean true or false
3d boolean true or false

Example(s)

Location page

The following parameter(s) will work with just the location page /youtube-geofind/location

Parameter Accepted values
location string, comma separated latitude & longitude
e.g. 43.054098,-79.2281175
locationAddress string, exactly like anything you could put into Google Maps
e.g. the white house
radius integer, may only be one of the specified values that show in the select box in the page. otherwise, the select box will become blank
One of these only: 1, 2, 5, 10, 15, 20, 50, 100, 200, 500, 1000

Example(s)

All pages

This parameter is shared by all page types.

Parameter Accepted values
doSearch boolean
true to click the page's submit button
false don't click submit, might as well just omit the parameter

All of the examples above use this single parameter.

Clone this wiki locally