Skip to content

Instantly share code, notes, and snippets.

@paulomcnally
Created December 7, 2014 01:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulomcnally/620b76a9afe81f56e8c9 to your computer and use it in GitHub Desktop.
Save paulomcnally/620b76a9afe81f56e8c9 to your computer and use it in GitHub Desktop.
{
"kind": "youtube#searchListResponse",
"etag": "\"BDC7VThyM9nfoSQm1_kOyhtJTEw/0MX1aovXL6JrPZ_tgqxLQ_YhGWI\"",
"nextPageToken": "CAIQAA",
"pageInfo": {
"totalResults": 680321,
"resultsPerPage": 2
},
"items": [
{
"kind": "youtube#searchResult",
"etag": "\"BDC7VThyM9nfoSQm1_kOyhtJTEw/a-ZTQv003uYyrrI2GTNl4LqjzoA\"",
"id": {
"kind": "youtube#video",
"videoId": "HcwTxRuq-uk"
},
"snippet": {
"publishedAt": "2012-11-09T00:01:39.000Z",
"channelId": "UCRX7UEyE8kp35mPrgC2sosA",
"title": "World War Z - Official Trailer (HD)",
"description": "http://www.joblo.com - \"World War Z\" - Official Trailer Source: http://trailers.apple.com/trailers/paramount/worldwarz/ World War Z Twitter: https://twitter....",
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/HcwTxRuq-uk/default.jpg"
},
"medium": {
"url": "https://i.ytimg.com/vi/HcwTxRuq-uk/mqdefault.jpg"
},
"high": {
"url": "https://i.ytimg.com/vi/HcwTxRuq-uk/hqdefault.jpg"
}
},
"channelTitle": "joblomovienetwork",
"liveBroadcastContent": "none"
}
},
{
"kind": "youtube#searchResult",
"etag": "\"BDC7VThyM9nfoSQm1_kOyhtJTEw/zGTXymwvzqbUAYTanZwl0i0aw6g\"",
"id": {
"kind": "youtube#video",
"videoId": "4EC7P5WdUko"
},
"snippet": {
"publishedAt": "2013-03-25T07:02:54.000Z",
"channelId": "UCkR0GY0ue02aMyM-oxwgg9g",
"title": "World War Z TRAILER 2 (2013) - Brad Pitt Movie HD",
"description": "Subscribe to TRAILERS: http://bit.ly/sxaw6h Subscribe to COMING SOON: http://bit.ly/H2vZUn Like us on FACEBOOK:http://goo.gl/dHs73. World War Z TRAILER ...",
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/4EC7P5WdUko/default.jpg"
},
"medium": {
"url": "https://i.ytimg.com/vi/4EC7P5WdUko/mqdefault.jpg"
},
"high": {
"url": "https://i.ytimg.com/vi/4EC7P5WdUko/hqdefault.jpg"
}
},
"channelTitle": "MovieclipsCOMINGSOON",
"liveBroadcastContent": "none"
}
}
]
}
@ZippyTheDoggy
Copy link

Hey, I know it's been a few years since you posted this, so you might not respond, but I was wondering how do I get the "videoId" for the first result?

If you want, my discord is ZippyTheDoggy#9276

@heitoke
Copy link

heitoke commented May 5, 2019

result.items[0].id.videoId

@R4tonBaveur
Copy link

Hello, I was wondering how can I return the result from
youTube.search('World War z Trailer', 2, function(error, result) {
if (error) {
console.log(error);
}
else {
console.log(JSON.stringify(result, null, 2));
}
}).
Thank you in advance 👍

@zyxkemren
Copy link

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment