Reddit User Search API
Search Reddit accounts by name. Returns usernames, karma, avatars, and profile URLs as JSON for $0.01 per call.
/v1/reddit/search-usersSearch 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
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
query | string | Yes | Search text (max 256 characters) | — |
cursor | string | No | cursor 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
| Field | Type | Description |
|---|---|---|
ok | boolean | Whether the request succeeded |
data.users | object[] | Matching accounts |
data.users[].id | string | Account fullname (t2_…) |
data.users[].username | string | Username |
data.users[].total_karma | number | Total karma |
data.users[].icon | string | null | Avatar URL |
data.users[].url | string | Profile URL |
data.cursor | string | null | Cursor 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
| Status | Code | When |
|---|---|---|
400 | VALIDATION_ERROR | query is missing or longer than 256 characters |
429 | RATE_LIMITED_UPSTREAM | Too many requests in a short burst — retry after a few seconds |
502 | UPSTREAM_ERROR | Temporary problem fetching data from Reddit — retry |
Failed calls are not charged.
Related Endpoints
- Reddit User API — full profile with karma breakdown
- Reddit User Posts API — posts by an account
- Reddit Search API — search posts instead of accounts
Search Subreddits API
Search Reddit communities by keyword. Returns subreddit names, descriptions, icons, and URLs as JSON for $0.01 per call.
Subreddit Info API
Get a subreddit's profile — subscribers, description, sidebar, creation date, icon, banner, and posting settings — as JSON for $0.01 per call.