Search Subreddits
Communities matching a query, 25 a page.
GET
apiKeyheader
AuthorizationBearer <token>An API key from the dashboard: Authorization: Bearer sapi_….
query*stringA name or a word to search for.
cursor?stringnextCursor of the previous page.
maxAge?integerHow old a cached answer may be, in seconds; 0 always fetches. Default and most: the endpoint's cache lifetime.
Format
int64Range
0 <= valueThe answer.
application/json- response
A page of a list, as every list endpoint answers: { "data": [...], "pagination": … }.
data*array<>pagination*import { SocialAPI } from "@socialapihq/sdk";const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });const { data, pagination } = await client.reddit.searchSubreddits({ query: "coffee" });Example Response
{ "data": [ { "id": "2qhze", "name": "Coffee", "title": "Coffee", "description": "/r/Coffee is back - for now - and talking about itself, in addition to coffee.", "url": "https://www.reddit.com/r/Coffee/", "iconUrl": "https://styles.redditmedia.com/t5_2qhze/styles/communityIcon_81fbf117t1411.png?width=256&s=a1eeb15bf142101ddb104de271f81ba440b4268d", "bannerUrl": null, "subscribers": 2478698, "weeklyVisitors": null, "weeklyContributions": null, "createdAt": "2008-05-15T13:10:38.000Z", "kind": "public", "nsfw": false, "language": "en", "category": "Lifestyles", "rules": [] }, { "id": "2rqoi", "name": "espresso", "title": "espresso: strong, potent coffee news for strong, potent coffee lovers.", "description": "The place to discuss the beans, brewing, and tools used to make the style of coffee known as \"espresso\", and all the forms it takes.\n\nNew to espresso? Check out our \"Brewing Basics\" guide and Frequently Asked Questions in our wiki and linked in the sidebar!", "url": "https://www.reddit.com/r/espresso/", "iconUrl": "https://styles.redditmedia.com/t5_2rqoi/styles/communityIcon_2ecjqa4s2m6e1.jpg?width=256&s=4590126d26a69d6d1ab420184ac192f8374995a3", "bannerUrl": "https://styles.redditmedia.com/t5_2rqoi/styles/bannerBackgroundImage_d5r3nasb287e1.png?width=4000&s=39961eac494ad3e46909d40f8c050240b557a258", "subscribers": 1055620, "weeklyVisitors": null, "weeklyContributions": null, "createdAt": "2010-05-08T20:02:16.000Z", "kind": "public", "nsfw": false, "language": "en", "category": null, "rules": [] } ], "pagination": { "nextCursor": "t5_2uzk5", "hasMore": true }}