> **For coding agents and LLMs:** This is one page from the Social Fetch docs (markdown export). The sections below mirror the orientation block in [`/llms.txt`](https://www.socialfetch.dev/llms.txt); use [`/llms.json`](https://www.socialfetch.dev/llms.json) when you need a structured operation inventory. The catalog covers documented operations with on-site reference pages.

## This page

- **On-site (HTML):** [https://www.socialfetch.dev/docs/api/v1/youtube/videos/comments/get](https://www.socialfetch.dev/docs/api/v1/youtube/videos/comments/get)
- **Markdown (.mdx) URL:** [https://www.socialfetch.dev/docs/api/v1/youtube/videos/comments/get.mdx](https://www.socialfetch.dev/docs/api/v1/youtube/videos/comments/get.mdx)

## API base URL and authentication

- **API origin (from OpenAPI `servers`):** `https://api.socialfetch.dev`
- **Authentication:** send `x-api-key: sfk_...` on `/v1/**` routes unless the operation is explicitly anonymous (check OpenAPI `security`, the [API reference hub](https://www.socialfetch.dev/docs/api.mdx), [`/llms.txt`](https://www.socialfetch.dev/llms.txt), or [`/llms.json`](https://www.socialfetch.dev/llms.json) for each route).
- **OpenAPI JSON:** [https://www.socialfetch.dev/openapi.json](https://www.socialfetch.dev/openapi.json)

## Recommended docs entrypoints (this site)

- [Documentation overview](https://www.socialfetch.dev/docs.mdx) — top-level orientation (markdown).
- [Quickstart](https://www.socialfetch.dev/docs/quickstart.mdx) — authenticate with `x-api-key`, validate auth with `whoami`, and understand the JSON envelope.
- [SDK](https://www.socialfetch.dev/docs/sdk.mdx) — official TypeScript SDK guide, including `SocialFetchClient`, `Result`, and `unwrap()`.
- [SDK reference](https://www.socialfetch.dev/docs/sdk-reference.mdx) — exhaustive SDK method inventory and route mapping for agents, tooling, and power users.
- [Choose the right endpoint](https://www.socialfetch.dev/docs/choose-endpoint.mdx) — task-oriented route selection for smoke tests, profiles, list endpoints, and single-item lookups.
- [Capability matrix](https://www.socialfetch.dev/docs/capability-matrix.mdx) — fast comparison of identifiers, pagination, outcomes, media download, and SDK coverage.
- [`/llms.json`](https://www.socialfetch.dev/llms.json) — structured machine-readable operation inventory with parameter names, pagination, outcomes, credits, and SDK mapping.
- [API reference hub](https://www.socialfetch.dev/docs/api.mdx) — human-friendly index of operations with links into generated pages.
- [Errors](https://www.socialfetch.dev/docs/errors.mdx) — shared error envelope and HTTP status guidance.
- [Credits](https://www.socialfetch.dev/docs/credits.mdx) — metering, `402`, and planning batch jobs.
- Outcome semantics such as `found`, `not_found`, and `private` are documented in [Errors](https://www.socialfetch.dev/docs/errors.mdx) and on operation pages when present in the OpenAPI contract.

## Markdown docs convention

- Every docs page has a markdown twin: append **`.mdx`** to the docs pathname (for example `/docs/quickstart` → `/docs/quickstart.mdx`).
- Agents that send `Accept: text/markdown` on `/docs/**` HTML URLs may receive markdown directly (same URL, `Vary: Accept`).

---
# List YouTube video comments (https://www.socialfetch.dev/docs/api/v1/youtube/videos/comments/get)

## Summary

Get comments on a YouTube video.

**Tags:** `YouTube`

## HTTP

- **Method:** GET
- **Path:** `/v1/youtube/videos/comments`
- **Base URL:** `https://api.socialfetch.dev`

## Capability summary

- **SDK mapping:** `client.youtube.getVideoComments({ url, cursor?, order? })`
- **Accepted identifiers:** `url` (query)
- **Pagination:** cursor via `cursor`, next cursor: `data.page.nextCursor`, has more: `data.page.hasMore`
- **Business outcome field:** `data.lookupStatus` with values `found`, `not_found`

## Credits

- **Base:** 1 credit per successful lookup.
- **Maximum on success (200):** 1 credit.
- **Normalization failure (502):** 1 credit charged.
- **Authoritative field:** `meta.creditsCharged`.

## Authentication

- **`x-api-key`**: API key (`sfk_...`)

## Parameters

### `url` (query)

- **Required:** yes
- **Constraints:** type `string`; minLength: 1; maxLength: 4096
- **Description:** Link to the YouTube video whose comments should be listed.

### `cursor` (query)

- **Required:** no
- **Constraints:** type `string`; minLength: 1
- **Description:** Opaque cursor from a previous response to fetch the next page.

### `order` (query)

- **Required:** no
- **Constraints:** type `string`; enum: top, newest
- **Description:** Comment sort order. `top` returns highest-ranked comments; `newest` returns the most recent comments.

## Pagination

This endpoint uses **cursor-based pagination** via the `cursor` query parameter.

- Read **hasMore** from `data.page.hasMore`.
- When that value is `true`, read **nextCursor** from `data.page.nextCursor` and pass it as the `cursor` query parameter on the **next** request (URL-encode when building a query string).
- Omit `cursor` on the **first** request.
- Stop when **hasMore** is `false` or **nextCursor** is null (end of list).

## Responses (status codes)

- **200**: Comment listing result. Check `data.lookupStatus` for `found` or `not_found`.
- **400**: Invalid request
- **401**: Missing or invalid API key
- **402**: Insufficient credits
- **500**: Unexpected or billing error
- **502**: Lookup could not be completed from the response (unexpected or invalid data).
- **503**: Service temporarily unavailable; safe to retry with backoff.

## Response body (200)

Comment listing result. Check `data.lookupStatus` for `found` or `not_found`.

### Field outline

- **data** (required) — type `object`. Endpoint-specific response payload.
  - **lookupStatus** (required) — type `string`; enum: found, not_found. Whether the video was resolved for this request.
  - **comments** (required) — type `array`. Top-level comments for the resolved video.
    - _items:_
      - **id** (required) — type `string`; minLength: 1. Stable identifier for the comment.
      - **text** (required) — type `string`. Comment text.
      - **createdAt** (required) — type `string`. ISO-8601 timestamp when the comment was published.
      - **publishedTimeText** (required) — type `string`; nullable. Human-readable relative publish time when available.
      - **likeCount** (required) — type `integer`; minimum: 0. Like count on the comment.
      - **replyCount** (required) — type `integer`; minimum: 0. Direct reply count for the comment thread.
      - **repliesCursor** (required) — type `string`; nullable. Use as `cursor` on comment replies. Null when unavailable.
      - **author** (required) — type `object`. Comment author.
        - **handle** (required) — type `string`; minLength: 1. Public YouTube channel handle without a leading @.
        - **displayName** (required) — type `string`; nullable. Display name shown on the commenter channel.
        - **platformUserId** (optional) — type `string`. YouTube channel id when available.
        - **verified** (required) — type `boolean`. Whether the commenter channel is verified.
        - **creator** (required) — type `boolean`. Whether the commenter is the video creator.
        - **avatarUrl** (required) — type `string`; nullable. Profile image URL for the commenter when available.
        - **channelUrl** (required) — type `string`; nullable. Channel page URL when available.
  - **page** (required) — type `object`. Pagination information for this response.
    - **nextCursor** (required) — type `string`; nullable. Cursor to pass in the next request when more pages exist.
    - **hasMore** (required) — type `boolean`. Whether another page of comments is available.
- **meta** (required) — type `object`. Metadata describing the request and billing outcome.
  - **requestId** (required) — type `string`; minLength: 1. Unique request identifier for tracing this API call.
  - **creditsCharged** (required) — type `integer`; minimum: 0. Credits charged for this request.
  - **version** (required) — type `string`; enum: v1. Public API version that served the response.

### Example JSON (found)

```json
{
  "data": {
    "lookupStatus": "found",
    "comments": [
      {
        "id": "Ugzge340dBgB75hWBm54AaABAg",
        "text": "can confirm: he never gave us up",
        "createdAt": "2025-05-19T04:37:01.166Z",
        "publishedTimeText": "1 year ago",
        "likeCount": 241000,
        "replyCount": 960,
        "repliesCursor": "Eg0SC2RRdzR3OVdnWGNRGAYygwEaUBIaVWd6Z2UzNDBkQmdCNzVoV0JtNTRBYUFCQWciAggAKhhVQ3VBWEZrZ3N3MUw3eGFDZm5kNUpKT3cyC2RRdzR3OVdnWGNRQABICoIBAggBQi9jb21tZW50LXJlcGxpZXMtaXRlbS1VZ3pnZTM0MGRCZ0I3NWhXQm01NEFhQUJBZw%3D%3D",
        "author": {
          "handle": "YouTube",
          "displayName": "@YouTube",
          "platformUserId": "UCBR8-60-B28hp2BmDPdntcQ",
          "verified": true,
          "creator": false,
          "avatarUrl": "https://yt3.ggpht.com/3s6evpqAiDU9tQR4sC2siJippbH2RWVPnwHgyl4V0th2iuQz0VDQZbUhQBGmsxLYo-mjG6TqZQ=s88-c-k-c0x00ffffff-no-rj",
          "channelUrl": "https://youtube.com/@YouTube"
        }
      },
      {
        "id": "UgyEnXfdC-umwvTt8JF4AaABAg",
        "text": "Gonna flag this for nudity so I can rick roll the YouTube staff",
        "createdAt": "2020-05-19T04:37:01.166Z",
        "publishedTimeText": "6 years ago",
        "likeCount": 551000,
        "replyCount": 590,
        "repliesCursor": "Eg0SC2RRdzR3OVdnWGNRGAYygwEaUBIaVWd5RW5YZmRDLXVtd3ZUdDhKRjRBYUFCQWciAggAKhhVQ3VBWEZrZ3N3MUw3eGFDZm5kNUpKT3cyC2RRdzR3OVdnWGNRQAFICoIBAggBQi9jb21tZW50LXJlcGxpZXMtaXRlbS1VZ3lFblhmZEMtdW13dlR0OEpGNEFhQUJBZw%3D%3D",
        "author": {
          "handle": "Oatman69",
          "displayName": "@Oatman69",
          "platformUserId": "UCWf34D_s8K_m2vwBISIDWtg",
          "verified": false,
          "creator": false,
          "avatarUrl": "https://yt3.ggpht.com/ghenbV7T5VMOA3iqp3PThC82exqcu7iVng_iWNx1Ujak72Ti4oZZ_XzSVzIrfk9arP1XrFtnZA=s88-c-k-c0x00ffffff-no-rj",
          "channelUrl": "https://youtube.com/@Oatman69"
        }
      },
      {
        "id": "UgzH1AYZTHMMZ8is2Rd4AaABAg",
        "text": "Petition to make this the national anthem of the internet",
        "createdAt": "2020-05-19T04:37:01.166Z",
        "publishedTimeText": "6 years ago",
        "likeCount": 140000,
        "replyCount": 964,
        "repliesCursor": "Eg0SC2RRdzR3OVdnWGNRGAYygwEaUBIaVWd6SDFBWVpUSE1NWjhpczJSZDRBYUFCQWciAggAKhhVQ3VBWEZrZ3N3MUw3eGFDZm5kNUpKT3cyC2RRdzR3OVdnWGNRQABICoIBAggBQi9jb21tZW50LXJlcGxpZXMtaXRlbS1VZ3pIMUFZWlRITU1aOGlzMlJkNEFhQUJBZw%3D%3D",
        "author": {
          "handle": "SonimodGT",
          "displayName": "@SonimodGT",
          "platformUserId": "UC22XFsGtRW-YuwyzgoF53ZA",
          "verified": false,
          "creator": false,
          "avatarUrl": "https://yt3.ggpht.com/71aRHxohwkSue6uJ0p_PsZlj7xyyh_SFFqz3K2LOOFp4H3Y4zKXPY0Sa5MCiob0SYAYBizRbxR0=s88-c-k-c0x00ffffff-no-rj",
          "channelUrl": "https://youtube.com/@SonimodGT"
        }
      },
      {
        "id": "UgxIOV-sXAchpKX94cB4AaABAg",
        "text": "1987 : normal song \r\n2026 : national anthem of the universe",
        "createdAt": "2020-05-19T04:37:01.166Z",
        "publishedTimeText": "6 years ago (edited)",
        "likeCount": 128000,
        "replyCount": 933,
        "repliesCursor": "Eg0SC2RRdzR3OVdnWGNRGAYygwEaUBIaVWd4SU9WLXNYQWNocEtYOTRjQjRBYUFCQWciAggAKhhVQ3VBWEZrZ3N3MUw3eGFDZm5kNUpKT3cyC2RRdzR3OVdnWGNRQABICoIBAggBQi9jb21tZW50LXJlcGxpZXMtaXRlbS1VZ3hJT1Ytc1hBY2hwS1g5NGNCNEFhQUJBZw%3D%3D",
        "author": {
          "handle": "ochkalov",
          "displayName": "@ochkalov",
          "platformUserId": "UCtbyFPryy7J4DR4xh5CRCvA",
          "verified": false,
          "creator": false,
          "avatarUrl": "https://yt3.ggpht.com/mnit-bn8T-v7Z3XoOg71uoXPsN0sErvP-fCJzUboX6CfdJTnQjssN1QATams-lV9zMyZoqwI1Q=s88-c-k-c0x00ffffff-no-rj",
          "channelUrl": "https://youtube.com/@ochkalov"
        }
      },
      {
        "id": "Ugwbeb0IngkhdpQo5CJ4AaABAg",
        "text": "I got rickrolled by myself🥀",
        "createdAt": "2026-05-16T04:37:01.166Z",
        "publishedTimeText": "3 days ago",
        "likeCount": 66,
        "replyCount": 0,
        "repliesCursor": null,
        "author": {
          "handle": "SamuelMilano_2012",
          "displayName": "@SamuelMilano_2012",
          "platformUserId": "UCPwXUXnEh7aeBL_CKZCNHCw",
          "verified": false,
          "creator": false,
          "avatarUrl": "https://yt3.ggpht.com/GQqdyu5AO4deGEzzSbWICrwPEOiYnfOFDPzqTOXq8_5cO3KTQc8d7K3b2Tn81vjyGFn8c4Vw=s88-c-k-c0x00ffffff-no-rj",
          "channelUrl": "https://youtube.com/@SamuelMilano_2012"
        }
      },
      {
        "id": "UgzPApZxcYo19-4WtQB4AaABAg",
        "text": "pov: You Scanned a QR CODE",
        "createdAt": "2026-04-28T04:37:01.166Z",
        "publishedTimeText": "3 weeks ago",
        "likeCount": 2300,
        "replyCount": 134,
        "repliesCursor": "Eg0SC2RRdzR3OVdnWGNRGAYygwEaUBIaVWd6UEFwWnhjWW8xOS00V3RRQjRBYUFCQWciAggAKhhVQ3VBWEZrZ3N3MUw3eGFDZm5kNUpKT3cyC2RRdzR3OVdnWGNRQAFICoIBAggBQi9jb21tZW50LXJlcGxpZXMtaXRlbS1VZ3pQQXBaeGNZbzE5LTRXdFFCNEFhQUJBZw%3D%3D",
        "author": {
          "handle": "QaderOriginal",
          "displayName": "@QaderOriginal",
          "platformUserId": "UC6rhJs3GhQolIq_p47rRJ_w",
          "verified": false,
          "creator": false,
          "avatarUrl": "https://yt3.ggpht.com/qpJDoUTUwVViPoGaK13LXMh7JT2oo-3g5VUOWtPG578_Hlz-AdYUBSNZXUb9ueMgWGBPawJxS2w=s88-c-k-c0x00ffffff-no-rj",
          "channelUrl": "https://youtube.com/@QaderOriginal"
        }
      },
      {
        "id": "Ugw10bSluCDSZMIxUSB4AaABAg",
        "text": "Let’s put the meme aside, this is actually a banging song.",
        "createdAt": "2020-05-19T04:37:01.166Z",
        "publishedTimeText": "6 years ago",
        "likeCount": 211000,
        "replyCount": 525,
        "repliesCursor": "Eg0SC2RRdzR3OVdnWGNRGAYygwEaUBIaVWd3MTBiU2x1Q0RTWk1JeFVTQjRBYUFCQWciAggAKhhVQ3VBWEZrZ3N3MUw3eGFDZm5kNUpKT3cyC2RRdzR3OVdnWGNRQAFICoIBAggBQi9jb21tZW50LXJlcGxpZXMtaXRlbS1VZ3cxMGJTbHVDRFNaTUl4VVNCNEFhQUJBZw%3D%3D",
        "author": {
          "handle": "LK-ht7qz",
          "displayName": "@LK-ht7qz",
          "platformUserId": "UCHpvHTRSILoOFKWX5oFCYDA",
          "verified": false,
          "creator": false,
          "avatarUrl": "https://yt3.ggpht.com/RJnrz4JwDmHNgtFdnVdJ6FKLiuo59IuHkY6bvqaEJM0mxTSlq0GKQs_ItA-sJ8QMqps_lf9Lvgs=s88-c-k-c0x00ffffff-no-rj",
          "channelUrl": "https://youtube.com/@LK-ht7qz"
        }
      },
      {
        "id": "UgwTYG8iLuateRO4sAV4AaABAg",
        "text": "I got rickrolled by a link saying it got taken down.",
        "createdAt": "2026-02-19T04:37:01.166Z",
        "publishedTimeText": "3 months ago",
        "likeCount": 25000,
        "replyCount": 843,
        "repliesCursor": "Eg0SC2RRdzR3OVdnWGNRGAYygwEaUBIaVWd3VFlHOGlMdWF0ZVJPNHNBVjRBYUFCQWciAggAKhhVQ3VBWEZrZ3N3MUw3eGFDZm5kNUpKT3cyC2RRdzR3OVdnWGNRQAFICoIBAggBQi9jb21tZW50LXJlcGxpZXMtaXRlbS1VZ3dUWUc4aUx1YXRlUk80c0FWNEFhQUJBZw%3D%3D",
        "author": {
          "handle": "JB_OldVoltBike",
          "displayName": "@JB_OldVoltBike",
          "platformUserId": "UCSA_nacyrxIxDtq4RWEJS7A",
          "verified": false,
          "creator": false,
          "avatarUrl": "https://yt3.ggpht.com/KgN7cIcRVkf-A9pAMaXPmzpgyOYeJVff43BVITVJkKo4Q9u3Z4Vi1bOsriRSxpSB1ZDTwq0kfw=s88-c-k-c0x00ffffff-no-rj",
          "channelUrl": "https://youtube.com/@JB_OldVoltBike"
        }
      },
      {
        "id": "UgzOIBYEjun6K5SXSyF4AaABAg",
        "text": "This is not what the QR code siad it will be",
        "createdAt": "2026-05-14T04:37:01.166Z",
        "publishedTimeText": "5 days ago",
        "likeCount": 465,
        "replyCount": 12,
        "repliesCursor": "Eg0SC2RRdzR3OVdnWGNRGAYygwEaUBIaVWd6T0lCWUVqdW42SzVTWFN5RjRBYUFCQWciAggAKhhVQ3VBWEZrZ3N3MUw3eGFDZm5kNUpKT3cyC2RRdzR3OVdnWGNRQAFICoIBAggBQi9jb21tZW50LXJlcGxpZXMtaXRlbS1VZ3pPSUJZRWp1bjZLNVNYU3lGNEFhQUJBZw%3D%3D",
        "author": {
          "handle": "Jurassic_nature_001",
          "displayName": "@Jurassic_nature_001",
          "platformUserId": "UCK7Gy-Jrzm9F9xN4ReAxFJQ",
          "verified": false,
          "creator": false,
          "avatarUrl": "https://yt3.ggpht.com/R6rS5v3u_9yeqweKNMCYh0MS46DE1MhH0ssf44Md7naUpQRgBe-deavD0ICUPooKBGYNTjlQcC4=s88-c-k-c0x00ffffff-no-rj",
          "channelUrl": "https://youtube.com/@Jurassic_nature_001"
        }
      },
      {
        "id": "UgwnXz0vJESXwxLUMet4AaABAg",
        "text": "1B people have been Rick Rolled, what an achievement",
        "createdAt": "2022-05-19T04:37:01.166Z",
        "publishedTimeText": "4 years ago",
        "likeCount": 82000,
        "replyCount": 558,
        "repliesCursor": "Eg0SC2RRdzR3OVdnWGNRGAYygwEaUBIaVWd3blh6MHZKRVNYd3hMVU1ldDRBYUFCQWciAggAKhhVQ3VBWEZrZ3N3MUw3eGFDZm5kNUpKT3cyC2RRdzR3OVdnWGNRQAFICoIBAggBQi9jb21tZW50LXJlcGxpZXMtaXRlbS1VZ3duWHowdkpFU1h3eExVTWV0NEFhQUJBZw%3D%3D",
        "author": {
          "handle": "Zenic.",
          "displayName": "@Zenic.",
          "platformUserId": "UCRKqb7N0kLSVYmFjLjvwkIg",
          "verified": true,
          "creator": false,
          "avatarUrl": "https://yt3.ggpht.com/6JO8rywT5L4jktx-N4NvkEAOIT9btMym_UmlSyRgmAw-Cwk1-87oOx0KhrNbwbv3Em2ZUcYJOHg=s88-c-k-c0x00ffffff-no-rj",
          "channelUrl": "https://youtube.com/@Zenic."
        }
      },
      {
        "id": "Ugzemy2nvw_7EyaIWj54AaABAg",
        "text": "There's a reason this has over 600M views...",
        "createdAt": "2020-05-19T04:37:01.166Z",
        "publishedTimeText": "6 years ago",
        "likeCount": 1000000,
        "replyCount": 964,
        "repliesCursor": "Eg0SC2RRdzR3OVdnWGNRGAYygwEaUBIaVWd6ZW15Mm52d183RXlhSVdqNTRBYUFCQWciAggAKhhVQ3VBWEZrZ3N3MUw3eGFDZm5kNUpKT3cyC2RRdzR3OVdnWGNRQABICoIBAggBQi9jb21tZW50LXJlcGxpZXMtaXRlbS1VZ3plbXkybnZ3XzdFeWFJV2o1NEFhQUJBZw%3D%3D",
        "author": {
          "handle": "Timeworks",
          "displayName": "@Timeworks",
          "platformUserId": "UCv5mo0iXze8aKFjvdp51Fjg",
          "verified": true,
          "creator": false,
          "avatarUrl": "https://yt3.ggpht.com/42ffwzIe9i55CVc2WIVrhdTRYZS7wA97YQxd-ZxUYhzj3tVVHXMW1vuLKAxnc1l7jlaVkpcecI4=s88-c-k-c0x00ffffff-no-rj",
          "channelUrl": "https://youtube.com/@Timeworks"
        }
      },
      {
        "id": "Ugzfq1DF_8hU1W2ap1x4AaABAg",
        "text": "Ah yes we meet once again",
        "createdAt": "2021-05-19T04:37:01.166Z",
        "publishedTimeText": "5 years ago",
        "likeCount": 47000,
        "replyCount": 409,
        "repliesCursor": "Eg0SC2RRdzR3OVdnWGNRGAYygwEaUBIaVWd6ZnExREZfOGhVMVcyYXAxeDRBYUFCQWciAggAKhhVQ3VBWEZrZ3N3MUw3eGFDZm5kNUpKT3cyC2RRdzR3OVdnWGNRQAFICoIBAggBQi9jb21tZW50LXJlcGxpZXMtaXRlbS1VZ3pmcTFERl84aFUxVzJhcDF4NEFhQUJBZw%3D%3D",
        "author": {
          "handle": "thatonerandomginger",
          "displayName": "@thatonerandomginger",
          "platformUserId": "UCUjzEiZDlSi50mjsOvGkf6A",
          "verified": true,
          "creator": false,
          "avatarUrl": "https://yt3.ggpht.com/ytc/AIdro_m8HvYFWOzdUBadgaDvousw1KpgBkywuAU88VVAIPQd6a0=s88-c-k-c0x00ffffff-no-rj",
          "channelUrl": "https://youtube.com/@thatonerandomginger"
        }
      },
      {
        "id": "Ugwn-pmRPqF9vEWrqX94AaABAg",
        "text": "got an ad before this video started, saved me",
        "createdAt": "2026-05-19T04:37:01.166Z",
        "publishedTimeText": "48 minutes ago",
        "likeCount": 1,
        "replyCount": 0,
        "repliesCursor": null,
        "author": {
          "handle": "SubjectGamerOfficial",
          "displayName": "@SubjectGamerOfficial",
          "platformUserId": "UCU-JGWWIGSCTEwDmKEKM-tA",
          "verified": false,
          "creator": false,
          "avatarUrl": "https://yt3.ggpht.com/pv_CKp8XY8LIJkt3hBtO-QTb_Qa1CEl5281XO2wQKnLpgbbB51_C3mF6E4kkHebltdQiUlAs_w=s88-c-k-c0x00ffffff-no-rj",
          "channelUrl": "https://youtube.com/@SubjectGamerOfficial"
        }
      },
      {
        "id": "UgzNF6YV0mlS2GWceOZ4AaABAg",
        "text": "I didn't get rickrolled today, I just really enjoy this song",
        "createdAt": "2021-05-19T04:37:01.166Z",
        "publishedTimeText": "5 years ago",
        "likeCount": 363000,
        "replyCount": 932,
        "repliesCursor": "Eg0SC2RRdzR3OVdnWGNRGAYygwEaUBIaVWd6TkY2WVYwbWxTMkdXY2VPWjRBYUFCQWciAggAKhhVQ3VBWEZrZ3N3MUw3eGFDZm5kNUpKT3cyC2RRdzR3OVdnWGNRQAFICoIBAggBQi9jb21tZW50LXJlcGxpZXMtaXRlbS1VZ3pORjZZVjBtbFMyR1djZU9aNEFhQUJBZw%3D%3D",
        "author": {
          "handle": "CinematicCaptures",
          "displayName": "@CinematicCaptures",
          "platformUserId": "UCA1oEnRYKBmFDAcoKso2pAA",
          "verified": true,
          "creator": false,
          "avatarUrl": "https://yt3.ggpht.com/ytc/AIdro_m2p2NbssAK79AX2uQzEvNPnnEIAIlB-PdN9Q4GSiqP7k8=s88-c-k-c0x00ffffff-no-rj",
          "channelUrl": "https://youtube.com/@CinematicCaptures"
        }
      },
      {
        "id": "Ugyv8ryCW2kS1Psodc54AaABAg",
        "text": "CBSE has humor",
        "createdAt": "2026-03-19T04:37:01.166Z",
        "publishedTimeText": "2 months ago",
        "likeCount": 10000,
        "replyCount": 75,
        "repliesCursor": "Eg0SC2RRdzR3OVdnWGNRGAYygwEaUBIaVWd5djhyeUNXMmtTMVBzb2RjNTRBYUFCQWciAggAKhhVQ3VBWEZrZ3N3MUw3eGFDZm5kNUpKT3cyC2RRdzR3OVdnWGNRQAFICoIBAggBQi9jb21tZW50LXJlcGxpZXMtaXRlbS1VZ3l2OHJ5Q1cya1MxUHNvZGM1NEFhQUJBZw%3D%3D",
        "author": {
          "handle": "ItzAravind",
          "displayName": "@ItzAravind",
          "platformUserId": "UCWazGIjBb957BwMShG4hvmA",
          "verified": false,
          "creator": false,
          "avatarUrl": "https://yt3.ggpht.com/ytc/AIdro_lCPHHsiGYra6BdNjRBGb39kZnLydr_UoaqOp5IuG_-K2p1=s88-c-k-c0x00ffffff-no-rj",
          "channelUrl": "https://youtube.com/@ItzAravind"
        }
      },
      {
        "id": "UgyyEqaBXOKgoi4cf7l4AaABAg",
        "text": "Ok let’s be honest here\nRick rolling is the one meme that will never die",
        "createdAt": "2020-05-19T04:37:01.166Z",
        "publishedTimeText": "6 years ago (edited)",
        "likeCount": 424000,
        "replyCount": 706,
        "repliesCursor": "Eg0SC2RRdzR3OVdnWGNRGAYygwEaUBIaVWd5eUVxYUJYT0tnb2k0Y2Y3bDRBYUFCQWciAggAKhhVQ3VBWEZrZ3N3MUw3eGFDZm5kNUpKT3cyC2RRdzR3OVdnWGNRQAFICoIBAggBQi9jb21tZW50LXJlcGxpZXMtaXRlbS1VZ3l5RXFhQlhPS2dvaTRjZjdsNEFhQUJBZw%3D%3D",
        "author": {
          "handle": "JetpackGamer456",
          "displayName": "@JetpackGamer456",
          "platformUserId": "UCNRtoaGfHCLksAz2ofEAfgA",
          "verified": false,
          "creator": false,
          "avatarUrl": "https://yt3.ggpht.com/ytc/AIdro_nyhrpC59MDbvwlTlkeHmG6xvzXfJQdI4SBR7r8a5XLhJg=s88-c-k-c0x00ffffff-no-rj",
          "channelUrl": "https://youtube.com/@JetpackGamer456"
        }
      },
      {
        "id": "Ugxb9dBkRPnSZXmA52p4AaABAg",
        "text": "The QR code will take you to Rick Roll.",
        "createdAt": "2026-05-19T04:37:01.166Z",
        "publishedTimeText": "12 hours ago",
        "likeCount": 2,
        "replyCount": 0,
        "repliesCursor": null,
        "author": {
          "handle": "sobrinhodosukuna",
          "displayName": "@sobrinhodosukuna",
          "platformUserId": "UCO5iZ7J9Snw8wLMAvKhBf9A",
          "verified": false,
          "creator": false,
          "avatarUrl": "https://yt3.ggpht.com/hnK0MAWaSBc9YVlKIt1yhu9tLw7xRnC4UFXEHGDE_O7PHAdcM0BzKRN03-a7iVyBy967AGfRuSU=s88-c-k-c0x00ffffff-no-rj",
          "channelUrl": "https://youtube.com/@sobrinhodosukuna"
        }
      },
      {
        "id": "Ugz3iT8d2hlqEkapRIl4AaABAg",
        "text": "feels like ive seen it a billion times",
        "createdAt": "2022-05-19T04:37:01.166Z",
        "publishedTimeText": "4 years ago",
        "likeCount": 126000,
        "replyCount": 477,
        "repliesCursor": "Eg0SC2RRdzR3OVdnWGNRGAYygwEaUBIaVWd6M2lUOGQyaGxxRWthcFJJbDRBYUFCQWciAggAKhhVQ3VBWEZrZ3N3MUw3eGFDZm5kNUpKT3cyC2RRdzR3OVdnWGNRQAFICoIBAggBQi9jb21tZW50LXJlcGxpZXMtaXRlbS1VZ3ozaVQ4ZDJobHFFa2FwUklsNEFhQUJBZw%3D%3D",
        "author": {
          "handle": "Kosmicd12",
          "displayName": "@Kosmicd12",
          "platformUserId": "UC6esFMAIud24sYSHfHGzPhg",
          "verified": true,
          "creator": false,
          "avatarUrl": "https://yt3.ggpht.com/ytc/AIdro_lM0UQcT_oyDCaqVxEHYyuf1dwY0hhSmAwNREq9qLhRGg=s88-c-k-c0x00ffffff-no-rj",
          "channelUrl": "https://youtube.com/@Kosmicd12"
        }
      },
      {
        "id": "Ugws9ZMArVs4qHOgklR4AaABAg",
        "text": "This song is still significantly better than brainrots",
        "createdAt": "2026-04-19T04:37:01.166Z",
        "publishedTimeText": "1 month ago",
        "likeCount": 526,
        "replyCount": 13,
        "repliesCursor": "Eg0SC2RRdzR3OVdnWGNRGAYygwEaUBIaVWd3czlaTUFyVnM0cUhPZ2tsUjRBYUFCQWciAggAKhhVQ3VBWEZrZ3N3MUw3eGFDZm5kNUpKT3cyC2RRdzR3OVdnWGNRQAFICoIBAggBQi9jb21tZW50LXJlcGxpZXMtaXRlbS1VZ3dzOVpNQXJWczRxSE9na2xSNEFhQUJBZw%3D%3D",
        "author": {
          "handle": "BloxyMatt",
          "displayName": "@BloxyMatt",
          "platformUserId": "UCGf135bnJwEA4-Km1e8l1vQ",
          "verified": false,
          "creator": false,
          "avatarUrl": "https://yt3.ggpht.com/iyJDy-1bs-hn40JX6oKolSSz8CnVq38vVR84QZXSbDh6_AlxjAGoPP9S7iu2z6r_bJSjCgsd=s88-c-k-c0x00ffffff-no-rj",
          "channelUrl": "https://youtube.com/@BloxyMatt"
        }
      },
      {
        "id": "UgxTGPJ4man6fZG4ci94AaABAg",
        "text": "wait this is not the link to Shrek X: Endgame",
        "createdAt": "2020-05-19T04:37:01.166Z",
        "publishedTimeText": "6 years ago",
        "likeCount": 62000,
        "replyCount": 389,
        "repliesCursor": "Eg0SC2RRdzR3OVdnWGNRGAYygwEaUBIaVWd4VEdQSjRtYW42ZlpHNGNpOTRBYUFCQWciAggAKhhVQ3VBWEZrZ3N3MUw3eGFDZm5kNUpKT3cyC2RRdzR3OVdnWGNRQAFICoIBAggBQi9jb21tZW50LXJlcGxpZXMtaXRlbS1VZ3hUR1BKNG1hbjZmWkc0Y2k5NEFhQUJBZw%3D%3D",
        "author": {
          "handle": "randomguyontheinternet1005",
          "displayName": "@randomguyontheinternet1005",
          "platformUserId": "UC4s9McEaeA7guefPR0g_2bA",
          "verified": false,
          "creator": false,
          "avatarUrl": "https://yt3.ggpht.com/ytc/AIdro_mC-F_LUNsLxxHq0iRkdThSk-g8rlByJUfRPLo8n2HtbmB0G7VDfzswGgLJModTHVY6_A=s88-c-k-c0x00ffffff-no-rj",
          "channelUrl": "https://youtube.com/@randomguyontheinternet1005"
        }
      }
    ],
    "page": {
      "nextCursor": "Eg0SC2RRdzR3OVdnWGNRGAYy6gIKwAJnZXRfcmFua2VkX3N0cmVhbXMtLUNxY0JDSUFFRlJlMzBUZ2FuQUVLbHdFSTJGOFFnQVFZQnlLTUFkdjhBWlkybkl2OUJXZXNlNWV1UkxGaWJKRGJpS0paYy1DMlg0S3hZaHRYRWk3THlWSEpMbURGUkMyVVZhNk9wckU3MnppV0dYMjZVRUg4dHZpVUdGRDk4YUlTYW4xWDI4VzJHTFJIUHp1WXktSUExWDRNT2pXNVVaQzg0YWhxcUtjRElqQ1N4TnJkSlBEUlZzVFNpVEgzVlBNckZEcTRyNnZzaC1DVDB3eWYyTUJaZWhDanBva0pRc0FCRUJRU0J3aUhJQkFCR0FBU0JRaUpJQmdBRWdVSWlDQVlBQklGQ0tnZ0dBQVNCd2lFSUJBUEdBRVNCd2lGSUJBRUdBRVNCUWk3SUJnQSIRIgtkUXc0dzlXZ1hjUTAAeAEoFEIQY29tbWVudHMtc2VjdGlvbg%3D%3D",
      "hasMore": true
    }
  },
  "meta": {
    "requestId": "req_01example_yt_comments",
    "creditsCharged": 1,
    "version": "v1"
  }
}
```

### Example JSON (no_comments)

```json
{
  "data": {
    "lookupStatus": "found",
    "comments": [],
    "page": {
      "nextCursor": null,
      "hasMore": false
    }
  },
  "meta": {
    "requestId": "req_01example_nc",
    "creditsCharged": 1,
    "version": "v1"
  }
}
```

### Example JSON (not_found)

```json
{
  "data": {
    "lookupStatus": "not_found",
    "comments": [],
    "page": {
      "nextCursor": null,
      "hasMore": false
    }
  },
  "meta": {
    "requestId": "req_01example_nf",
    "creditsCharged": 1,
    "version": "v1"
  }
}
```

### Machine-readable error codes

When an error JSON body is returned, it may include one of these `error.code` values (derived from the OpenAPI schemas for this operation; additional codes may exist at runtime):

- `bad_request`

## Error handling & retries

Interpret HTTP status codes using the descriptions below. Do not assume a JSON body unless the OpenAPI schema defines one for that status.

- **400**: Invalid request **Retry:** Fix the request; retrying the same invalid payload will not help.
- **401**: Missing or invalid API key **Retry:** Fix the API key first; retrying without changes will not help.
- **402**: Insufficient credits **Retry:** Do not retry without resolving billing/credits (retrying the same request will not help).
- **500**: Unexpected or billing error
- **502**: Lookup could not be completed from the response (unexpected or invalid data). **Retry:** May be transient; a few retries with backoff are reasonable.
- **503**: Service temporarily unavailable; safe to retry with backoff. **Retry:** Usually safe to retry with exponential backoff and jitter.

### Suggested client defaults

- Send the API key using the `x-api-key` header on every request.
- On `503` (and sometimes `502`), retry with backoff; cap retries and surface a clear error to the user.
- On `402`, surface an actionable billing message rather than blind retries.

## Examples

### TypeScript SDK

```typescript
import { SocialFetchClient } from "@socialfetch/sdk";

const client = new SocialFetchClient({
  apiKey: process.env.SOCIALFETCH_API_KEY!,
});

const result = await client.youtube.getVideoComments({
  url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
});

if (!result.ok) {
  console.error(result.error);
} else {
  console.log(result.value.data);
}
```

### Node.js

```javascript
const response = await fetch(
  "https://api.socialfetch.dev/v1/youtube/videos/comments?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  {
    headers: {
      "x-api-key": "YOUR_API_KEY",
    }
  }
);

const data = await response.json();
console.log(data);
```

### cURL

```bash
curl "https://api.socialfetch.dev/v1/youtube/videos/comments?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ" \
  -H "x-api-key: YOUR_API_KEY"
```

### Python

```python
import requests

response = requests.get(
    "https://api.socialfetch.dev/v1/youtube/videos/comments?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    headers={"x-api-key": "YOUR_API_KEY"},
)
data = response.json()
print(data)
```

### Example: next page (pagination)

After a successful response, if pagination is not finished, request the next page using `cursor` (URL-encode when composing the query string):

```javascript
const previous = await response.json();
const nextCursor = previous?.data?.page?.nextCursor;
const hasMore = previous?.data?.page?.hasMore;
if (!hasMore || nextCursor == null) {
  // no more pages
} else {
  const nextUrl = new URL("https://api.socialfetch.dev/v1/youtube/videos/comments");
  nextUrl.searchParams.set("cursor", nextCursor);
  // optionally preserve sort: nextUrl.searchParams.set("sortBy", "latest");
  const nextResponse = await fetch(nextUrl.toString(), {
    headers: { "x-api-key": "YOUR_API_KEY" },
  });
  const nextData = await nextResponse.json();
}
```