Comments of a Reddit post by URL, flattened depth-first with parent ids, scores and timestamps, cursor paged.
2 credits/ call
Never more than 37 credits a call.
You only pay when data comes back.
curl -X POST "https://api.primaryapi.com/v1/run/reddit.post_comments" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://www.reddit.com/r/webscraping/comments/1flgwup/after_2_months_learning_scraping_im_sharing_what_i/"}'{
"output": {
"found": true,
"data": {
"nextCursor": "<string | null>",
"comments": [
{
"score": "<integer | null>",
"depth": "<integer | null>",
"author": "<string | null>",
"body": "<string | null>", …
}
]
}
},
"credits": 2
}Input and output
3 fields
https://www.reddit.com/r/webscraping/co….8 fields
cursor to get more comments; null at the endGood to know
Comments are flattened depth-first (parents before replies).
Deeper "load more replies" branches of a page are not expanded.
One page per call. Send nextCursor back as cursor to read the next page.
Unknown URL? It comes back as not found, not as an error.
Terms of use. Usernames and user content are personal data under GDPR/CCPA even when pseudonymous: use for lawful purposes only, honour deletions, do not keep removed content, and do not train AI models on it without rightsholder permission (Data API Terms §2.4).
The same key and credits work for every API.