URL | Parameters | Response Properties | Example | Query | Response
The youtube method takes any type of entity's guid and returns an array of JSON object name/value pairs representing YouTube videos and their associated metadata. The results were uploaded from a location within 1km of a point location argument or within the boundaries of a polygon/boundary defined location.
By default, a maximum of 25 videos are returned. If the specified area has no uploaded videos, the result is [], the empty list.
http://api.geoapi.com/v1/e/<guid>/view/youtube
http://api.geoapi.com/v1/e/<guid>/view/youtube:<view-parameters>
Parameters [Top]
- guid:
- Required.
- Any entity's guid.
- Format: String. Can be the guid of any entity type.
- apikey:
- Required.
- Your application's GeoAPI key.
- Format: String.
- pretty:
- Optional.
- Enables easier to read prettified JSON in result.
- Format: Set equal to 1 to enable prettification.
- jsoncallback:
- Optional.
- Return response in JSONP format. JQuery has nice support for JSONP callbacks.
- Format: JSON prefix string.
- <view-parameters>:
Response Properties [Top]
There are too many response properties to describe here. Please see the example response below, as well as YouTube's Data API Protocol document. In the latter, clicking on the linked name of a response property takes you to a description of the property. Note that while GeoAPI responses use "$" in field names, such as gd$feedLink, the YouTube Data API Protocol document uses ":"s. So to see the description of the GeoAPI response property gd:feedLink, search the YouTube doc for gd$feedLink and then click on the link.
http://api.geoapi.com/v1/e/mission-san-francisco ca/view/youtube?apikey=demo&pretty=1
{
"query": {
"type": "entity-view",
"params": {
"guid": "mission-san-francisco-ca",
"view": "youtube"
}
},
"result": [
{
"category": [
{
"term": "http://gdata.youtube.com/schemas/2007#video",
"scheme": "http://schemas.google.com/g/2005#kind"
},
{
"term": "Music",
"scheme": "http://gdata.youtube.com/schemas/2007/categories.cat",
"label": "Music"
},
{
"term": "larry",
"scheme": "http://gdata.youtube.com/schemas/2007/keywords.cat"
},
{
"term": "carlton",
"scheme": "http://gdata.youtube.com/schemas/2007/keywords.cat"
},
{
"term": "kid",
"scheme": "http://gdata.youtube.com/schemas/2007/keywords.cat"
},
{
"term": "charlemagne",
"scheme": "http://gdata.youtube.com/schemas/2007/keywords.cat"
},
{
"term": "hill",
"scheme": "http://gdata.youtube.com/schemas/2007/keywords.cat"
},
{
"term": "street",
"scheme": "http://gdata.youtube.com/schemas/2007/keywords.cat"
},
{
"term": "blues",
"scheme": "http://gdata.youtube.com/schemas/2007/keywords.cat"
},
{
"term": "don't",
"scheme": "http://gdata.youtube.com/schemas/2007/keywords.cat"
},
{
"term": "take",
"scheme": "http://gdata.youtube.com/schemas/2007/keywords.cat"
},
{
"term": "me",
"scheme": "http://gdata.youtube.com/schemas/2007/keywords.cat"
},
{
"term": "alive",
"scheme": "http://gdata.youtube.com/schemas/2007/keywords.cat"
},
{
"term": "steely",
"scheme": "http://gdata.youtube.com/schemas/2007/keywords.cat"
},
{
"term": "dan",
"scheme": "http://gdata.youtube.com/schemas/2007/keywords.cat"
},
{
"term": "put",
"scheme": "http://gdata.youtube.com/schemas/2007/keywords.cat"
},
{
"term": "it",
"scheme": "http://gdata.youtube.com/schemas/2007/keywords.cat"
},
{
"term": "where",
"scheme": "http://gdata.youtube.com/schemas/2007/keywords.cat"
},
{
"term": "you",
"scheme": "http://gdata.youtube.com/schemas/2007/keywords.cat"
},
{
"term": "want",
"scheme": "http://gdata.youtube.com/schemas/2007/keywords.cat"
},
{
"term": "crusaders",
"scheme": "http://gdata.youtube.com/schemas/2007/keywords.cat"
}
],
"updated": {
"$t": "2009-12-07T19:26:45.000Z"
},
"gd$comments": {
"gd$feedLink": {
"href": "http://gdata.youtube.com/feeds/api/videos/yMArrSjSjOo/comments",
"countHint": 21
}
},
"title": {
"$t": "Larry Carlton - Solos (Hill Street Blues / Kid Charlemagne / Don't Take Me Alive / and...)",
"type": "text"
},
"gd$rating": {
"max": 5,
"average": 4.95,
"numRaters": 40,
"rel": "http://schemas.google.com/g/2005#overall",
"min": 1
},
"media$group": {
"media$thumbnail": [
{
"url": "http://i.ytimg.com/vi/yMArrSjSjOo/2.jpg",
"width": 120,
"height": 90,
"time": "00:03:17.500"
},
{
"url": "http://i.ytimg.com/vi/yMArrSjSjOo/1.jpg",
"width": 120,
"height": 90,
"time": "00:01:38.750"
},
{
"url": "http://i.ytimg.com/vi/yMArrSjSjOo/3.jpg",
"width": 120,
"height": 90,
"time": "00:04:56.250"
},
{
"url": "http://i.ytimg.com/vi/yMArrSjSjOo/0.jpg",
"width": 320,
"height": 240,
"time": "00:03:17.500"
}
],
"media$category": [
{
"$t": "Music",
"scheme": "http://gdata.youtube.com/schemas/2007/categories.cat",
"label": "Music"
}
],
"media$title": {
"$t": "Larry Carlton - Solos (Hill Street Blues / Kid Charlemagne / Don't Take Me Alive / and...)",
"type": "plain"
},
"media$keywords": {
"$t": "larry, carlton, kid, charlemagne, hill, street, blues, don't, take, me, alive, steely, dan, put, it, where, you, want, crusaders"
},
"media$content": [
{
"medium": "video",
"url": "http://www.youtube.com/v/yMArrSjSjOo?f=videos&app=youtube_gdata",
"expression": "full",
"yt$format": 5,
"duration": 395,
"type": "application/x-shockwave-flash",
"isDefault": "true"
},
{
"medium": "video",
"url": "rtsp://v5.cache8.c.youtube.com/CiILENy73wIaGQnqjNIorSvAyBMYDSANFEgGUgZ2aWRlb3MM/0/0/0/video.3gp",
"expression": "full",
"yt$format": 1,
"duration": 395,
"type": "video/3gpp"
},
{
"medium": "video",
"url": "rtsp://v1.cache6.c.youtube.com/CiILENy73wIaGQnqjNIorSvAyBMYESARFEgGUgZ2aWRlb3MM/0/0/0/video.3gp",
"expression": "full",
"yt$format": 6,
"duration": 395,
"type": "video/3gpp"
}
],
"media$player": [
{
"url": "http://www.youtube.com/watch?v=yMArrSjSjOo&feature=youtube_gdata"
}
],
"yt$duration": {
"seconds": "395"
},
"media$description": {
"$t": "From a 1988 concert, in which Larry performs some of his famous guitar solos. You'll hear those from: - The theme to the television series \"Hill Street Blues\" - Kid Charlemagne (Steely Dan composition) - Don't Take Me Alive (another Steely Dan composition) - Put It Where You Want It (The Crusaders).",
"type": "plain"
}
},
"author": [
{
"name": {
"$t": "c16031"
},
"uri": {
"$t": "http://gdata.youtube.com/feeds/api/users/c16031"
}
}
],
"yt$statistics": {
"viewCount": "20269",
"favoriteCount": "150"
},
"content": {
"$t": "From a 1988 concert, in which Larry performs some of his famous guitar solos. You'll hear those from: - The theme to the television series \"Hill Street Blues\" - Kid Charlemagne (Steely Dan composition) - Don't Take Me Alive (another Steely Dan composition) - Put It Where You Want It (The Crusaders).",
"type": "text"
},
"link": [
{
"href": "http://www.youtube.com/watch?v=yMArrSjSjOo&feature=youtube_gdata",
"type": "text/html",
"rel": "alternate"
},
{
"href": "http://gdata.youtube.com/feeds/api/videos/yMArrSjSjOo/responses",
"type": "application/atom+xml",
"rel": "http://gdata.youtube.com/schemas/2007#video.responses"
},
{
"href": "http://gdata.youtube.com/feeds/api/videos/yMArrSjSjOo/related",
"type": "application/atom+xml",
"rel": "http://gdata.youtube.com/schemas/2007#video.related"
},
{
"href": "http://gdata.youtube.com/feeds/api/videos/yMArrSjSjOo",
"type": "application/atom+xml",
"rel": "self"
}
],
"published": {
"$t": "2009-02-07T19:37:06.000Z"
},
"georss$where": {
"gml$Point": {
"gml$pos": {
"$t": "37.759857177734375 -122.42340087890625"
}
}
},
"id": {
"$t": "http://gdata.youtube.com/feeds/api/videos/yMArrSjSjOo"
}
},
...
]
}