Skip to Content

Subreddit Posts

A community's posts, 25 a page.

GET
/v1/reddit/subreddit/posts

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from the dashboard: Authorization: Bearer sapi_….

Query Parameters

name?string

The community's name, with or without r/.

url?string

Its link, instead of name.

sort?string

hot (the default), new, top, rising or controversial.

Value in"hot""new""top""rising""controversial"
time?string

For top and controversial: hour, day, week, month, year or all (the default).

Value in"hour""day""week""month""year""all"
cursor?string

nextCursor of the previous page.

maxAge?integer

How old a cached answer may be, in seconds; 0 always fetches. Default and most: the endpoint's cache lifetime.

Formatint64
Range0 <= value

Response Body

The answer.

application/json
  1. response

A page of a list, as every list endpoint answers: { "data": [...], "pagination": … }.

data*array<>
pagination*
Example Request
import { SocialAPI } from "@socialapihq/sdk";const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });const { data, pagination } = await client.reddit.subredditPosts({ name: "AskReddit", sort: "hot" });
Example Response
{  "data": [    {      "id": "1y53ynl",      "url": "https://www.reddit.com/r/AskReddit/comments/1y53ynl/donald_trump_just_called_senatorelect_abdul/",      "text": null,      "createdAt": "2026-11-25T10:21:39.000Z",      "author": {        "id": "g2ee64y4",        "username": "Sad_Artist8183",        "displayName": null,        "avatarUrl": null,        "verified": false,        "url": "https://www.reddit.com/user/Sad_Artist8183/"      },      "stats": {        "views": null,        "likes": 612,        "comments": 343,        "shares": null,        "saves": null,        "engagementRate": null      },      "media": [],      "hashtags": [],      "mentions": [],      "ext": {        "title": "Donald Trump just called Senator-elect Abdul El-Sayed a “smart guy” and said “maybe there’s some place in the middle” on a universal “Trumpcare” plan. Americans, what are your thoughts?",        "kind": "text",        "subreddit": "AskReddit",        "score": 612,        "upvoteRatio": 0.87,        "link": null,        "domain": null,        "flair": null,        "nsfw": false,        "spoiler": false,        "locked": false,        "stickied": false,        "crossposts": 0,        "crosspostOf": null,        "awards": 0,        "editedAt": null,        "snippet": null      }    },    {      "id": "1y4ueub",      "url": "https://www.reddit.com/r/AskReddit/comments/1y4ueub/people_in_their_60s_what_did_you_assume_youd_have/",      "text": null,      "createdAt": "2026-11-25T01:13:32.000Z",      "author": {        "id": "u6ozh",        "username": "freedone23",        "displayName": null,        "avatarUrl": null,        "verified": false,        "url": "https://www.reddit.com/user/freedone23/"      },      "stats": {        "views": null,        "likes": 2082,        "comments": 650,        "shares": null,        "saves": null,        "engagementRate": null      },      "media": [],      "hashtags": [],      "mentions": [],      "ext": {        "title": "People in their 60s, what did you assume you'd have \"plenty of time\" for that you didn't?",        "kind": "text",        "subreddit": "AskReddit",        "score": 2082,        "upvoteRatio": 0.94,        "link": null,        "domain": null,        "flair": null,        "nsfw": false,        "spoiler": false,        "locked": false,        "stickied": false,        "crossposts": 1,        "crosspostOf": null,        "awards": 0,        "editedAt": null,        "snippet": null      }    }  ],  "pagination": {    "nextCursor": "t3_1y4srpq",    "hasMore": true  }}