API Documentation

YouTube Video Comment Replies API

YouTube Video Comment Replies. HTTPS resource URLs are preferred where supported. Empty results and failures are free.

Test API

YouTube Video Comment Replies. HTTPS resource URLs are preferred where supported. Empty results and failures are free.

Open product page and API Tester

Endpoint and authentication

POST https://api.goanyapi.com/api/v1/youtube/video/comments/replies

Synchronous response, without tasks or polling. Use an API Key or supported OAuth Bearer credential. No Path or Query parameters.

Input parameters

Parameter Location Type Required Default Constraints and meaning
Authorization Header string Yes — Bearer YOUR_API_KEY
Content-Type Header string Yes application/json application/json
cursor JSON body string Yes — Opaque cursor. For replies, obtain data.result.items[].reply_cursor from the corresponding comments endpoint; for subsequent reply pages use data.result.next_cursor. For other lists use data.result.next_cursor. Never invent a cursor. Obtain via goanyapi_youtube_comments (POST /api/v1/youtube/video/comments), with Bearer authentication and JSON body inputs url. Read data.result.items[].reply_cursor. Each nonempty successful request is billed separately. Never auto-submit the target query. minLength: 1 maxLength: 16000

Obtain prerequisite parameters

First call with the same Bearer authentication: POST /api/v1/youtube/video/comments

JSON body parameter Type Required Description
url string Yes YouTube HTTPS resource URL (preferred) or resource ID. Channel URLs accept @handle, /channel/, /c/, /user/; video URLs accept watch?v=, youtu.be/, /shorts/, /embed/, /live/, /v/.
sort string No Comment ordering.
cursor string No Opaque cursor. For replies, obtain data.result.items[].reply_cursor from the corresponding comments endpoint; for subsequent reply pages use data.result.next_cursor. For other lists use data.result.next_cursor. Never invent a cursor.
curl -X POST 'https://api.goanyapi.com/api/v1/youtube/video/comments' -H 'Authorization: Bearer YOUR_API_KEY' -H 'Content-Type: application/json' --data '{"url":"https://www.youtube.com/watch?v=Y334D183ofE"}'

Read data.result.items[].reply_cursor and pass it as cursor. A missing reply cursor cannot be invented. Prerequisite and target requests are charged separately at their database-configured rates; empty results and failures are free. Obtaining a parameter never automatically submits the target request.

Lists expose business items only; raw response and item data are not public fields. Items may include channel/channelId, description and subscriberCountText; comments may include author (string), authorChannelId, publishedTimeText, likeCountText and reply_cursor. Optional fields may be null, empty or absent. Legacy saved responses may use author objects, channel objects, publishedTime or likeCount; do not require those legacy fields in new results.

Output fields

Field Type Meaning
code string ok on success; public error code on failure
message string Status message
data.result object / null Public result; null, empty and absent values are preserved
data.creditsUsed integer Actual configured charge; zero for empty results
data.remainingCredits number Balance after settlement
data.result.next_cursor null Next-page cursor; pass unchanged as cursor
data.result.hasMore boolean More results may exist; a usable different next_cursor is also required
data.result.items array Actual business field; may be empty or absent; formatted counts are not exact integers
data.result.items[].type string Actual business field; may be empty or absent; formatted counts are not exact integers
data.result.items[].id string Actual business field; may be empty or absent; formatted counts are not exact integers
data.result.items[].content string Actual business field; may be empty or absent; formatted counts are not exact integers
data.result.items[].reply_cursor null Reply cursor for this comment; use the matching replies endpoint
data.result.items[].author string / object / null Actual business field; may be empty or absent; formatted counts are not exact integers
data.result.items[].author.channelId string Actual business field; may be empty or absent; formatted counts are not exact integers
data.result.items[].author.displayName string Actual business field; may be empty or absent; formatted counts are not exact integers
data.result.items[].author.avatarThumbnailUrl string Actual business field; may be empty or absent; formatted counts are not exact integers
data.result.items[].author.isVerified boolean Actual business field; may be empty or absent; formatted counts are not exact integers
data.result.items[].author.isCreator boolean Actual business field; may be empty or absent; formatted counts are not exact integers
data.result.items[].author.isArtist boolean Actual business field; may be empty or absent; formatted counts are not exact integers
data.result.items[].publishedTime string Actual business field; may be empty or absent; formatted counts are not exact integers
data.result.items[].replyLevel number Actual business field; may be empty or absent; formatted counts are not exact integers
data.result.items[].likeCount string Actual business field; may be empty or absent; formatted counts are not exact integers
data.result.items[].replyCount string Actual business field; may be empty or absent; formatted counts are not exact integers
data.result.items[].channel string / object / null May appear for the corresponding item type; preserved as returned, not guaranteed.
data.result.items[].channelId string / null May appear for the corresponding item type; preserved as returned, not guaranteed.
data.result.items[].description string / null May appear for the corresponding item type; preserved as returned, not guaranteed.
data.result.items[].subscriberCountText string / null May appear for the corresponding item type; preserved as returned, not guaranteed.
data.result.items[].authorChannelId string / null May appear for the corresponding item type; preserved as returned, not guaranteed.
data.result.items[].publishedTimeText string / null May appear for the corresponding item type; preserved as returned, not guaranteed.
data.result.items[].likeCountText string / null May appear for the corresponding item type; preserved as returned, not guaranteed.
data.result.items[].videoId string / null May appear for the corresponding item type; preserved as returned, not guaranteed.

List length is the current page count, not a total. Page size is not fixed. Continue only when hasMore is true and next_cursor is nonempty and differs from the current cursor. Reply queries start with reply_cursor and continue with next_cursor.

Request example

curl -X POST 'https://api.goanyapi.com/api/v1/youtube/video/comments/replies' -H 'Authorization: Bearer YOUR_API_KEY' -H 'Content-Type: application/json' --data '{"cursor":"Eg0SC1kzMzREMTgzb2ZFGAYygwEaUBIaVWd3QzhGLU9KSTh6al9nUVpSaDRBYUFCQWciAggAKhhVQ3BnZGR5bXhJSXpYOTE0bUY2Qm56elEyC1kzMzREMTgzb2ZFQAFICoIBAggBQi9jb21tZW50LXJlcGxpZXMtaXRlbS1VZ3dDOEYtT0pJOHpqX2dRWlJoNEFhQUJBZw%3D%3D"}'

Real response example

This real sample was captured with an earlier response version and may contain legacy field names. It has not been recaptured or rewritten for this update.

Captured from a real request. Only live data.creditsUsed and data.remainingCredits are omitted. Media and caption URLs may have expired.

{
  "code": "ok",
  "message": "ok",
  "data": {
    "result": {
      "next_cursor": null,
      "hasMore": false,
      "items": [
        {
          "type": "comment",
          "id": "UgwC8F-OJI8zj_gQZRh4AaABAg.AdCeBqNk-3zAdK6GrJYE3v",
          "content": "True story",
          "reply_cursor": null,
          "author": {
            "channelId": "UCQkQ-Ps3NTeLBf-8CntNx0w",
            "displayName": "@MrvybesG",
            "avatarThumbnailUrl": "https://yt3.ggpht.com/N3AckaeEs6lUh4Y_2WFpyhcIJDfg73MGJ_HSp4ajXm0l9Odd3rybc8UXfmI3UUm81VPCmBtr=s88-c-k-c0x00ffffff-no-rj",
            "isVerified": false,
            "isCreator": false,
            "isArtist": false
          },
          "publishedTime": "2 days ago",
          "replyLevel": 1,
          "likeCount": "1",
          "replyCount": ""
        },
        {
          "type": "comment",
          "id": "UgwC8F-OJI8zj_gQZRh4AaABAg.AdCeBqNk-3zAdQ-17_zPzw",
          "content": "Well said.",
          "reply_cursor": null,
          "author": {
            "channelId": "UCbzvo7MTJz0JN8-mdtk7rdA",
            "displayName": "@annachlipalski664",
            "avatarThumbnailUrl": "https://yt3.ggpht.com/ytc/AIdro_laKUjksfoci4SchqIX5qZicxyBZOGE3LS0gHlvryM=s88-c-k-c0x00ffffff-no-rj",
            "isVerified": false,
            "isCreator": false,
            "isArtist": false
          },
          "publishedTime": "3 hours ago",
          "replyLevel": 1,
          "likeCount": " ",
          "replyCount": ""
        }
      ]
    }
  }
}

Billing and status codes

…

Each endpoint uses its own database-configured price. Only nonempty successful results are charged; empty results and failures are free. Pages are billed separately. Missing optional titles or descriptions do not invalidate a record. Media results are empty when both video and captions are empty.

HTTP Meaning
200 Query completed; may be empty
400 Invalid JSON or parameters
401 Authentication failed
402 Insufficient credits
429 Rate limited; honor Retry-After
502 Data request failed
503 API or pricing not configured