This guide demonstrates how to use the YouTube Data API to search for videos from a specific location, in this case, London.
Parameter | Type | Description | Required |
---|---|---|---|
location | string | The location coordinates (latitude,longitude) | Yes |
locationRadius | string | The radius from the location to search within | Yes |
type | string | The type of resource to search for | Yes |
videoId
: The unique identifier for the videotitle
: The title of the videodescription
: A brief description of the videothumbnails
: Various thumbnail images for the videochannelTitle
: The title of the channel that uploaded the videolocation
parameter uses the format latitude,longitude
. For London, we use the coordinates 51.5074,0.1278
.locationRadius
parameter specifies the geographic area in which to search. It must be used in conjunction with the location
parameter.type
parameter must be set to video
when using location-based search.