Skip to content
scrapeatlas.Dashboard

Subreddit search

Try in Playground

Search post, comment and media sections together or choose the sections to retrieve, with independent continuation for each selected section.

GET/v1/reddit/subreddit/searchx-api-key
x-api-keystringrequiredheader

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

Query parameters
6
subredditstringrequiredquery

Required.

ExampleExample
querystringdefault: ""query

Optional.

default: "" · max 500 chars

Exampleplanning
sortenumdefault: "relevance"query

Optional.

one of: relevance, hot, top, new, comments · default: "relevance"

Examplerelevance
timeframeenumdefault: "all"query

Optional.

one of: all, year, month, week, day, hour · default: "all"

Exampleall
cursorstringquery

Optional.

min 1 chars · max 50000 chars

sectionsenumdefault: "posts,comments,media"query

Comma-separated selection: posts, comments, media, posts,comments, posts,media, comments,media, or posts,comments,media (default). Keep the same selection when continuing.

one of: posts, comments, media, posts,comments, posts,media, comments,media, posts,comments,media · default: "posts,comments,media"

Exampleposts,comments,media
Response fields
39
requestIdstring

Always included.

Omitted sections are identified by posts_omitted, comments_omitted or media_omitted in coverage.reasons.

coverage.completeboolean

Always included.

coverage.reasonsstring[]

Always included.

Always included.

accounting.httpRequestsinteger

Always included.

≥ 0

accounting.proxyBytesnumber

Always included.

≥ 0

accounting.durationMsnumber

Always included.

≥ 0

accounting.pageLoadsinteger

Always included.

≥ 0

accounting.challengeCountinteger

Always included.

≥ 0

accounting.rssRequestsinteger

Always included.

≥ 0

accounting.proxySessionIdstring

Always included.

successboolean

Always included.

statusenum

success, partial, challenged or failed. error contains a sanitized machine-readable reason on failure.

one of: success, partial

Always included.

up to 50 items

posts.idstring

Always included.

posts.titlestringnullableoptional

Optional.

posts.bodystringnullableoptional

Optional.

posts.urlstringnullableoptional

Optional.

posts.permalinkstringnullableoptional

Optional.

posts.votesnumbernullableoptional

Optional.

posts.num_commentsnumbernullableoptional

Optional.

Always included.

up to 50 items

comments.idstring

Always included.

comments.titlestringnullableoptional

Optional.

comments.bodystringnullableoptional

Optional.

comments.urlstringnullableoptional

Optional.

comments.permalinkstringnullableoptional

Optional.

comments.votesnumbernullableoptional

Optional.

comments.num_commentsnumbernullableoptional

Optional.

Always included.

up to 50 items

media.idstring

Always included.

media.titlestringnullableoptional

Optional.

media.bodystringnullableoptional

Optional.

media.urlstringnullableoptional

Optional.

media.permalinkstringnullableoptional

Optional.

media.votesnumbernullableoptional

Optional.

media.num_commentsnumbernullableoptional

Optional.

cursorstringnullable

Always included.

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.