Docs · Post comments
Post comments
A Reddit post and its comment thread, with nested replies.
https://api.lurkapi.com/v1/reddit/post/commentsWhen to use this
Use it to read a thread: the post plus comments, best first, with replies nested under replies.items. Where more.has_more is true, pass more.next_cursor as cursor with the same url to load more.
Good for what people really think: objections, feature requests, the words customers use.
Loading more. Reddit loads long threads in batches. Wherever more.has_more is true (at the top level, or inside any comment's replies), pass that more.next_cursor as cursor with the same url to load the batch. Cursor responses have post: null.
Unknown or removed posts return 404 not_found.
Parameters
All parameters go in the query string.
| Parameter | Description |
|---|---|
urlstringrequired | The post's URL, e.g. https://www.reddit.com/r/marketing/comments/1wsx466/. A /r/… path works too.
|
cursorstringoptional | A more.next_cursor from a previous response, to load that batch of comments. |
trimbooleanoptional | true omits the post's selftext_html.
|
Example request
Replace YOUR_API_KEY with your key, or set LURKAPI_KEY for the code. Get a free key.
curl "https://api.lurkapi.com/v1/reddit/post/comments?url=https%3A%2F%2Fwww.reddit.com%2Fr%2Fmarketing%2Fcomments%2F1wsx466%2Fwant_to_become_an_llm_expert_in_marketing_where%2F" \
-H "x-api-key: YOUR_API_KEY"const params = new URLSearchParams({
url: "https://www.reddit.com/r/marketing/comments/1wsx466/want_to_become_an_llm_expert_in_marketing_where/",
});
const res = await fetch(`https://api.lurkapi.com/v1/reddit/post/comments?${params}`, {
headers: { "x-api-key": process.env.LURKAPI_KEY },
});
const data = await res.json();
if (!data.success) throw new Error(`${data.code}: ${data.error}`);
console.log(data.comments);import os
import requests
res = requests.get(
"https://api.lurkapi.com/v1/reddit/post/comments",
params={
"url": "https://www.reddit.com/r/marketing/comments/1wsx466/want_to_become_an_llm_expert_in_marketing_where/",
},
headers={"x-api-key": os.environ["LURKAPI_KEY"]},
timeout=60,
)
data = res.json()
if not data["success"]:
raise RuntimeError(f"{data['code']}: {data['error']}")
print(data["comments"])Example response
A real response from this endpoint, captured from the live API and trimmed to a couple of items. Strings over 96 characters (mostly signed media URLs) are cut short and end in ….
Show the example response (5 KB)Hide
{
"success": true,
"credits_remaining": 991,
"credits_charged": 1,
"post": {
"id": "1wsx466",
"name": "t3_1wsx466",
"title": "Want to become an LLM expert in marketing , where do I start?",
"author": "Due-Doughnut1818",
"author_fullname": "t2_1vwbrgv4me",
"subreddit": "marketing",
"subreddit_id": "t5_2qhmg",
"subreddit_name_prefixed": "r/marketing",
"permalink": "/r/marketing/comments/1wsx466/want_to_become_an_llm_expert_in_marketing_where/",
"url": "https://www.reddit.com/r/marketing/comments/1wsx466/want_to_become_an_ll…",
"domain": "self.marketing",
"score": 0,
"ups": 0,
"upvote_ratio": 0.27,
"num_comments": 17,
"created": 1790645795,
"created_utc": 1790645795,
"is_self": true,
"is_video": false,
"over_18": false,
"spoiler": false,
"stickied": false,
"locked": false,
"link_flair_text": "Question",
"link_flair_background_color": "#94E044",
"selftext": "I want to be LLM expert but in marketing. so i working in marketing soci…",
"selftext_html": "<p>I want to be LLM expert but in marketing. so i working in marketing s…",
"thumbnail": null,
"total_awards_received": 0
},
"comments": [
{
"id": "pcrhmoe",
"name": "t1_pcrhmoe",
"author": "thesupermikey",
"author_fullname": "t2_4ipwa",
"body": "Too late. We’ve all moved on to hand written postcards and sound powered landlines.",
"body_html": "<p>Too late. We’ve all moved on to hand written postcards and sound powered landlines.</p>",
"score": 14,
"ups": 14,
"created": 1790678974,
"created_utc": 1790678974,
"created_at_iso": "2026-09-29T10:49:34.000Z",
"depth": 0,
"parent_id": "t3_1wsx466",
"link_id": "t3_1wsx466",
"permalink": "/r/marketing/comments/1wsx466/want_to_become_an_llm_expert_in_marketing_where/pcrhmoe/",
"url": "https://www.reddit.com/r/marketing/comments/1wsx466/want_to_become_an_ll…",
"subreddit": "marketing",
"subreddit_id": "t5_2qhmg",
"subreddit_name_prefixed": "r/marketing",
"collapsed": false,
"is_submitter": false,
"replies": {
"items": [],
"more": {
"has_more": false,
"next_cursor": null
}
}
},
{
"id": "pcqrrwb",
"name": "t1_pcqrrwb",
"author": "[deleted]",
"author_fullname": null,
"body": "",
"body_html": null,
"score": 1,
"ups": 1,
"created": 1790666431,
"created_utc": 1790666431,
"created_at_iso": "2026-09-29T07:20:31.000Z",
"depth": 0,
"parent_id": "t3_1wsx466",
"link_id": "t3_1wsx466",
"permalink": "/r/marketing/comments/1wsx466/want_to_become_an_llm_expert_in_marketing_where/pcqrrwb/",
"url": "https://www.reddit.com/r/marketing/comments/1wsx466/want_to_become_an_ll…",
"subreddit": "marketing",
"subreddit_id": "t5_2qhmg",
"subreddit_name_prefixed": "r/marketing",
"collapsed": true,
"is_submitter": false,
"replies": {
"items": [
{
"id": "pcqrryc",
"name": "t1_pcqrryc",
"author": "AutoModerator",
"author_fullname": "t2_6l4z3",
"body": "Your account must be 30+ days old and it must have 300+ karma to post in…",
"body_html": "<p>Your account must be 30+ days old and it must have 300+ karma to post…",
"score": 1,
"ups": 1,
"created": 1790666432,
"created_utc": 1790666432,
"created_at_iso": "2026-09-29T07:20:32.000Z",
"depth": 1,
"parent_id": "t1_pcqrrwb",
"link_id": "t3_1wsx466",
"permalink": "/r/marketing/comments/1wsx466/want_to_become_an_llm_expert_in_marketing_where/pcqrryc/",
"url": "https://www.reddit.com/r/marketing/comments/1wsx466/want_to_become_an_ll…",
"subreddit": "marketing",
"subreddit_id": "t5_2qhmg",
"subreddit_name_prefixed": "r/marketing",
"collapsed": false,
"is_submitter": false,
"replies": {
"items": [],
"more": {
"has_more": false,
"next_cursor": null
}
}
}
],
"more": {
"has_more": false,
"next_cursor": null
}
}
}
],
"more": {
"has_more": false,
"next_cursor": null
}
}Response fields
Every field of a successful response. [] marks a list: a[].b is the b of each item in a. nullable fields can be null; optional fields can be missing.
Show all 65 fieldsHide
| Field | Type | Description |
|---|---|---|
| success | true | Always true here; errors have success: false. |
| credits_remaining | number | Your balance after this call. On anonymous playground calls: free tries left today. |
| credits_charged | number | Credits this call cost; 0 on free endpoints. On anonymous playground calls: tries used (1). |
| post | objectnullable | The post. null on cursor responses. |
| post.id | string | Post id, e.g. 1wtfnyr. |
| post.name | string | Fullname, t3_ + id. Subreddit listings paginate with it. |
| post.title | string | Post title. |
| post.author | stringnullable | Username, without u/; null if unknown. |
| post.author_fullname | stringnullable | Author's account fullname, t2_ + id; null if unknown. |
| post.subreddit | string | Subreddit name without r/, e.g. marketing. |
| post.subreddit_id | stringnullable | Subreddit fullname, t5_ + id. |
| post.subreddit_name_prefixed | stringnullable | e.g. r/marketing. |
| post.permalink | string | Path on reddit.com; prepend https://www.reddit.com. |
| post.url | string | The link a link post points to, or the post itself for text posts. |
| post.url_overridden_by_dest | stringoptional | Outbound link, on link posts only. |
| post.domain | stringnullable | self.<subreddit> for text posts, else the linked site. |
| post.selftext | string | Post body as plain text. Empty for link posts. |
| post.selftext_html | stringnullable · optional | Post body as HTML. Omitted with trim=true. |
| post.score | number | Upvotes minus downvotes. |
| post.ups | number | Same as score. |
| post.upvote_ratio | numbernullable | Share of votes that are upvotes, 0–1. |
| post.num_comments | number | Comment count when fetched. |
| post.created | number | Posted at, Unix seconds. |
| post.created_utc | number | Posted at, Unix seconds. |
| post.is_self | boolean | A text post rather than a link. |
| post.is_video | boolean | A video post. |
| post.is_gallery | booleanoptional | Present (true) on image galleries; absent otherwise. |
| post.over_18 | boolean | Marked NSFW. |
| post.spoiler | boolean | Marked as a spoiler. |
| post.stickied | boolean | Pinned by moderators. |
| post.locked | boolean | Locked: no new comments allowed. |
| post.link_flair_text | stringnullable | Post flair, e.g. "Question"; null without flair. |
| post.link_flair_background_color | stringnullable | Flair color as a hex code, e.g. #94E044; null without flair. |
| post.thumbnail | stringnullable | Preview image URL; null for posts without media. |
| post.total_awards_received | number | Awards the post received. |
| comments | object[] | Top-level comments, each with nested replies. |
| comments[].id | string | Comment id, e.g. pcrhmoe. |
| comments[].name | string | Fullname, t1_ + id. |
| comments[].author | stringnullable | Username, without u/; null if unknown. |
| comments[].author_fullname | stringnullable | Author's account fullname, t2_ + id. |
| comments[].body | string | Comment text, plain. |
| comments[].body_html | stringnullable | Comment text as HTML; null when the comment has no body. |
| comments[].score | number | Upvotes minus downvotes. |
| comments[].ups | number | Same as score. |
| comments[].created | number | Posted at, Unix seconds. |
| comments[].created_utc | number | Posted at, Unix seconds. |
| comments[].created_at_iso | string | Posted at, ISO 8601. |
| comments[].depth | number | 0 for top-level comments, 1 for their replies, and so on. |
| comments[].parent_id | stringnullable | t3_… for top-level comments, else the parent comment's t1_…. |
| comments[].link_id | stringnullable | The post's fullname. |
| comments[].permalink | string | Path to this comment on reddit.com. |
| comments[].url | string | This comment on reddit.com. |
| comments[].subreddit | string | Subreddit name without r/. |
| comments[].subreddit_id | stringnullable | Subreddit fullname, t5_ + id. |
| comments[].subreddit_name_prefixed | string | e.g. r/marketing. |
| comments[].collapsed | boolean | Collapsed by default on Reddit (low score or moderated). |
| comments[].is_submitter | boolean | Written by the post's author. |
| comments[].replies | object | Replies to this comment. |
| comments[].replies.items | RedditComment[] | Direct replies, each with its own replies. |
| comments[].replies.more | object | More comments that weren't loaded yet. |
| comments[].replies.more.has_more | boolean | Whether there are more comments to load here. |
| comments[].replies.more.next_cursor | stringnullable | Pass as cursor (with the same url) to load them; null when has_more is false. |
| more | object | More comments that weren't loaded yet. |
| more.has_more | boolean | Whether there are more comments to load here. |
| more.next_cursor | stringnullable | Pass as cursor (with the same url) to load them; null when has_more is false. |
Pagination
Pass a cursor from a previous response as cursor to load more (see When to use this). Each call costs 1 credit.
Caching and freshness
Responses are cached for up to 1 minute, so a repeat call within that window can return the same data. It still costs 1 credit.
Errors
Errors return { success: false, error, code, docs } with the HTTP status below. Validation errors, 401/402/429 rejections and 5xx failures are free; not_found is charged (how charging works). All error codes.
| Status | Code | Meaning |
|---|---|---|
| 401 | missing_api_key | No API key. Send it in the x-api-key header. |
| 401 | invalid_api_key | The key is unknown or was revoked. |
| 402 | insufficient_credits | Not enough credits for this call. Buy a pack or wait for tomorrow's top-up. |
| 404 | not_found | The endpoint, or the thing you asked for (ad, post, subreddit), doesn't exist. Charged when the platform was checked. |
| 405 | method_not_allowed | Endpoints take GET with query params. |
| 429 | rate_limited | Too many calls at once. Wait for the retry-after seconds, then retry. |
| 500 | internal_error | Something broke on our side. Retry; 5xx errors are free. |
| 502 | upstream_error | The platform didn't give a usable answer. Retry; 5xx errors are free. |
| 503 | upstream_busy | All our connections to the platform are busy. Retry in a few seconds; 5xx errors are free. |
| 504 | upstream_timeout | The platform took over 30 seconds to answer. Retry; timeouts are free. |
Use it in Claude
Once LurkAPI is connected to Claude, this endpoint is the reddit_post_comments tool. Ask in plain English, for example:
Use LurkAPI's reddit_post_comments with url "https://www.reddit.com/r/marketing/comments/1wsx466/want_to_become_an_llm_expert_in_marketing_where/" and summarize what you find.Claude calls reddit_post_comments with arguments like these, and each call costs 1 credit:
{
"url": "https://www.reddit.com/r/marketing/comments/1wsx466/want_to_become_an_llm_expert_in_marketing_where/"
}Tool results skip nulls and empty lists to save tokens, and trim defaults to true.