Skip to Content

Search Users

Accounts matching a name, the first 25.

GET
/v1/reddit/search/users

Authorization

apiKey
headerAuthorizationBearer <token>

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

Query Parameters

query*string

A name to search for.

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.searchUsers({ query: "coffee" });
Example Response
{  "data": [    {      "id": "q8hp",      "username": "coffee",      "displayName": null,      "bio": null,      "avatarUrl": "https://www.redditstatic.com/avatars/defaults/v2/avatar_default_5.png",      "url": "https://www.reddit.com/user/coffee/",      "verified": true,      "private": false,      "followers": null,      "following": null,      "likes": null,      "posts": null,      "externalUrl": null,      "createdAt": "2006-11-09T18:27:32.000Z",      "ext": {        "karma": {          "total": null,          "post": 1,          "comment": 0,          "awardee": null,          "awarder": null        },        "employee": false,        "moderator": false,        "premium": false,        "suspended": false,        "bannerUrl": null,        "trophies": []      }    },    {      "id": "mts3u7m",      "username": "coffeechap",      "displayName": "Owner of Paris B-sides Tours",      "bio": "French, long-time Parisian, in his 40s.\n\nProfessional flaneur, more interested in the other side of the postcard.\n\nCity guide organizing tours through my own website https://parisbsides.com",      "avatarUrl": "https://i.redd.it/snoovatar/avatars/a4398a02-cc21-4b0e-a1ed-c0cccb75bb44.png",      "url": "https://www.reddit.com/user/coffeechap/",      "verified": true,      "private": false,      "followers": null,      "following": null,      "likes": null,      "posts": null,      "externalUrl": null,      "createdAt": "2017-12-02T04:40:58.000Z",      "ext": {        "karma": {          "total": null,          "post": 1557,          "comment": 21699,          "awardee": null,          "awarder": null        },        "employee": false,        "moderator": true,        "premium": false,        "suspended": false,        "bannerUrl": "https://styles.redditmedia.com/t5_4ee6u/styles/profileBanner_dx67rbgk0s571.jpg?width=1280&height=384&crop=1280:384,smart&s=24cdcd45e395eae64bd2e96d1a074b179d68c2a6",        "trophies": []      }    }  ],  "pagination": {    "nextCursor": null,    "hasMore": false  }}