Anthony Battaglia
Anthony Battaglia

Reputation: 2917

YouTube Data API v3 Search Missing Videos

I'm trying to access recent videos for channel "UC8-Th83bH_thdKZDJCrn88g" using the youtube.search.list API method, however I'm getting different results than what I'm seeing on the page.

Following the documentation:

GET https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UC8-Th83bH_thdKZDJCrn88g&maxResults=10&order=date&type=video&fields=items(id(videoId),snippet(channelId,publishedAt,title))&key={YOUR_API_KEY}

{
 "items": [
  {
   "id": {
    "videoId": "BY4cV6B25fQ"
   },
   "snippet": {
    "publishedAt": "2019-09-19T09:00:00.000Z",
    "channelId": "UC8-Th83bH_thdKZDJCrn88g",
    "title": "Nick Kroll Shares His Impressions of Dogs, Sheep and French Dolphins"
   }
  },
  {
   "id": {
    "videoId": "iVx7gzO17gA"
   },
   "snippet": {
    "publishedAt": "2019-09-19T03:40:47.000Z",
    "channelId": "UC8-Th83bH_thdKZDJCrn88g",
    "title": "Wheel of Impressions with Nick Kroll"
   }
  },
  {
   "id": {
    "videoId": "yNiHAm0fVME"
   },
   "snippet": {
    "publishedAt": "2019-09-13T10:30:02.000Z",
    "channelId": "UC8-Th83bH_thdKZDJCrn88g",
    "title": "Jim Jefferies Let an Identity Thief Keep Using His Credit Card"
   }
  },
  {
   "id": {
    "videoId": "HZ-O9SxQKA4"
   },
   "snippet": {
    "publishedAt": "2019-09-13T10:00:05.000Z",
    "channelId": "UC8-Th83bH_thdKZDJCrn88g",
    "title": "Jim Jefferies Is a Fail to His Son and a Bad Immigrant to America"
   }
  },
  {
   "id": {
    "videoId": "8y0C4JPf3-s"
   },
   "snippet": {
    "publishedAt": "2019-09-13T09:30:01.000Z",
    "channelId": "UC8-Th83bH_thdKZDJCrn88g",
    "title": "Jennifer Garner's Daughter Affectionately Calls Her "Fun-Killer" Mom"
   }
  },
  {
   "id": {
    "videoId": "hEKKS93d3Co"
   },
   "snippet": {
    "publishedAt": "2019-09-13T09:00:08.000Z",
    "channelId": "UC8-Th83bH_thdKZDJCrn88g",
    "title": "Thank You Notes: Hustlers for Casting Lizzo, Fancy Bloody Marys"
   }
  },
  {
   "id": {
    "videoId": "5KxL7RkT4S0"
   },
   "snippet": {
    "publishedAt": "2019-09-12T09:00:00.000Z",
    "channelId": "UC8-Th83bH_thdKZDJCrn88g",
    "title": "Kim Kardashian West Sets the Record Straight About Moving to Wyoming"
   }
  },
  {
   "id": {
    "videoId": "fEATS2F46vg"
   },
   "snippet": {
    "publishedAt": "2019-09-12T09:00:09.000Z",
    "channelId": "UC8-Th83bH_thdKZDJCrn88g",
    "title": "Kim Kardashian West and Winnie Harlow Bonded Over Autoimmune Issues"
   }
  },
  {
   "id": {
    "videoId": "3GNjbAACqIY"
   },
   "snippet": {
    "publishedAt": "2019-09-12T03:51:27.000Z",
    "channelId": "UC8-Th83bH_thdKZDJCrn88g",
    "title": "Show Me Your Phone w/ Kim Kardashian West"
   }
  },
  {
   "id": {
    "videoId": "1htjuCla5Bw"
   },
   "snippet": {
    "publishedAt": "2019-09-11T10:30:01.000Z",
    "channelId": "UC8-Th83bH_thdKZDJCrn88g",
    "title": "Russell Westbrook Teaches Jimmy His Seated Pre-Game Dance Routine"
   }
  }
 ]
}

Which is omitting a lot of videos that I can see on the channel's uploads page (sorted by Date added, newest): latenight youtube videos

The first video returned in the API response appears as the 12th video on the Channel's page. Additionall, there are 3 videos seen on screen between the first video in the API response and the second video in the API response.

Upvotes: 3

Views: 415

Answers (1)

KevinKefgen
KevinKefgen

Reputation: 21

It’s freaked me out for about ten days. Thought my renaming script got messed up. Luckily (?) it’s on the API end, and there’s an open issue on it...

https://support.google.com/youtube/thread/14611425?hl=en

Hope that eases your concern!

Upvotes: 2

Related Questions