How to get all comments (more than 100) of a video using YouTube Data API V3?
20:13 12 Apr 2016

I am currently working on a project and I need to collect all the comments of few specific youtube videos.
I am able to get at max 100 comments using commentThreads().list function (More here). Is there any way to get all the comments ?

I am using below function which is provided by Google YouTube Data API developer guide.

def get_comment_threads(youtube, video_id):
  results = youtube.commentThreads().list(
    part="snippet",
    maxResults=100,
    videoId=video_id,
    textFormat="plainText"
  ).execute()

  for item in results["items"]:
    comment = item["snippet"]["topLevelComment"]
    author = comment["snippet"]["authorDisplayName"]
    text = comment["snippet"]["textDisplay"]
    print "Comment by %s: %s" % (author, text)

  return results["items"]
python youtube-api youtube-data-api