GET /user/search

User Search

Search Reddit accounts by name or keyword. Reddit Scraper API endpoint /user/search: parameters, JSON response fields and code examples.

Accounts matching q (Reddit matches loosely): id, username, avatar, short bio, total karma, cake day and the 18+ profile flag. Reddit returns at most about 20–25 accounts per search, usually in one page; refine q to reach others. with_details=true adds the /user/details fields (karma split, display name, Premium, social links, active communities; not the posts) to each account, at most 10 per page. Billed 1 request per page, +3 per account detailed.

HTTP Request

GET /user/search

Cost (in requests): 1 per page; +3 per account detailed. Every successful answer reports its cost in data.billed_requests.

Parameters

ParameterTypeRequiredDefaultDescription
qstringYes-Username or keyword.
page_tokenstringNo-Opaque page token from a previous response’s next_page_token. Omit for the first page.
per_pageintegerNo25Results per page, 1–25 (default 25). One page is billed 1 request.
with_detailsbooleanNofalseAdds the /user/details fields (karma split, display name, Reddit Premium, follow setting, social links, active communities; not the posts) to each account; per_page then defaults to 10 and can be at most 10: display_name, post_karma, comment_karma, accepts_followers, is_premium, social_links, active_subreddits, state, snoovatar_url, accepts_chats (left out without it). Billed +3 per account detailed.

Response

Real response to GET /user/search?q=spez (arrays trimmed to 2 items, long texts cut with …).

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
  "status": true,
  "request_id": "535a766e-e949-a12a-0f7a-2f7275e3",
  "data": {
    "results": [
      {
        "username": "spez",
        "user_id": "t2_1w72",
        "avatar_url": "https://styles.redditmedia.com/t5_3k30p/styles/profileIcon_uj015iwx9s7g1.png",
        "bio": "Reddit CEO",
        "total_karma": 941417,
        "created_at": "2005-06-06T00:00:00.000000+00:00",
        "is_nsfw": false
      },
      {
        "username": "spezialzt",
        "user_id": "t2_4gm3yvpn",
        "avatar_url": "https://styles.redditmedia.com/t5_23u24h/styles/profileIcon_7jn5mi6ql2wd1.png",
        "bio": null,
        "total_karma": 11264,
        "created_at": "2019-08-27T00:00:00.000000+00:00",
        "is_nsfw": false
      }
    ],
    "has_next_page": false,
    "next_page_token": null,
    "billed_requests": 1
  },
  "request_params": {
    "q": "spez"
  }
}

Response Fields

FieldTypeDescription
statusbooleantrue when the request succeeded
request_idstringUnique request identifier
dataobjectSearch page.
data.resultsarray of objectsMatching accounts.
data.results[].usernamestringUsername.
data.results[].user_idstringAccount id (t2_…).
data.results[].avatar_urlstringAvatar URL.
data.results[].biostringShort bio when shown.
data.results[].total_karmaintegerTotal karma.
data.results[].created_atstringISO-8601 UTC account creation (cake day; Reddit gives only the date, reported as midnight UTC).
data.results[].is_nsfwbooleanProfile marked 18+.
data.has_next_pagebooleanMore results available.
data.next_page_tokenstring / nullToken for the next page; null at the end.
data.billed_requestsintegerRequests billed for this call (also sent as Requests in the X-RapidAPI-Billing header when it is not RapidAPI’s default of 1).
request_paramsobjectEcho of the parameters you sent

Error Responses

Invalid input returns HTTP 400, not billed. error is a plain string that names the parameter:

1
{ "status": false, "request_id": "99a1e6cd-2e57-9e8f-4e44-2dea7f6d", "error": "Invalid parameter 'post_id': must be a post id such as z1c9z or t3_z1c9z", "request_params": { "post_id": "!!" } }
Status CodeCauseDescription
400Invalid or missing parameterPlain-English message per field. Not billed
200 with status: falseItem not availableerror.code is not_found, suspended, deleted. data is null. Billed 1 request
503Reddit temporarily unreachable"error": "Service temporarily unavailable". Not billed, retry later
200 with status: falseBad page tokenerror.code is invalid_page_token: pass next_page_token from the previous answer unchanged

Code Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
import requests

url = "https://reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com/user/search"

params = {
    "q": "spez",
}

headers = {
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com"
}

response = requests.get(url, headers=headers, params=params)
data = response.json()["data"]

for item in data["results"]:
    print(item["username"])
print("Billed requests:", data["billed_requests"])
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
const url = "https://reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com/user/search";

const params = new URLSearchParams({
  q: "spez",
});

const response = await fetch(`${url}?${params}`, {
  headers: {
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com"
  }
});

const { data } = await response.json();
data.results.forEach((item) => console.log(item.username));
1
2
3
4
curl -G "https://reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com/user/search" \
  --data-urlencode "q=spez" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com"
  • User Details : Reddit account profile by username or id
  • User Activity : Posts and comments of a Reddit account (one timeline or each list)
Start building today

Get your API key and make your first request in under a minute.

Get Your API Key on RapidAPI