YouTube API

YouTube Comments API

Get the top or newest comments of a video as JSON, with likes, reply counts, and pinned and creator-hearted flags.

  • 100 free credits
  • No card needed
  • No Google Cloud project or OAuth
curl "https://pipefetch.com/v1/youtube/comments?video=jNQXAC9IVRw&limit=20" \
  -H "x-api-key: YOUR_API_KEY"
The response

What you get

  • Up to 100 top-level comments per request, top or newest first
  • Text, like count and reply count for each
  • Pinned and hearted-by-creator flags
  • The author's public name, channel and whether it is the video's owner
  • The video's total comment count
200 OK ยท application/json
{
  "data": {
    "videoId": "jNQXAC9IVRw",
    "totalComments": 10000000,
    "comments": [
      {
        "id": "UgzuC3zzpRZkjc5Qzsd4AaABAg",
        "text": "We're so honored that the first ever YouTube video was filmed here!",
        "likeCount": 4800000,
        "replyCount": 986,
        "publishedText": "6 years ago",
        "isPinned": true,
        "isHeartedByCreator": true,
        "author": {
          "name": "@SanDiegoZoo",
          "channelId": "UCC5NfQ6Mf0dq_eEwv4P_hWA",
          "channelUrl": "https://www.youtube.com/channel/UCC5NfQ6Mf0dq_eEwv4P_hWA",
          "avatarUrl": "https://yt3.ggpht.com/i8RqA9tYqbbnOi4mlnYEY7IR3kXAoDqQbM_5Sfzw7OjTubiGsOaTdlrIZmj-I0q0Vup68eqs=s88-c-k-c0x00ffffff-no-rj",
          "isVerified": true,
          "isChannelOwner": false
        }
      }
    ]
  },
  "credits": {
    "used": 1,
    "remaining": 99
  }
}
Reference

One GET request

Everything the endpoint accepts. The full reference, with the complete example response, is in the docs.

GET/v1/youtube/comments

Costs 1 credit per 20 items requested. Only requests that return data are charged.

Parameters

NameTypeDescription
videorequired string Video URL or 11-character video id. Watch, youtu.be, Shorts, embed and live links all work.
limitoptional integer How many comments to return. Every started 20 comments cost 1 credit. Default: 20. From 1 to 100.
sortoptional string Top comments first, or newest first. One of: top, newest. Default: top.

Good to know

  • Top-level comments only; replyCount tells you how many replies each one has.
  • A video with comments turned off answers 404 comments_disabled and costs nothing.

Open the reference

Use cases

What people build with it

  • Sentiment analysis

    Measure how an audience reacts to a video, a product or a launch.

  • Audience research

    Find the questions and objections people raise under videos in your market.

  • Community monitoring

    Read the newest comments on your own or a competitor's videos as they come in.

Pricing

Buy credits once. Use them whenever.

This endpoint costs 1 credit per 20 items requested, and a request that returns no data costs nothing. Move the slider to see what your volume costs.

5,000requests a month
5005,00050,000250,000
5,000video transcripts
5,000searches or video lookups
100,000comments

One credit is one request that returns data. Requests that return nothing are free.

Best fit
Builder pack
12,000 credits, one-time payment
$29once
  • $2.42 per 1,000 requests
  • About $12.08 a month at this pace
  • Lasts about 2.4 months at this pace
  • Credits never expire
Start with 100 free credits

See all packs and what a credit buys

FAQ

Questions and answers

Are replies included?

Not yet. You get top-level comments, and replyCount tells you how many replies each one has.

What does a request cost?

Every started 20 comments cost 1 credit, so 20 comments are 1 credit and 100 comments are 5. Credit packs start at $9 for 3,000 credits and never expire. A request that returns no data is not charged.

What if comments are turned off?

The request answers 404 comments_disabled and costs nothing.

Do comments contain personal data?

They contain the public names of the people who wrote them. If you store or process them, data-protection law such as the GDPR applies to you as it would to any other source.

More

More YouTube APIs

Make your first request in a minute

Sign in, copy your key and call an endpoint. Your account starts with 100 free credits.