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 and learn what people really think: objections, feature requests, the words customers use. You get the post and its comments, best first, with replies nested under replies.items.
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 that batch. Those responses have post: null.
Unknown or removed posts return 404 not_found.
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.
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"Paste it into a terminal, with your key in place of 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_API_KEY },
});
const data = await res.json();
if (!data.success) throw new Error(`${data.code}: ${data.error}`);
console.log(data.comments);Node 18+. Save it as lurk.mjs and run node lurk.mjs. It reads your key from LURKAPI_API_KEY.
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_API_KEY"]},
timeout=60,
)
data = res.json()
if not data["success"]:
raise RuntimeError(f"{data['code']}: {data['error']}")
print(data["comments"])Run pip install requests, save it as lurk.py and run python lurk.py. It reads your key from LURKAPI_API_KEY.
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
"os"
"time"
)
func main() {
params := url.Values{}
params.Set("url", "https://www.reddit.com/r/marketing/comments/1wsx466/want_to_become_an_llm_expert_in_marketing_where/")
req, _ := http.NewRequest("GET", "https://api.lurkapi.com/v1/reddit/post/comments?"+params.Encode(), nil)
req.Header.Set("x-api-key", os.Getenv("LURKAPI_API_KEY"))
client := &http.Client{Timeout: 60 * time.Second}
res, err := client.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
var data map[string]any
if err := json.NewDecoder(res.Body).Decode(&data); err != nil {
panic(err)
}
if data["success"] != true {
panic(fmt.Sprintf("%v: %v", data["code"], data["error"]))
}
out, _ := json.MarshalIndent(data["comments"], "", " ")
fmt.Println(string(out))
}Save it as main.go and run go run main.go. It reads your key from LURKAPI_API_KEY.
<?php
$params = http_build_query([
'url' => 'https://www.reddit.com/r/marketing/comments/1wsx466/want_to_become_an_llm_expert_in_marketing_where/',
]);
$context = stream_context_create(['http' => [
'header' => 'x-api-key: ' . getenv('LURKAPI_API_KEY'),
'timeout' => 60,
'ignore_errors' => true,
]]);
$body = file_get_contents('https://api.lurkapi.com/v1/reddit/post/comments?' . $params, false, $context);
$data = json_decode($body, true);
if (!$data['success']) {
throw new Exception("{$data['code']}: {$data['error']}");
}
print_r($data['comments']);Save it as lurk.php and run php lurk.php. It reads your key from LURKAPI_API_KEY.
require 'json'
require 'net/http'
uri = URI('https://api.lurkapi.com/v1/reddit/post/comments')
uri.query = URI.encode_www_form(
'url' => 'https://www.reddit.com/r/marketing/comments/1wsx466/want_to_become_an_llm_expert_in_marketing_where/',
)
req = Net::HTTP::Get.new(uri)
req['x-api-key'] = ENV.fetch('LURKAPI_API_KEY')
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https', read_timeout: 60) do |http|
http.request(req)
end
data = JSON.parse(res.body)
raise "#{data['code']}: #{data['error']}" unless data['success']
puts JSON.pretty_generate(data['comments'])Save it as lurk.rb and run ruby lurk.rb. It reads your key from LURKAPI_API_KEY.
Parameters
Add them to the URL after a ?. Join several with &.
| 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 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 (5 KB)Hide
{
"success": true,
"credits_remaining": 999958,
"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": 20,
"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,
"crosspost_parent_list": null,
"poll_data": null,
"gallery_data": null,
"media": null
},
"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": 18,
"ups": 18,
"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 in a successful response, and what it means. A name with [] belongs to each item of a list: post.crosspost_parent_list[].id is the id of every item in post.crosspost_parent_list. null means there's no value.
Show all 94 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 | objectcan be null | 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 | stringcan be null | Username, without u/; null if unknown. |
| post.author_fullname | stringcan be null | Author's account fullname, t2_ + id; null if unknown. |
| post.subreddit | string | Subreddit name without r/, e.g. marketing. |
| post.subreddit_id | stringcan be null | Subreddit fullname, t5_ + id. |
| post.subreddit_name_prefixed | stringcan be null | Subreddit name with the r/ prefix, 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 (the original post for crossposts), or the post itself for text posts. |
| post.url_overridden_by_dest | stringmay be missing | Outbound link, on link posts only. |
| post.domain | stringcan be null | self.<subreddit> for text posts, else the linked site. |
| post.selftext | string | Post body as plain text. Empty for link, media and crosspost posts. |
| post.selftext_html | stringcan be null · may be missing | Post body as HTML. Omitted with trim=true. |
| post.score | number | Upvotes minus downvotes. |
| post.ups | number | Same as score. |
| post.upvote_ratio | numbercan be null | 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 | booleanmay be missing | 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 | stringcan be null | Post flair, e.g. "Question"; null without flair. |
| post.link_flair_background_color | stringcan be null | Flair color as a hex code, e.g. #94E044; null without flair. |
| post.thumbnail | stringcan be null | Preview image URL; null for posts without media. |
| post.total_awards_received | number | Awards the post received. |
| post.crosspost_parent_list | object[]can be null | On crossposts, the original post as a one-item list (Reddit's shape), with what the card shows: no author or body. null otherwise. |
| post.crosspost_parent_list[].id | string | The original post's id, e.g. 1ww1x9d. |
| post.crosspost_parent_list[].name | string | Its fullname, t3_ + id. |
| post.crosspost_parent_list[].title | string | Its title. |
| post.crosspost_parent_list[].subreddit | string | Its subreddit, without r/. |
| post.crosspost_parent_list[].subreddit_name_prefixed | string | Its subreddit with the r/ prefix, e.g. r/soccer. |
| post.crosspost_parent_list[].permalink | string | Its path on reddit.com. Pass it to post comments for its body and replies. |
| post.crosspost_parent_list[].score | numbercan be null | Its upvotes minus downvotes; null if the card doesn't show them. |
| post.crosspost_parent_list[].num_comments | numbercan be null | Its comment count; null if the card doesn't show it. |
| post.crosspost_parent_list[].created_utc | numbercan be null | Posted at, Unix seconds; null if the card doesn't show it. |
| post.poll_data | objectcan be null | Poll options and votes; null for other posts. |
| post.poll_data.options | object[] | Options in display order. |
| post.poll_data.options[].id | stringcan be null | Option id; null on closed polls, which reddit.com shows without ids. |
| post.poll_data.options[].text | string | Option text. |
| post.poll_data.options[].vote_count | numbercan be null | Votes for this option; null while the poll is open (Reddit shows them once it closes). |
| post.poll_data.total_vote_count | numbercan be null | Votes cast. |
| post.poll_data.voting_end_timestamp | numbercan be null | When voting closes, Unix milliseconds as in Reddit's JSON; null once closed. |
| post.gallery_data | objectcan be null | Every image of a gallery post (on crossposts, the original's); null otherwise. |
| post.gallery_data.items | object[] | Images in gallery order. |
| post.gallery_data.items[].url | string | Full-size image URL (i.redd.it), or a preview if that's all the page has. |
| post.gallery_data.items[].width | numbercan be null | Original width in pixels. |
| post.gallery_data.items[].height | numbercan be null | Original height in pixels. |
| post.media | objectcan be null | Reddit-hosted video (v.redd.it; on crossposts, the original's); null otherwise, including YouTube and other embeds. |
| post.media.reddit_video | object | The video's streams. |
| post.media.reddit_video.hls_url | string | HLS playlist with video and audio, as reddit.com plays it. |
| post.media.reddit_video.fallback_url | stringcan be null | Largest MP4 with audio. A signed link that expires within hours; null when reddit.com offers none. |
| post.media.reddit_video.width | numbercan be null | That MP4's width in pixels. |
| post.media.reddit_video.height | numbercan be null | That MP4's height in pixels. |
| post.media.reddit_video.duration | numbercan be null | Length in seconds. |
| 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 | stringcan be null | Username, without u/; null if unknown. |
| comments[].author_fullname | stringcan be null | Author's account fullname, t2_ + id. |
| comments[].body | string | Comment text, plain; an image or GIF becomes its URL. Empty for deleted and collapsed comments. |
| comments[].body_html | stringcan be null | Comment text as HTML; null for deleted and collapsed comments. |
| 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 | stringcan be null | t3_… for top-level comments, else the parent comment's t1_…. |
| comments[].link_id | stringcan be null | 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 | stringcan be null | Subreddit fullname, t5_ + id. |
| comments[].subreddit_name_prefixed | string | Subreddit name with the r/ prefix, e.g. r/marketing. |
| comments[].collapsed | boolean | Collapsed by default on Reddit (low score, deleted or moderated). reddit.com loads its text only when expanded, so body is empty. |
| 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 | stringcan be null | 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 | stringcan be null | Pass as cursor (with the same url) to load them; null when has_more is false. |
Pagination
Results come in pages. To load more, pass the cursor from the previous response as cursor (When to use this says which field holds it). Each call costs 1 credit.
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 1 minute. 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.
| Status | Code | Meaning |
|---|---|---|
| 401 | missing_api_key | No API key was sent. Put it in the x-api-key header. |
| 401 | invalid_api_key | This key doesn't exist or was revoked. |
| 402 | insufficient_credits | Not enough credits for this call. Buy a pack, or wait for tomorrow's free top-up. |
| 402 | over_max_credits | This call would cost more than the max_credits you set. The error says what it needs; raise max_credits to allow it. Not charged. |
| 403 | account_suspended | This account is suspended. Email support@lurkapi.com. Not charged. |
| 404 | not_found | What you asked for (a post, an ad, a subreddit) doesn't exist, or there's no endpoint at that path. Charged if the platform was checked. |
| 405 | method_not_allowed | Endpoints only take GET, with parameters in the URL. |
| 429 | rate_limited | Too many calls in a short time. Wait as many seconds as the retry-after header says, then retry. |
| 500 | internal_error | Something broke on our side. Retry. Not charged. |
| 502 | upstream_error | The platform didn't send a usable answer. Retry. Not charged. |
| 503 | upstream_busy | All our connections to the platform are busy. Retry in a few seconds. Not charged. |
| 504 | upstream_timeout | The 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 reddit_post_comments tool. For example:
Use LurkAPI's reddit_post_comments tool with url "https://www.reddit.com/r/marketing/comments/1wsx466/want_to_become_an_llm_expert_in_marketing_where/", then 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/"}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
· 5 min read
Best Reddit scrapers in 2026: price and speed compared
LurkAPI is the best Reddit scraper: 1,000 subreddit posts for $0.04, a feed in 0.92 s, and search and comment threads on the same key.

· 5 min read
Instagram MCP server for Claude and ChatGPT
Claude can’t read Instagram on its own. Add one MCP URL and it reads any public account’s posts, reels and comments, 1 credit a call, no Meta app.

· 5 min read
Best Threads scrapers in 2026: what 1,000 posts cost
LurkAPI is the best Threads scraper: 1,000 posts for $0.06, a page in about 1.2 s, and pages back to an account's first post.