Skip to content

Structured Reddit data: send queries. Cursor-paginated, 1 credit per successful call.

GET · POST1 credit / successful callCursor-paginated
GEThttps://api.scrapier.io/api/v2/reddit-post-search/Open in Playground

Call GET /api/v2/reddit-post-search/ with queries. The results are in data.posts; send data.next_cursor back as cursor to get the next page. 5 optional parameters refine the call (see Parameters).

Terminal window
curl -G "https://api.scrapier.io/api/v2/reddit-post-search/" \
-H "X-API-Key: YOUR_API_KEY" \
--data-urlencode "queries=programming" \
--max-time 210
NameTypeRequiredDefaultDescription
X-API-Key headerstringyes—Your API key from the dashboard.
queriesstringyese.g. programmingSearch term. Required on first call; ignored when cursor is supplied.
cursorstringno—Pagination cursor returned in the previous response's next_cursor. Pass it back unchanged to fetch the next page. When next_cursor is null, you have reached the last page.
sort_bystringnocommentsSort: relevance, hot, top, new, comments. Locked into the cursor.
commentshottopnewrelevance
time_filterstringnoyearTime window: hour, day, week, month, year, all. Locked into the cursor.
hourdayweekmonthyearall
subredditstringno—Optional: restrict the search to one subreddit (name, r/Name or URL). Locked into the cursor.
page_sizeintegerno25Posts per page (1-100). Locked into the cursor.
Advanced
NameTypeDefaultDescription
use_proxybooleantrueRoute the request through Scrapier's residential proxy pool. Default: true. Leave as is unless support tells you otherwise.
raw_databooleanfalseWhen true, the response carries the full raw upstream payload(s) the scraper received (GraphQL / JSON API bodies, HTML, embedded JSON-LD -- exactly as the platform returned them) under raw_responses, in place of the formatted items. When false (default) you get the formatted output. Pagination (cursor / next_cursor) works the same in both modes.
{
"success": true,
"data": {
"queries": "programming",
"sort_by": "comments",
"time_filter": "year",
"subreddit": null,
"page": 1,
"page_size": 25,
"posts": [
{
"post_id": "1olrcxd",
"subreddit": "programming",
"author_id": "t2_xxx",
"created_time": "2026-11-20T10:00:00Z",
"title": "Best practices for async Python",
"type": "text",
"url": "https://old.reddit.com/r/programming/comments/1olrcxd/...",
"score": 842,
"comments": 137,
"nsfw": false,
"spoiler": false,
"archived": false,
"media_type": "text",
"votes": 842,
"subreddit_icon": ""
}
],
"has_more": true,
"next_cursor": "eyJoIjoiYWJjMTIzZGVmIiwiaSI6InByb2dyYW1taW5nIiwicCI6MiwibGsiOnt9fQ"
}
}

Sample from the live catalog; arrays trimmed to 3 items. Results are in data.posts.

FieldTypeExampleDescription
queriesstringprogramming—
sort_bystringcomments—
time_filterstringyear—
subredditnullnull—
pageinteger1—
page_sizeinteger25—
postsarray[1 item]The results.
has_morebooleantrue—
next_cursorstringeyJoIjoiYWJjMTIzZGVmIiwiaSI6InByb2dyYW1taW5nI…Pass back as cursor for the next page. null on the last page.
posts[].post_idstring1olrcxd—
posts[].subredditstringprogramming—
posts[].author_idstringt2_xxx—
posts[].created_timestring2026-11-20T10:00:00Z—
posts[].titlestringBest practices for async Python—
posts[].typestringtext—
posts[].urlstringhttps://old.reddit.com/r/programming/comments…—
posts[].scoreinteger842—
posts[].commentsinteger137—
posts[].nsfwbooleanfalse—
posts[].spoilerbooleanfalse—
posts[].archivedbooleanfalse—
posts[].media_typestringtext—
posts[].votesinteger842—
posts[].subreddit_iconstring—

Pass data.next_cursor back as cursor until it is null. Required inputs are ignored once a cursor is sent. Each page is one billed call. More in Pagination.

const url = "https://api.scrapier.io/api/v2/reddit-post-search/";
let params = { queries: "programming" };
const items = [];
for (let page = 0; page < 10; page++) { // each page is one billed call
const res = await fetch(`${url}?${new URLSearchParams(params)}`, {
headers: { "X-API-Key": "YOUR_API_KEY" },
signal: AbortSignal.timeout(210_000),
});
const body = await res.json();
if (!res.ok) throw new Error(body.error ?? body.detail ?? `HTTP ${res.status}`);
const data = body.data;
items.push(...(data.posts ?? []));
if (!data.next_cursor) break; // null = last page
params = { cursor: data.next_cursor };
}

Failed calls are free. Branch on the HTTP status and read the message from error (or detail). Full details in Errors.

StatusMeaningRetry?Charged?
400Bad or missing input.No — fix the paramsNo
401 / 403Missing, invalid or revoked API key.No — fix the keyNo
402Out of credits (body has balance).No — top upNo
404Unknown endpoint slug.No — check the slugNo
429 / 503Busy or throttled.Yes — after Retry-AfterNo
5xxTarget site or upstream failure, or timeout.Yes — with backoffNo
  • Nothing special: send the inputs, read the result.