LurkAPI
Docs · Video comments

Video comments

A video's comments, top or newest first, with likes, reply counts and who wrote them.

1 credit per callFresh within 10 minutesMCP tool: youtube_comments
GEThttps://api.lurkapi.com/v1/youtube/video/comments

Example response

When to use this

Use it for audience research and sentiment: what viewers say, which comments get the most likes, and what the creator pinned or hearted. About 20 comments per page; the first page also has the exact commentCount.

Pagination. Pass the response's continuationToken back as continuationToken (with the same url) for the next page; it's null at the end. YouTube stops at about 1,000 top comments, or a few thousand newest ones. If YouTube sends a later page empty, the call fails with upstream_error (free) instead of ending the list early. Retry it.

Replies. Comments with replies have a repliesContinuationToken; pass it to comment replies.

Videos with comments turned off, and unknown videos, return an empty comments list.

Example request

Copy one and replace YOUR_API_KEY with your API key (get one free). The code versions read the key from the LURKAPI_API_KEY environment variable instead.

Language

Parameters

Add them to the URL after a ?. Join several with &.

ParameterDescription
url
stringrequired
The video's URL (watch, youtu.be, /shorts/, /live/ or /embed/ links all work) or its 11-character id, e.g. https://www.youtube.com/watch?v=dQw4w9WgXcQ.
Example
https://www.youtube.com/watch?v=dQw4w9WgXcQ
order
stringoptional
top (YouTube's ranking) or newest first.
One of
topnewest
Default
top
continuationToken
stringoptional
The continuationToken from the previous response, to get the next page.

Example response

A real response, captured from the live API. Lists are trimmed to a couple of items, and long text such as media links is cut short with ….

Show the example response (2 KB)
{
  "success": true,
  "credits_remaining": 999985,
  "credits_charged": 1,
  "comments": [
    {
      "id": "Ugzge340dBgB75hWBm54AaABAg",
      "content": "can confirm: he never gave us up",
      "publishedTimeText": "1 year ago",
      "publishedTime": "2025-09-30T14:33:52.979Z",
      "replyLevel": 0,
      "author": {
        "name": "@YouTube",
        "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
        "isVerified": true,
        "isCreator": false,
        "avatarUrl": "https://yt3.ggpht.com/3s6evpqAiDU9tQR4sC2siJippbH2RWVPnwHgyl4V0th2iuQz0V…",
        "channelUrl": "https://www.youtube.com/@YouTube"
      },
      "engagement": {
        "likes": 321000,
        "replies": 963
      },
      "repliesContinuationToken": "Eg0SC2RRdzR3OVdnWGNRGAYygwEaUBIaVWd6Z2UzNDBkQmdCNzVoV0JtNTRBYUFCQWciAggA…",
      "isPinned": true,
      "isHearted": true
    },
    {
      "id": "UgyEnXfdC-umwvTt8JF4AaABAg",
      "content": "Gonna flag this for nudity so I can rick roll the YouTube staff",
      "publishedTimeText": "6 years ago",
      "publishedTime": "2020-10-01T14:33:52.979Z",
      "replyLevel": 0,
      "author": {
        "name": "@Oatman69",
        "channelId": "UCWf34D_s8K_m2vwBISIDWtg",
        "isVerified": false,
        "isCreator": false,
        "avatarUrl": "https://yt3.ggpht.com/ghenbV7T5VMOA3iqp3PThC82exqcu7iVng_iWNx1Ujak72Ti4o…",
        "channelUrl": "https://www.youtube.com/@Oatman69"
      },
      "engagement": {
        "likes": 567000,
        "replies": 707
      },
      "repliesContinuationToken": "Eg0SC2RRdzR3OVdnWGNRGAYygwEaUBIaVWd5RW5YZmRDLXVtd3ZUdDhKRjRBYUFCQWciAggA…",
      "isPinned": false,
      "isHearted": false
    }
  ],
  "continuationToken": "Eg0SC2RRdzR3OVdnWGNRGAYyggMK2AJnZXRfcmFua2VkX3N0cmVhbXMtLUNxY0JDSUFFRlJl…",
  "commentCount": 2457944
}

Response fields

Every field in a successful response, and what it means. A name with [] belongs to each item of a list: comments[].id is the id of every item in comments. null means there's no value.

Show all 24 fields
FieldTypeDescription
successtrueAlways true here; errors have success: false.
credits_remainingnumberYour balance after this call. On anonymous playground calls: free tries left today.
credits_chargednumberCredits this call cost; 0 on free endpoints. On anonymous playground calls: tries used (1).
commentsobject[]One page of comments, in the requested order.
comments[].idstringComment id. Replies are <parent id>.<reply id>.
comments[].contentstringComment text.
comments[].publishedTimeTextstringWhen it was posted, as YouTube shows it, e.g. "3 days ago" or "6 years ago (edited)".
comments[].publishedTimestringcan be nullApproximate post time, ISO 8601, worked out from publishedTimeText: only as precise as that text ("6 years ago" is ±6 months).
comments[].replyLevelnumber0 for a comment, 1 for a reply.
comments[].authorobjectWho wrote it.
comments[].author.namestringAuthor's handle, e.g. @YouTube.
comments[].author.channelIdstringcan be nullAuthor's channel id, UC….
comments[].author.isVerifiedbooleanThe author has a verified badge.
comments[].author.isCreatorbooleanThe author is the video's creator.
comments[].author.avatarUrlstringcan be nullAuthor's avatar URL.
comments[].author.channelUrlstringcan be nullAuthor's channel page.
comments[].engagementobjectLikes and replies.
comments[].engagement.likesnumberLikes; YouTube rounds above 1,000 (321K → 321000).
comments[].engagement.repliesnumberNumber of replies.
comments[].repliesContinuationTokenstringcan be nullPass as continuationToken to comment replies to read the replies. null when there are none (and always on replies).
comments[].isPinnedbooleanPinned by the creator.
comments[].isHeartedbooleanHearted by the creator.
continuationTokenstringcan be nullPass as continuationToken for the next page. null on the last page.
commentCountnumbercan be nullExact number of comments on the video (replies included). First page only; null on later pages.

Cost and freshness

Each call costs 1 credit. Calls turned away before they reach the platform (invalid parameters, a key or balance problem, a rate limit) are free, and so are 5xx errors. A not_found is charged, since the platform was checked. How charging works.

Answers are cached for up to 10 minutes. A repeat call within that time can return the same data, and costs the same.

Errors

A failed call returns success: false, an error message, a code your program can check, and a docs link. These are the errors this endpoint can return. All error codes.

StatusCodeMeaning
401missing_api_keyNo API key was sent. Put it in the x-api-key header.
401invalid_api_keyThis key doesn't exist or was revoked.
402insufficient_creditsNot enough credits for this call. Buy a pack, or wait for tomorrow's free top-up.
402over_max_creditsThis call would cost more than the max_credits you set. The error says what it needs; raise max_credits to allow it. Not charged.
403account_suspendedThis account is suspended. Email support@lurkapi.com. Not charged.
405method_not_allowedEndpoints only take GET, with parameters in the URL.
429rate_limitedToo many calls in a short time. Wait as many seconds as the retry-after header says, then retry.
500internal_errorSomething broke on our side. Retry. Not charged.
502upstream_errorThe platform didn't send a usable answer. Retry. Not charged.
503upstream_busyAll our connections to the platform are busy. Retry in a few seconds. Not charged.
504upstream_timeoutThe platform took over 30 seconds to answer (90 for web pages). Retry. Not charged.

Use it in Claude

Connect LurkAPI to Claude and ask in plain English. This endpoint is the youtube_comments tool. For example:

Ask Claude
Use LurkAPI's youtube_comments tool with url "https://www.youtube.com/watch?v=dQw4w9WgXcQ", then summarize what you find.

Claude calls youtube_comments with arguments like these, and each call costs 1 credit:

Tool arguments
{"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"}

To save tokens, tool results leave out empty fields, keep one URL per image or video, and give transcripts as plain text unless you pass timestamps=true. A result over 45,000 characters comes in parts. Its _note gives the offset for the next part, and later parts are free for 15 minutes. Pass trim=false for the full response.

From the blog

All posts