Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I agree that it seems counterintuitive, but I've been assured through the Youtube Developer Relations Team that the first result of a Search method for a given channel name will always return the correct channel item (and id).</p> <p>Make sure you keep type = "channel" in your search, and you can limit the result set to 1 by including "maxResults=1" in your call.</p> <p>For example, the following call:</p> <blockquote> <p><code>https://www.googleapis.com/youtube/v3/search?part=id%2Csnippet&amp;maxResults=1&amp;q=thejntest&amp;type=channel&amp;key={YOUR_API_KEY}</code></p> </blockquote> <p>returns:</p> <pre><code>{ "kind": "youtube#searchListResponse", "etag": "\"4IfXb8Dc78bqDKapqHxgOpqGpzM/lKqCVcHLORctmp6mp9sgSil_W0w\"", "pageInfo": { "totalResults": 1, "resultsPerPage": 1 }, "items": [ { "kind": "youtube#searchResult", "etag": "\"4IfXb8Dc78bqDKapqHxgOpqGpzM/UoEAOMl45xX5SIWjDGxyS-74WKE\"", "id": { "kind": "youtube#channel", "channelId": "UCWLptbzZMaxQ7doUzgjMg_A" }, "snippet": { "publishedAt": "2013-04-23T08:28:54.000Z", "channelId": "UCWLptbzZMaxQ7doUzgjMg_A", "title": "TheJNtest", "description": "What a wonderful testing world it is!", "thumbnails": { "default": { "url": "https://i.ytimg.com/i/WLptbzZMaxQ7doUzgjMg_A/1.jpg" }, "medium": { "url": "https://i.ytimg.com/i/WLptbzZMaxQ7doUzgjMg_A/mq1.jpg" }, "high": { "url": "https://i.ytimg.com/i/WLptbzZMaxQ7doUzgjMg_A/hq1.jpg" } }, "channelTitle": "TheJNtest" } } ] } </code></pre> <p>where "UCWLptbzZMaxQ7doUzgjMg_A" is your channelId.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload