Skip to content

Subreddit Posts

GET /v1/reddit/subreddit

Fetches posts from a subreddit with sorting and filtering options. Each post includes title, author, selftext, score, ups, upvote_ratio, num_comments, created_utc, url, permalink, subreddit_subscribers, and is_video. Supports sort (best, hot, new, top, rising), timeframe filtering, pagination via the after token, and a trim parameter for lighter responses.

Authentication

All requests require the x-api-key header. Get your key at scrapecreators.com.

Query Parameters

NameTypeRequiredDescriptionExample
subredditstringyesSubreddit name
timeframeenum(all, day, week, month, year)noTimeframe to get posts from
sortenum(best, hot, new, top, rising)noSort order
afterstringnoAfter to get more posts. Get 'after' from previous response.t3_1234567890
trimbooleannoSet to true for a trimmed down version of the responsefalse

Example Request

curl

bash
curl 'https://api.scrapecreators.com/v1/reddit/subreddit?subreddit=<subreddit>' \
  -H 'x-api-key: $SCRAPECREATORS_API_KEY'

Node / TypeScript

js
const params = new URLSearchParams({ subreddit: '...' });
const res = await fetch(`https://api.scrapecreators.com/v1/reddit/subreddit?${params}`, {
  headers: { 'x-api-key': process.env.SCRAPECREATORS_API_KEY }
});
const data = await res.json();
console.log(data);

Python

python
import os, requests
r = requests.get(
    'https://api.scrapecreators.com/v1/reddit/subreddit',
    headers={'x-api-key': os.environ['SCRAPECREATORS_API_KEY']},
    params={'subreddit': '...'},
)
r.raise_for_status()
print(r.json())

CLI

bash
scrapecreators reddit subreddit --help

Example Response

json
{
  "posts": [
    {
      "id": "1lfbo7u",
      "author": "Vetro_Nodulare2",
      "author_fullname": "t2_16syu27ar1",
      "subreddit": "AskReddit",
      "title": "What is a thing you love that lots of people hate?",
      "downs": 0,
      "name": "t3_1lfbo7u",
      "upvote_ratio": 0.9,
      "ups": 45,
      "total_awards_received": 0,
      "score": 45,
      "created": 1750341959,
      "num_comments": 349,
      "url": "https://www.reddit.com/r/AskReddit/comments/1lfbo7u/what_is_a_thing_you_love_that_lots_of_people_hate/",
      "subreddit_subscribers": 56146328,
      "is_video": false,
      "created_utc": 1750341959
    }
  ],
  "after": "t3_1lfogps"
}

Credits

Most ScrapeCreators endpoints consume 1 credit per successful response. Some heavier endpoints (transcripts, AI-driven enrichment, ad detail lookups) may cost more. Check GET /v1/credit-balance for your remaining balance.

Errors

StatusMeaningAction
200Success.Use the JSON payload.
400Invalid or missing parameter.Verify required parameters and value format.
401Missing or invalid x-api-key.Pass a valid API key in the header.
402Out of credits.Top up at scrapecreators.com or wait for plan reset.
404Resource not found or private.Confirm the handle, URL, or id and that the resource is public.
429Rate limited.Backoff and retry with exponential delay.
500Server error or upstream platform failure.Retry with backoff; report persistent errors to support.