Call it
curl https://api.peume.com/v1/call/reddit-post-comments-by-url \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"url": "https://www.reddit.com/r/AskReddit/comments/ablzuq/people_who_havent_pooped_in_2019_yet_why_are_you/",
"cursor": "ed1lvsa,ed3fnpq,ed25l2w",
"trim": "false"
}
}'const res = await fetch("https://api.peume.com/v1/call/reddit-post-comments-by-url", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"url": "https://www.reddit.com/r/AskReddit/comments/ablzuq/people_who_havent_pooped_in_2019_yet_why_are_you/",
"cursor": "ed1lvsa,ed3fnpq,ed25l2w",
"trim": "false"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/reddit-post-comments-by-url",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"url": "https://www.reddit.com/r/AskReddit/comments/ablzuq/people_who_havent_pooped_in_2019_yet_why_are_you/",
"cursor": "ed1lvsa,ed3fnpq,ed25l2w",
"trim": "False"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: reddit-post-comments-by-url.
Parameters
urlRequiredstringReddit post URL
Example: https://www.reddit.com/r/AskReddit/comments/ablzuq/people_who_havent_pooped_in_2019_yet_why_are_you/
cursorstringCursor to get more comments, or replies.
Example: ed1lvsa,ed3fnpq,ed25l2w
trimbooleanSet to true for a trimmed down version of the response
Example: false
Other ways to do it
Same job, other sources, cheapest first.
The comments of a Reddit postList every comment Reddit sends for one post, in reading order, with author, score, text, depth and parent.Reddit post comments by post fullnameReddit: fetch post comments (app)Reddit post comments by post idRetrieves comments for a Reddit post with pagination-token support.
