Skip to content
scrapeatlas.Dashboard

Retrieve threads

Try in Playground

Retrieve posts and nested comments from canonical HTTPS www.reddit.com post permalinks. Reaching a cap or leaving unloaded comments returns partial.

POST/v1/threadsx-api-key
x-api-keystringrequiredheader

Your ScrapeAtlas customer key. Create one on /account/ and set SCRAPEATLAS_API_KEY.

Content-Typestringrequiredheader

Must be application/json.

Request body
3
permalinksstring[]requiredbody

Required. 1–10 canonical HTTPS Reddit post permalinks, without query parameters or fragments.

up to 10 items

Example["https://www.reddit.com/r/example/comments/abc123/topic/"]
maxCommentsPerThreadintegerdefault: 50body

1–100 comments per thread; defaults to 50.

default: 50 · 1 – 100

Example50
maxDepthintegerdefault: 5body

1–5 reply levels; defaults to 5.

default: 5 · 1 – 5

Example3
Response fields
34
requestIdstring

Always included.

min 1 chars · max 128 chars

Always included.

accounting.pageLoadsinteger

Always included.

≥ 0

accounting.httpRequestsinteger

Always included.

≥ 0

accounting.proxyBytesinteger

Always included.

≥ 0

accounting.challengeCountinteger

Always included.

≥ 0

accounting.durationMsnumber

Always included.

≥ 0

accounting.proxySessionIdstring

Always included.

min 1 chars · max 128 chars

accounting.rssRequestsintegeroptional

Optional.

≥ 0

statusstring

Always included.

Always included.

up to 10 items

Always included.

threads.post.idstring

Always included.

min 1 chars · max 128 chars

threads.post.subredditstring

Always included.

threads.post.titlestring

Always included.

min 1 chars · max 1000 chars

threads.post.permalinkstring

Always included.

max 2048 chars · absolute HTTPS URL

threads.post.urlstring

Always included.

max 4096 chars · absolute HTTPS URL

threads.post.authorstringnullable

Always included.

threads.post.createdAtstring

Always included.

threads.post.scoreintegernullable

Always included.

threads.post.upvoteRationumbernullable

Always included.

threads.post.commentCountintegernullable

Always included.

threads.post.flairstringnullable

Always included.

threads.post.selftextstring

Always included.

max 4000 chars

threads.post.retrievalStatusenum

Always included.

one of: success, partial, challenged, failed

Always included.

up to 100 items

threads.comments.idstring

Always included.

min 1 chars · max 128 chars

threads.comments.postIdstring

Always included.

min 1 chars · max 128 chars

threads.comments.parentIdstringnullable

Always included.

threads.comments.depthinteger

Always included.

0 – 5

threads.comments.authorstringnullable

Always included.

threads.comments.createdAtstring

Always included.

threads.comments.scoreintegernullable

Always included.

threads.comments.bodystring

Always included.

max 2000 chars

HTTP 200 returns the success variant. Check status: partial means usable data with warnings, and failed or challenged requests carry a failure object described in Errors & responses.

Error codes
6
HTTPfailure.codeMeaning
400invalid_requestThe request failed validation.
401invalid_requestThe internal service secret is invalid.
503upstream_error breaker_openProxy unavailable or thread retrieval temporarily paused.
502upstream_errorRetrieval failed.
504timeoutThe deadline expired; available results are retained.
200partial challengedInspect status and failure even when HTTP succeeds.