Reddit API

Reddit Search API

Search Reddit posts across all subreddits by query, with sort and timeframe. Paginate with the after cursor.

POST/v1/run/reddit.search
Uptime
99.56%
30d · 9,835 calls
Requests
9,851
30d · weekly, last 12 wks
Response
1.7s
median · 30d

Try it

Make your first request

requireFieldsarray
Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `isArchived` or `media`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a post that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge. On a paginated walk it applies to the first page only; later pages stay with the source that page chose, at the price it was quoted.
Open in
Get a free key
Sample response
Free runs return only the first 3 results. Fund a key to get the full response.
{
  "found": true,
  "data": {
    "posts": [
      {
        "id": "t3_1abc234",
        "title": "What is the best mechanical keyboard under $150?",
        "author": "keebenjoyer",
        "score": 1842,
        "numComments": 327,
        "url": "https://www.reddit.com/r/MechanicalKeyboards/comments/1abc234/",
        "permalink": "/r/MechanicalKeyboards/comments/1abc234/",
        "createdUtc": 1718200000,
        "subreddit": "MechanicalKeyboards"
      }
    ],
    "nextCursor": "t3_1abc234"
  }
}
Response interface
interface RedditSearchResponse {
  data: {
    nextCursor: string | null;
    posts: {
      author: string;
      createdUtc: number;
      id: string;
      isArchived?: boolean;
      isLocked?: boolean;
      media?: {
        height?: number;
        type: string;
        url: string;
        videoUrl?: string;
        width?: number;
      }[];
      numComments: number;
      permalink: string;
      score: number;
      selftext?: string;
      subreddit: string;
      title: string;
      url: string;
    }[];
  } | null;
  found: boolean;
}

Full parameter and response reference - every field, type, and example for this endpoint.

Reference

Request, response, and price

Last verified 2026-09-17 · uptime and latency measured over 30d
POST /v1/run/reddit.search
curl -X POST https://api.getanyapi.com/v1/run/reddit.search \
  -H "Authorization: Bearer $ANYAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"best mechanical keyboard","sort":"relevance","timeframe":"month"}'
FieldTypeExample value
Request body
querystring"best mechanical keyboard"Free-text search across all of Reddit. Reddit's field operators are supported inside the string: subreddit:<name> to scope to one subreddit, author:<user>, title:<text>, selftext:<text>, self:yes|no, nsfw:yes|no, and boolean AND/OR/NOT. To restrict to a single subreddit you can use subreddit:<name> here, or use the reddit.subreddit_posts SKU for a plain subreddit listing.
cursorstringOpaque pagination cursor from a previous response's nextCursor. Omit for the first page; pass it to fetch the next page of results.
requireFieldsarrayOptional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `isArchived` or `media`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a post that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge. On a paginated walk it applies to the first page only; later pages stay with the source that page chose, at the price it was quoted.
sortenum"relevance"Result sort order.
timeframeenum"month"Time window for results.
Response
foundbooleantrue
dataobject
data.postsarray
data.posts[].idstring"t3_1abc234"
data.posts[].titlestring"What is the best mechanical keyboard under $150?"
data.posts[].authorcan requirestring"keebenjoyer"
data.posts[].scorecan requirenumber1842
data.posts[].numCommentscan requirenumber327
data.posts[].urlstring"https://www.reddit.com/r/MechanicalKeyboards/comments/1abc234/"
data.posts[].permalinkstring"/r/MechanicalKeyboards/comments/1abc234/"
data.posts[].createdUtccan requirenumber1718200000
data.posts[].subredditstring"MechanicalKeyboards"
data.nextCursorcan requirestring"t3_1abc234"
Price
Price per requestUSD$0.00038
Price /1k reqUSD$0.38

FAQ

About the Reddit Search API

The AnyAPI Reddit Search API returns Reddit search data as normalized JSON from one POST call to /v1/run/reddit.search. Search Reddit posts across all subreddits by query, with sort and timeframe. Paginate with the after cursor. AnyAPI routes each request across 3 sources and falls back automatically when one fails. It costs from $0.38 per 1,000 requests, in US dollars with no subscription and no monthly minimum. Over the last 30 days, 99.6% of Reddit search calls through AnyAPI succeeded, with a median response time of 1.7 seconds across 9,835 measured calls.

It costs from $0.38 per 1,000 requests, in US dollars with no subscription and no monthly minimum. You fund one USD wallet, each call draws it down, and a failed request costs $0.

Search Reddit posts across all subreddits by query, with sort and timeframe. Paginate with the after cursor. The response is normalized JSON with the same envelope every AnyAPI endpoint returns, so parsing a second endpoint is a change of URL and nothing else.

Over the last 30 days, 99.6% of Reddit search calls through AnyAPI succeeded, with a median response time of 1.7 seconds across 9,835 measured calls. These are AnyAPI's own measurements of traffic through the gateway, recomputed continuously, not a published service-level target.