Skip to Content

Search

Posts matching a query across Reddit, about 7 a page.

GET
/v1/reddit/search

Authorization

apiKey
headerAuthorizationBearer <token>

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

Query Parameters

query*string

What to search for.

sort?string

relevance (the default), hot, top, new or comments.

Value in"relevance""hot""top""new""comments"
time?string

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.search({ query: "espresso machine" });
Example Response
{  "data": [    {      "id": "1y3d5i6",      "url": "https://www.reddit.com/r/espresso/comments/1y3d5i6/for_those_who_bought_an_espresso_machine_for_home/",      "text": null,      "createdAt": "2026-11-23T08:34:30.864Z",      "author": {        "id": "bhs5jlpnu",        "username": "Blue_Diam0nd_",        "displayName": null,        "avatarUrl": null,        "verified": false,        "url": "https://www.reddit.com/user/Blue_Diam0nd_/"      },      "stats": {        "views": null,        "likes": 447,        "comments": 853,        "shares": null,        "saves": null,        "engagementRate": null      },      "media": [],      "hashtags": [],      "mentions": [],      "ext": {        "title": "For those who bought an espresso machine for home, was it worth it?",        "kind": "text",        "subreddit": "espresso",        "score": 447,        "upvoteRatio": null,        "link": null,        "domain": null,        "flair": null,        "nsfw": false,        "spoiler": false,        "locked": false,        "stickied": false,        "crossposts": null,        "crosspostOf": null,        "awards": null,        "editedAt": null,        "snippet": "my wife now says it’s one of the best investments we ever made."      }    },    {      "id": "1w58kht",      "url": "https://www.reddit.com/r/JamesHoffmann/comments/1w58kht/best_espresso_machine_to_buy_right_now_in_2026/",      "text": null,      "createdAt": "2026-09-02T12:12:09.305Z",      "author": {        "id": "29793w0s96",        "username": "Crystalline_Due",        "displayName": null,        "avatarUrl": null,        "verified": false,        "url": "https://www.reddit.com/user/Crystalline_Due/"      },      "stats": {        "views": null,        "likes": 0,        "comments": 62,        "shares": null,        "saves": null,        "engagementRate": null      },      "media": [],      "hashtags": [],      "mentions": [],      "ext": {        "title": "Best Espresso Machine To Buy Right Now In 2026? (Price and Taste)",        "kind": "text",        "subreddit": "JamesHoffmann",        "score": 0,        "upvoteRatio": null,        "link": null,        "domain": null,        "flair": null,        "nsfw": false,        "spoiler": false,        "locked": false,        "stickied": false,        "crossposts": null,        "crosspostOf": null,        "awards": null,        "editedAt": null,        "snippet": "Grinder more important than espresso machine. Beans and water more important than either (arguably!)"      }    }  ],  "pagination": {    "nextCursor": "L3N2Yy9zaHJlZGRpdC9zZWFyY2gvP3E9ZXNwcmVzc28rbWFjaGluZSZ0eXBlPXBvc3RzJnNvcnQ9cmVsZXZhbmNlJnQ9YWxsJmN1cnNvcj1leUpqWVc1a2FXUmhkR1Z6WDNKbGRIVnlibVZrSWpvaWUxd2ljMlZqZEdsdmJsOHhYM0JwY0dWc2FXNWxYekJmWjJ4dlltRnNYMjF2WkdsbWFXVnljMXdpT2x3aU1Wd2lMRndpYzJWamRHbHZibDh4WDNCcGNHVnNhVzVsWHpGZmJHOWpZV3hmYlc5a2FXWnBaWEp6WENJNlhDSXlYQ0lzWENKelpXTjBhVzl1WHpKZmNHbHdaV3hwYm1WZk1UQmZjWFZsY25sZmMzVm5aMlZ6ZEdsdmJuTmNJanBj…",    "hasMore": true  }}