YepAPI
Reddit API

Reddit User Search API

Search Reddit accounts by name. Returns usernames, karma, avatars, and profile URLs as JSON for $0.01 per call.

POST/v1/reddit/search-users
$0.01/call

Search Reddit accounts by keyword. Each hit is a compact record — pass the username to the Reddit User API for the full profile, or to User Posts and User Comments for activity.

Usage

const res = await fetch('https://api.yepapi.com/v1/reddit/search-users', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"query": "spez"}),
});
const { data } = await res.json();
console.log(data);
curl -X POST https://api.yepapi.com/v1/reddit/search-users \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "spez"}'
import requests

res = requests.post(
    "https://api.yepapi.com/v1/reddit/search-users",
    headers={"x-api-key": "YOUR_API_KEY"},
    json={"query": "spez"},
)
print(res.json()["data"])

Request Body

ParameterTypeRequiredDescriptionDefault
querystringYesSearch text (max 256 characters)—
cursorstringNocursor from the previous response, to fetch the next page—

Response

{
  "ok": true,
  "data": {
    "cursor": "eyJjYW5kaWRhdGVzX3JldHVybmVkIjoie1wic2VjdGlvbl8xX3BpcGVsaW5lXzBfZ2xvYmFsX21vZGlmaWVyc1wiOlwiMVwiLFwic2VjdGlvbl8xX3BpcGVsaW5lXzFfbG9jYWxfbW9kaWZpZXJzXCI6XCIwXCIsXCJzZWN0aW9uXzJfcGlwZWxpbmVfMl9hdXRob3Jf…",
    "users": [
      {
        "icon": "https://styles.redditmedia.com/t5_3k30p/styles/profileIcon_uj015iwx9s7g1.png",
        "id": "t2_1w72",
        "total_karma": 941367,
        "url": "https://www.reddit.com/user/spez/",
        "username": "spez"
      },
      {
        "icon": null,
        "id": "t2_w1jdgw3z4",
        "total_karma": -1,
        "url": "https://www.reddit.com/user/Spezigeniesser/",
        "username": "Spezigeniesser"
      }
    ]
  }
}

Response Fields

FieldTypeDescription
okbooleanWhether the request succeeded
data.usersobject[]Matching accounts
data.users[].idstringAccount fullname (t2_…)
data.users[].usernamestringUsername
data.users[].total_karmanumberTotal karma
data.users[].iconstring | nullAvatar URL
data.users[].urlstringProfile URL
data.cursorstring | nullCursor for the next page

Pagination

Each response includes a cursor. Send the same request again with that value in cursor to get the next page. When cursor is null, there are no more results. A query with no matches returns 200 with an empty list and cursor: null. Every page is a separate $0.01 call.

Caching

Responses are cached for 15 minutes.

Errors

StatusCodeWhen
400VALIDATION_ERRORquery is missing or longer than 256 characters
429RATE_LIMITED_UPSTREAMToo many requests in a short burst — retry after a few seconds
502UPSTREAM_ERRORTemporary problem fetching data from Reddit — retry

Failed calls are not charged.

On this page