YouTube Data API v3 - Comment comments comments does not return the number of final results

When I make the following YouTube Data API request for the comment list, it is pageInfo/totalResults

not returned in the response.

I expect to pageInfo/totalResults

be returned in the documentation .

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

      

For example, if you are using API Explorer and type:

  • part : snippet, answers
  • videoId : dGidYBqBHVw

The response returns 200 OK

with the rest of the data, but doesn't matter pageInfo/totalResults

:

"pageInfo": {
  "resultsPerPage": 20
} 

      

+3


source to share


2 answers


I just tried the request you sent and got

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

      



It seems to be fixed.

0


source


I am also tired. I like. Youtube or Google usually change the apis format or data structures. This is not a big thing.



0


source







All Articles