Reddit Subreddit Posts
Structured Reddit data: send subreddits. Cursor-paginated, 1 credit per successful call.
Overview
Section titled “Overview”Call GET /api/v2/reddit-subreddit-posts/ with subreddits. The results are in data.posts; send data.next_cursor back as cursor to get the next page. 7 optional parameters refine the call (see Parameters).
Request
Section titled “Request”curl -G "https://api.scrapier.io/api/v2/reddit-subreddit-posts/" \ -H "X-API-Key: YOUR_API_KEY" \ --data-urlencode "subreddits=AbsoluteUnits" \ --max-time 210const params = new URLSearchParams({ subreddits: "AbsoluteUnits" });
const res = await fetch(`https://api.scrapier.io/api/v2/reddit-subreddit-posts/?${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}`);
console.log(body.data.posts);import requests
resp = requests.get( "https://api.scrapier.io/api/v2/reddit-subreddit-posts/", headers={"X-API-Key": "YOUR_API_KEY"}, params={"subreddits": "AbsoluteUnits"}, timeout=210,)body = resp.json()if not resp.ok: raise RuntimeError(body.get("error") or body.get("detail"))
print(body["data"]["posts"])curl -X POST "https://api.scrapier.io/api/v2/reddit-subreddit-posts/" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"subreddits":"AbsoluteUnits"}' \ --max-time 210Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
X-API-Key header | string | yes | — | Your API key from the dashboard. |
subreddits | string | yes | e.g. AbsoluteUnits | Subreddit name ("AbsoluteUnits"), "r/AbsoluteUnits" or a full reddit.com/r/AbsoluteUnits/ URL (case-insensitive) -> ONE native Reddit Listing page per call (limit posts, default 25) in listing order, each row with the post's engagement metrics, author, flair, selftext, media URL, permalink and the subreddit info block. A private / banned / quarantined / premium-only / unknown / empty subreddit answers one status row (next_cursor null). Required on the first call; ignored when cursor is supplied. |
cursor | string | no | — | 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. |
after | string | no | — | First call only: start the walk at a Reddit post fullname ("t3_1w05sdh" or the bare id) instead of the top of the listing. Later pages come from cursor (which carries Reddit's own after). |
sort | string | no | hot | hot (default) | new | top | rising | controversial | best. hotnewtoprisingcontroversialbest locked in cursor |
timeframe | string | no | — | Window for sort=top / controversial (empty = Reddit's default, day). hourdayweekmonthyearall locked in cursor |
trim | boolean | no | true | true = the reference post fields only; false = + every other field Reddit returns for the post (~110 keys). locked in cursor |
limit | integer | no | 25 | Posts per page = one Reddit Listing call, 1..100 (default 25); larger values are clamped to 100 with a note in warnings.locked in cursor |
include_subreddit_info | boolean | no | true | Attach the subreddit info block (subscribers, weekly_active_users, rules, icons ...) to every row: /about + /about/rules + one community page load on the first call; continuation pages reuse the weekly stats carried in the cursor. locked in cursor |
Advanced
| Name | Type | Default | Description |
|---|---|---|---|
use_proxy | boolean | true | Route the request through Scrapier's residential proxy pool. Default: true. Leave as is unless support tells you otherwise. |
raw_data | boolean | false | When 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. |
Response
Section titled “Response”{ "success": true, "data": { "subreddits": "AbsoluteUnits", "subreddit": "AbsoluteUnits", "sort": "top", "timeframe": "month", "status": "ok", "note": null, "page": 1, "page_size": 2, "after": null, "next_after": "t3_1w12kzi", "has_more": true, "posts": [ { "input_subreddit": "AbsoluteUnits", "subreddit": "AbsoluteUnits", "status": "ok", "position": 1, "post_id": "1wb8slx", "post_url": "https://www.reddit.com/r/AbsoluteUnits/comments/1wb8slx/of_a_polar_bear_literally_trying_to_figure_out/", "id": "1wb8slx", "author": "DarthiusFatticus", "author_fullname": "t2_5t81wgdhd", "title": "of a polar bear. Literally trying to figure out how to eat them.", "link_flair_text": "/r/all", "selftext": null, "selftext_html": null, "downs": 0, "name": "t3_1wb8slx", "upvote_ratio": 0.97, "ups": 57502, "total_awards_received": 0, "score": 57502, "created": 1788920629, "created_utc": 1788920629, "created_at_iso": "2026-09-09T02:23:49.000Z", "num_comments": 2848, "url": "https://v.redd.it/zbef9p7fneoh1", "permalink": "/r/AbsoluteUnits/comments/1wb8slx/of_a_polar_bear_literally_trying_to_figure_out/", "subreddit_subscribers": 2138337, "is_video": true, "over_18": false, "spoiler": false, "domain": "v.redd.it", "subreddit_id": "t5_a7wuv", "post_hint": "hosted:video", "sort": "top", "timeframe": "month", "subreddit_info": { "subreddit_id": "t5_a7wuv", "display_name": "AbsoluteUnits", "weekly_active_users": 2104672, "weekly_contributions": 23960, "subscribers": 2138336, "created_at": "2018-01-05T10:35:24.000Z", "title": "Lads that you’re in awe at the size of.", "subreddit_type": "public", "...": "(rules, description, header_img, icon_img, advertiser_category, submit_text, url, is_nsfw, language, rules_list)" }, "pagination": { "page": 1, "after_sent": null, "next_after": "t3_1w12kzi", "has_more": true, "next_cursor": "t3_1w12kzi" }, "scraped_at": "2026-09-21T11:31:34.910Z" }, { "position": 2, "post_id": "1w12kzi", "title": "of a Bong", "author": "Desilaundry", "score": 51708, "num_comments": 3905, "url": "https://v.redd.it/eudnuq8xi6mh1", "created_at_iso": "2026-08-28T20:55:44.000Z", "...": "(same shape as row 1)" } ], "warnings": [], "next_cursor": "eyJhIjoidDNfMXcxMmt6aSIsImxrIjp7ImxpbWl0IjoiMiIsInNvcnQiOiJ0b3AiLCJ0aW1lZnJhbWUiOiJtb250aCJ9LCJwIjoxLCJwb3MiOjIsInMiOlsidDNfMXdiOHNseCIsInQzXzF3MTJremkiXSwic3ViIjoiQWJzb2x1dGVVbml0cyJ9" }}Bad input. The exact message varies by endpoint.
{ "success": false, "error": "…"}Balance below the endpoint’s price.
{ "error": "Insufficient credits. Buy more to scrape more.", "balance": 1, "required": 2}Invalid or unknown API key.
{ "detail": "Authentication service unavailable or invalid API key."}Throttled — wait for Retry-After.
{ "detail": "Request was throttled. Expected available in N seconds."}Sample from the live catalog; arrays trimmed to 3 items. Results are in data.posts.
Response fields
Section titled “Response fields”| Field | Type | Example | Description |
|---|---|---|---|
subreddits | string | AbsoluteUnits | — |
subreddit | string | AbsoluteUnits | — |
sort | string | top | — |
timeframe | string | month | — |
status | string | ok | — |
note | null | null | — |
page | integer | 1 | — |
page_size | integer | 2 | — |
after | null | null | — |
next_after | string | t3_1w12kzi | — |
has_more | boolean | true | — |
posts | array | [2 items] | The results. |
warnings | array | [] | — |
next_cursor | string | eyJhIjoidDNfMXcxMmt6aSIsImxrIjp7ImxpbWl0IjoiM… | Pass back as cursor for the next page. null on the last page. |
posts[].input_subreddit | string | AbsoluteUnits | — |
posts[].subreddit | string | AbsoluteUnits | — |
posts[].status | string | ok | — |
posts[].position | integer | 1 | — |
posts[].post_id | string | 1wb8slx | — |
posts[].post_url | string | https://www.reddit.com/r/AbsoluteUnits/commen… | — |
posts[].id | string | 1wb8slx | — |
posts[].author | string | DarthiusFatticus | — |
posts[].author_fullname | string | t2_5t81wgdhd | — |
posts[].title | string | of a polar bear. Literally trying to figure o… | — |
posts[].link_flair_text | string | /r/all | — |
posts[].selftext | null | null | — |
posts[].selftext_html | null | null | — |
posts[].downs | integer | 0 | — |
posts[].name | string | t3_1wb8slx | — |
posts[].upvote_ratio | number | 0.97 | — |
posts[].ups | integer | 57502 | — |
posts[].total_awards_received | integer | 0 | — |
posts[].score | integer | 57502 | — |
posts[].created | integer | 1788920629 | — |
posts[].created_utc | integer | 1788920629 | — |
posts[].created_at_iso | string | 2026-09-09T02:23:49.000Z | — |
posts[].num_comments | integer | 2848 | — |
posts[].url | string | https://v.redd.it/zbef9p7fneoh1 | — |
posts[].permalink | string | /r/AbsoluteUnits/comments/1wb8slx/of_a_polar_… | — |
posts[].subreddit_subscribers | integer | 2138337 | — |
posts[].is_video | boolean | true | — |
posts[].over_18 | boolean | false | — |
posts[].spoiler | boolean | false | — |
posts[].domain | string | v.redd.it | — |
posts[].subreddit_id | string | t5_a7wuv | — |
posts[].post_hint | string | hosted:video | — |
posts[].sort | string | top | — |
posts[].timeframe | string | month | — |
posts[].subreddit_info | object | {…} | — |
posts[].pagination | object | {…} | — |
posts[].scraped_at | string | 2026-09-21T11:31:34.910Z | — |
Pagination
Section titled “Pagination”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-subreddit-posts/";let params = { subreddits: "AbsoluteUnits" };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 };}import requests
URL = "https://api.scrapier.io/api/v2/reddit-subreddit-posts/"HEADERS = {"X-API-Key": "YOUR_API_KEY"}params = {"subreddits": "AbsoluteUnits"}items = []
for _ in range(10): # each page is one billed call resp = requests.get(URL, headers=HEADERS, params=params, timeout=210) resp.raise_for_status() data = resp.json()["data"] items.extend(data.get("posts") or []) if not data.get("next_cursor"): # None = last page break params = {"cursor": data["next_cursor"]}Errors
Section titled “Errors”Failed calls are free. Branch on the HTTP status and read the message from error (or detail). Full details in Errors.
| Status | Meaning | Retry? | Charged? |
|---|---|---|---|
400 | Bad or missing input. | No — fix the params | No |
401 / 403 | Missing, invalid or revoked API key. | No — fix the key | No |
402 | Out of credits (body has balance). | No — top up | No |
404 | Unknown endpoint slug. | No — check the slug | No |
429 / 503 | Busy or throttled. | Yes — after Retry-After | No |
5xx | Target site or upstream failure, or timeout. | Yes — with backoff | No |
- Locked into the cursor:
sort,timeframe,trim,limit,include_subreddit_info. Set them on the first call; later pages reuse them.
Related
Section titled “Related”- Reddit Comment Replies — Structured Reddit data: send
urls. Cursor-paginated, 1 credit per successful call. - Reddit Post Comments — Structured Reddit data: send
urls. Cursor-paginated, 1 credit per successful call. - Reddit Post Search — Structured Reddit data: send
queries. Cursor-paginated, 1 credit per successful call. - Reddit Post Transcript — Structured Reddit data: send
urls. Single lookup, 1 credit per successful call.