YouTube API

YouTube Video comments API

List the comments on a video or Short by URL with cursor pagination: text, author, like and reply counts.

$0.80/1k req, pay per request, no subscription.

What the API returnedcomments[0]
{
"id": "UgwVfRopfS2F-WB3aF14AaABAg",
"text": "This is a masterpiece and no one can convince me otherwise.",
"author": "@SimonT80",
"likes": 110,
"replies": 5,
"publishedTime": "9 days ago",
"authorAvatarUrl": string,
"authorId": string,
... 2 more fields
}
Uptime
99.90%
30d · 47,732 calls
Requests
47,733
30d · weekly, last 12 wks
Response
6.0s
median · 30d

Pricing and providers

YouTube Video comments API pricing: one API, 4 interchangeable providers

The cheapest provider serves first. If it fails, the next one takes over in the same call.

You pay
$8.00
$0.80/1k req, only for what you use. No monthly plan.
Your first 125 requests are free with the $0.10 starting balance.

Try it

Get YouTube video comments in one request

requireFieldsarray
Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `likes`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. On a paginated walk it applies to the first page only; later pages stay with the source that page chose, at the price it was quoted. A source that returns only a rounded value for a field does not count as returning it.
Open in
Get a free key
Sample response
Free runs return only the first 3 results. Fund a key to get the full response.

This sample shows 10 of 15 fields. See every field

{
  "found": true,
  "data": {
    "nextCursor": "Eg0SCzVFV2F4bVd",
    "comments": [
      {
        "id": "UgwVfRopfS2F-WB3aF14AaABAg",
        "text": "This is a masterpiece and no one can convince me otherwise.",
        "author": "@SimonT80",
        "likes": 110,
        "replies": 5,
        "publishedTime": "9 days ago"
      }
    ]
  }
}

Full parameter and response reference - every field, type, and example for this endpoint.

Reference

One request, one response shape.

Every field you send and every field you get back, each with a real example.

Last verified 2026-11-06 · uptime and latency measured over 30d

Request body

JSON, posted to this endpoint.

  • urlstring

    https://www.youtube.com/watch?v=dQw4w9WgXcQ

    Full YouTube video URL. Shorts (youtube.com/shorts/...) and youtu.be URLs also work.

  • cursorstring

    Continuation token from a previous response for pagination.

  • orderenum

    Comment order (e.g. top, newest).

  • requireFieldsarray

    Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `likes`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. On a paginated walk it applies to the first page only; later pages stay with the source that page chose, at the price it was quoted. A source that returns only a rounded value for a field does not count as returning it.

You send. A small JSON body. The values shown are examples to replace with your own.

Response

JSON, one example value per field.

each commentdata.comments[]

Populated whenever the provider has data for the entity.

  • authorstring

    @SimonT80

    Populated whenever the provider has data for the entity.

  • authorAvatarUrlstring

    URL of the comment author's avatar image.

  • authorIdstring

    The comment author's YouTube channel ID.

  • authorUrlstring

    Canonical URL of the comment author's channel, tracking query parameters stripped.

  • idstring

    UgwVfRopfS2F-WB3aF14AaABAg

    Populated whenever the provider has data for the entity.

  • likesintegercan require

    110

    Number of likes on the comment. Some sources round large counts (291K instead of the exact figure); name `likes` in requireFields to be served only by a source that returns the exact count.

  • publishedTimestring

    9 days ago

    Populated whenever the provider has data for the entity.

  • repliesinteger

    5

  • repliesContinuationTokenstring

    Token for this comment's replies. Pass it as continuationToken to youtube.comment_replies. Absent when the comment has no replies or the serving source does not return one.

  • textstring

    This is a masterpiece and no one can convince me otherwise.

    Populated whenever the provider has data for the entity.

datadata
  • nextCursorstring

    Eg0SCzVFV2F4bVd

    Opaque cursor for the next page of comments, or null when this lane has no more. Pass it back as cursor to continue.

top level
  • foundboolean

    true

  • reason"not_found"

    Present only when `found` is false, and says why there is no result. `not_found`: the source states the target does not exist, or returned nothing for it. A `found: false` answer is a successful call, not an error, and `costUsd` is what it actually cost.

You get back. Named, typed fields in the same shape whichever source answers.

Selling this API? See the full schema your endpoint must return.

FAQ

About the YouTube Video comments API

The AnyAPI YouTube Video comments API returns YouTube video comments data as normalized JSON from one POST call to /v1/run/youtube.video_comments. List the comments on a video or Short by URL with cursor pagination: text, author, like and reply counts. AnyAPI routes each request across 4 sources and falls back automatically when one fails. It costs from $0.80 per 1,000 requests, in US dollars with no subscription and no monthly minimum. Over the last 30 days, 99.9% of YouTube video comments calls through AnyAPI succeeded, with a median response time of 6.0 seconds across 47,732 measured calls.

It costs from $0.80 per 1,000 requests, in US dollars with no subscription and no monthly minimum. You fund one USD wallet and each call draws it down. Some failed wallet-funded requests incur processing charges that we pass through at cost, with no markup; the error response shows the amount charged.

List the comments on a video or Short by URL with cursor pagination: text, author, like and reply counts. The response is normalized JSON with the same envelope every AnyAPI endpoint returns, so parsing a second endpoint is a change of URL and nothing else.

Over the last 30 days, 99.9% of YouTube video comments calls through AnyAPI succeeded, with a median response time of 6.0 seconds across 47,732 measured calls. These are AnyAPI's own measurements of traffic through the gateway, recomputed continuously, not a published service-level target.

Yes. A new AnyAPI account starts with $0.10 of free balance and no card required, which covers 125 YouTube Video comments calls at $0.0008 each.

AnyAPI asks the next of its 4 sources in the same request, cheapest first, so one source going down does not fail your call.

Send a POST request to https://api.getanyapi.com/v1/run/youtube.video_comments with your AnyAPI key in an "Authorization: Bearer" header and the input as a JSON body. The same key and the same wallet work on every AnyAPI endpoint.

No. You add US dollars to one prepaid AnyAPI balance and each request draws it down. There is no monthly plan and no minimum, and the same balance pays for every AnyAPI endpoint.

Yes. Install @getanyapi/sdk from npm for TypeScript or getanyapi from pip for Python. Both call every AnyAPI endpoint with the same key, and any HTTP client works too.

Yes. An agent can connect to the AnyAPI MCP server at https://api.getanyapi.com/mcp, or create its own free-trial key with one unauthenticated POST to https://api.getanyapi.com/agent/signup and call this endpoint over HTTP.