3
votes

When I perform the following YouTube Data API request to list commentThreads, pageInfo/totalResults isn't returned in the response.

I expect pageInfo/totalResults to be returned per the documentation.

GET https://www.googleapis.com/youtube/v3/commentThreads?part=snippet%2Creplies&videoId=dGidYBqBHVw&key={YOUR_API_KEY}

For example, if you use the API Explorer, and enter:

  • part: snippet,replies
  • videoId: dGidYBqBHVw

The response returns 200 OK with the rest of the data, but omits the pageInfo/totalResults value:

"pageInfo": {
  "resultsPerPage": 20
} 
2

2 Answers

0
votes

I just tried the request you posted and got

{
 "kind": "youtube#commentThreadListResponse",
 "etag": "\"sGDdEsjSJ_SnACpEvVQ6MtTzkrI/p78HIXZZWNay4CG1YPcS0NCjiOw\"",
 "nextPageToken": "Cg0QnNnZ0pTFxwIgACgBEhQIABCI5cnWjcTHAhi4kKTI3bvHAhgCIBQondOJjuX1p_e5AQ==",
 "pageInfo": {
  "totalResults": 20,
  "resultsPerPage": 20
 },...
}

Seems like it's been fixed.

0
votes

I have also tired for it. It works for me. Youtube or Google usually change their apis format or data structures. It is not a big thing.