100 free credits. No credit card required.Start building
Logo
Back to blog

Reddit Search API: Endpoints, Parameters and Credits

··11 min read

Search Reddit by keyword with one GET request. See the endpoints, sort and timeframe options, paging, comment costs, and how it differs from Reddit's API.

Reddit Search API: Endpoints, Parameters and Credits

A Reddit search API takes a keyword and returns matching posts as JSON. With SocialCrawl it is GET /v1/reddit/search?query=...: one page of up to 25 posts costs 1 credit, and you authenticate with an API key instead of Reddit OAuth. The same key reads subreddit feeds, post bodies and full comment trees.

Reddit's own Data API works too, but it sits behind OAuth and a limit of 100 queries per minute, and its GET /search returns a plain listing you page through yourself. For the official API and its limits, see Reddit data API, and for keys and limits, Reddit API key limits.

Stacked rounded post cards spilling from one coin, showing a page of Reddit search results returned for one credit.

How do I search Reddit with an API?

Call GET /v1/reddit/search with a query and an x-api-key header. The response holds a page of posts in data.items, each with its subreddit, title, score, comment count and permalink, and a pagination block with next_cursor and has_more. A page is 1 credit.

bash
curl "https://www.socialcrawl.dev/v1/reddit/search?query=best%20mechanical%20keyboard" \
  -H "x-api-key: YOUR_API_KEY"
python
import os
import requests

BASE = "https://www.socialcrawl.dev"
HEADERS = {"x-api-key": os.environ["SOCIALCRAWL_API_KEY"]}

r = requests.get(
    f"{BASE}/v1/reddit/search",
    params={"query": "best mechanical keyboard", "sort": "new"},
    headers=HEADERS,
    timeout=60,
)
r.raise_for_status()
payload = r.json()

for post in payload["data"]["items"]:
    print(post["ext"]["subreddit"], post["engagement"]["likes"], post["ext"]["title"])

pag = payload.get("pagination") or {}
print(pag.get("has_more"), pag.get("next_cursor"))

Rows use the unified post shape, trimmed here to the fields you will use most:

json
{
  "id": "abc123",
  "author": { "username": "example_user" },
  "engagement": { "likes": 6, "comments": 36, "shares": null },
  "ext": {
    "subreddit": "keyboards",
    "title": "What's the best mechanical keyboard in 2026?",
    "upvote_ratio": 0.875,
    "flair": "Discussion",
    "content_language": "en"
  }
}

engagement.shares is usually null on search rows and filled on post detail, so do not average it across a page. Set a generous client timeout, as the examples do.

What parameters does the Reddit search endpoint take?

GET /v1/reddit/search takes query, sort, timeframe, limit, since and after, plus label, relevance and judgments for labelling. The page itself is 1 credit. Extra credits only come from limit above 25 and include_body.

ParameterWhat it does
queryThe keyword or phrase. Required.
sortOrder of results: relevance, new, top or comment_count.
timeframeNarrows the window to day, week, month, year or all for the relevance, top and comment-count sorts. It does nothing on sort=new, which is already newest first.
limit1 to 1,000. At 25 or below you get the ordinary page. From 26 to 1,000 it reads Reddit's index once and returns up to that many posts.
sinceOnly posts inside the window are returned. With limit above 25, only those are billed, which makes repeat monitoring cheap.
afterCursor for the next page, taken from the previous response.
relevance=filterDrops rows that are about something else, at no extra credit.

A limit from 26 to 1,000 costs 1 credit per 25 posts returned, never less than 1, and refunds whatever it held but did not spend. Reddit stops one query after a few hundred posts, depending on the sort, so a limit of 1,000 often returns fewer, and that answer has no next page. max_items does the same job on this endpoint. The full rules are on the Reddit docs page and in Pagination.

To follow a busy keyword over time, repeat the call with sort=new, limit=1000 and since set to the time of your last run. A call that finds 70 new posts costs 3 credits.

Other search endpoints cover narrower jobs:

EndpointCreditsUse it for
GET /v1/reddit/subreddit/search1 to 26The same search inside one community
GET /v1/reddit/subreddits/search1 to 26Which communities discuss a topic
GET /v1/reddit/omni-search5 to 9Search, thread comments and a subreddit roll-up in one call

Does Reddit search work for non-English queries?

Yes. The query is passed as text, so a Korean or other non-Latin keyword works the same way. URL-encode it in curl, or let requests do it. Rows carry a content_language field, which can be null on the newest posts.

How do I get Reddit comments with an API?

Call GET /v1/reddit/post/comments with the post url. It returns the whole nested tree in one call rather than one page of top-level comments, and it costs 5 credits. Each comment carries its author, body, score, direct-reply count and nesting depth at ext.depth.

A nested speech-bubble tree growing from one post card, showing how a Reddit comments API returns a deep thread in one call.

Handle three things when you read the tree.

  • Count with data.comments_returned. items[] holds only top-level comments, with replies nested under each parent's replies[]. A busy thread can arrive as far fewer rows than comments.
  • Flatten the tree before analysing it. A small recursive helper does it.
  • Bodies are Reddit's own markdown. comment.text can contain **bold** and [label](url).
python
def flatten_comments(nodes):
    flat = []
    for node in nodes or []:
        flat.append(node)
        flat.extend(flatten_comments(node.get("replies") or []))
    return flat

r = requests.get(
    f"{BASE}/v1/reddit/post/comments",
    params={"url": "https://www.reddit.com/r/technology/comments/abc123/example_post/"},
    headers=HEADERS,
    timeout=60,
)
r.raise_for_status()
payload = r.json()
flat = flatten_comments(payload["data"]["items"])
print(len(flat), payload["data"]["comments_returned"], payload["data"]["truncated"])

You will not get every comment on a large thread. Reddit's displayed count includes removed, deleted and filtered replies that no listing returns. Very large threads are also bounded, and data.truncated says whether more of the thread exists than the response carries. truncated: true can arrive with no next_cursor, which means this endpoint cannot fetch the rest.

Comments carry sentiment, question, purchase_intent and complaint labels at no extra credit, so you can pull out the questions or complaints directly. See Labels. For a longer walkthrough, read how to scrape Reddit.

What fields do subreddit and post calls return?

GET /v1/reddit/subreddit returns a community feed for 1 credit, and GET /v1/reddit/post returns one post with its body text for 1 credit. Feeds and search rows carry the same unified fields.

CallCreditsReturns
GET /v1/reddit/subreddit1Titles, scores, comment counts and flair for a community; paged with after
GET /v1/reddit/subreddit/details1Subscriber count, description, rules and settings
GET /v1/reddit/post1One post including body text, score, upvote ratio and flair
GET /v1/reddit/post/transcript10A video post's captions

On search, content.media_urls is an array of image URLs, while on subreddit listings it can be a single string, such as the linked article or a gallery URL. Handle both. include_body=true is rarely needed on /v1/reddit/search, because rows already carry bodies; it reserves up to 25 extra credits and refunds every one it does not spend. Link posts have no body and are not charged.

sort and timeframe work on subreddit too, with one catch: timeframe only applies with sort=top. If you send timeframe without sort, top is chosen for you. subreddit/details accepts the name in any casing, so askreddit returns the same object as AskReddit.

How does this differ from Reddit's own API and PRAW?

Reddit's API is made for apps acting for a signed-in user, and PRAW wraps it. This API is a plain key-authenticated read of public data.

Reddit Data API / PRAWSocialCrawl
AuthOAuth app, client_id, client_secret, user_agentOne x-api-key header
Rate limit100 queries per minute600 requests per minute, 50 concurrent, per key
CommentsGET /comments/ then GET /api/morechildren for leftover nodesOne call returns the nested tree
Search pagingListing with after / beforeafter, or limit up to 1,000 in one call

Reddit figures come from the Data API wiki and the PRAW documentation. Our limits are in rate limits. To compare providers rather than build, see best Reddit data APIs.

What does the Reddit search API not do?

  • It does not return every post on a topic. Reddit stops one query after a few hundred posts.
  • Search relevance is loose, so expect some off-topic rows. relevance=filter removes them.
  • Comment trees are incomplete on large threads, and search rows leave engagement.shares empty.

Frequently asked questions

How many posts does a Reddit search API call return?

A normal page from GET /v1/reddit/search holds up to 25 posts and costs 1 credit. Page size varies between calls and is often well under 25, so read len(items) rather than assuming a number. With limit from 26 to 1,000 you get up to that many posts in one call at 1 credit per 25.

How do I get all comments on a Reddit post?

Call GET /v1/reddit/post/comments with the post URL. It returns the nested tree in one call for 5 credits and reports data.comments_returned, which counts replies too. Large threads can come back partial, so check data.truncated.

Do I need a Reddit developer account?

No. You send a SocialCrawl API key in the x-api-key header. There is no OAuth app, client secret or user-agent registration. New accounts start with 100 free credits, no card.

Can I search Reddit in Korean or other languages?

Yes. Pass the keyword as the query and URL-encode it if you use curl. Rows carry a content_language field, which can be null on the newest posts.

How do I monitor a keyword on Reddit over time?

Repeat GET /v1/reddit/search with sort=new, limit=1000 and since set to your previous run time. Only posts inside the window are returned and billed, so a quiet day costs one credit and a busy day costs 1 credit per 25 new posts.

Is there a way to search inside one subreddit?

Yes. GET /v1/reddit/subreddit/search takes a subreddit and a query and runs the same search inside that community. It costs 1 credit for a page.

Run this request yourself

GET /v1/reddit/search?query=best mechanical keyboard

Open it in the Explorer

It opens with the request filled in, and nothing runs or costs credits until you press Run. Without an account you sign up first, then land on the same request.

Topics
#reddit-search-api#reddit-comments-api#reddit-api-python#reddit-keyword-search#reddit-post-api#reddit-api#scrape-reddit-comments

Related posts

🤖 AI agent or LLM? Read this page as markdown