Reddit Search API
EN

Reddit Search API · GET · JSON

Why a matching title is not the best answer

Conceptual illustration, not a screenshot or measured result.

Questions about this page

What should I check in “Separate matching from ranking”?

A matching title is a starting point, not an endpoint.

What should I check in “Inspect visible record fields”?

Consider an explicitly invented reading exercise: a title mentions quantization, but the available body concerns a setup different from the one the reader is investigating.

What should I check in “Label unknown relevance”?

Use labels that describe the reading decision rather than asserting an answer-quality score.

What should I check in “Offer a user decision”?

After inspection, offer actions tied to the question: keep the reference, record an uncertainty, refine one supported input, or stop.

What is Reddit Search API?

Reddit Search API is an independent read-only service for retrieving available archived Reddit posts and comments as JSON. Authenticate with the key for this site and choose a documented search or lookup route. It is not official Reddit, live access or a complete export of a community.

How much does Reddit Search API cost?

The price is $1 per 1,000 successful requests. The minimum top-up is $50 for 50,000 credits. Each successful request uses one credit, even when it returns no matching records. Invalid requests are not charged; upstream failures trigger a refund, which can require reconciliation. A timeout alone does not establish the final billing outcome.

How do I get an API key?

Create an account with email and password, or continue with Google in a popup. Eligible new accounts receive $5 (5,000 credits) once across this site network. Your API key is available at the top of the account after sign-in and is stored encrypted. Keep it on your server.

Which filters can I use to search Reddit records?

Use q for analyzed text search and combine it with subreddit, author, kind, from, to or min_score. Multiple search words use AND semantics; this is not a semantic-search or arbitrary-query-DSL endpoint. Dates use YYYY-MM-DD in UTC, with the to date including the whole day. Start with documented parameters in the reference.

Separate matching from ranking

A matching title is a starting point, not an endpoint. A developer looking through historical LocalLLaMA discussions may want to understand the memory conditions behind a quantization experiment. Finding the word quantization in a title does not establish that the record describes those conditions. The search request identifies matching material under its filters; it does not certify a solution to the reader's problem. Keep the question visible above the list so an attractive title cannot quietly become the acceptance criterion for the whole search.

The service returns archive _doc order, not relevance, date or score order. Do not explain the first item as the winner of an Elasticsearch relevance ranking, and do not infer title boosts or quality scores from its position. The q parameter uses analyzed AND matching within a matching title or text field. That describes how terms can qualify a record; it does not determine which qualified record is the best answer. min_score is a stored-score filter, not a request to rank the response by score.

Inspect visible record fields

Consider an explicitly invented reading exercise: a title mentions quantization, but the available body concerns a setup different from the one the reader is investigating. The card might be useful background without answering the memory question. Read the supplied text before adding a label such as relevant to this setup. Note whether the model, hardware or measurement conditions the reader needs are actually stated. The API provides the raw data; it does not interpret it. Do not manufacture a missing detail to make the example fit.

The data array contains flat records, and desired fields can be missing. A comment may lack a title; a record may lack readable text, an author, a usable timestamp or a safe source link. Mark those absences directly. Validate a returned link before enabling navigation, and treat a live destination as separate from the archived content. Optional parent_id or link_id values may connect records already available to your application, but cannot establish that you possess the opening post, every reply or the full context of a claim.

Label unknown relevance

Use labels that describe the reading decision rather than asserting an answer-quality score. For example, your application could offer not reviewed, useful background, settings missing and relevant to this question. These are proposed reader annotations, not fields returned by the archive. Keep them separate from the source text and explain who assigned them. A later reader should be able to see why a record was retained instead of mistaking an application label for Reddit endorsement, verified expertise or an automatic judgment by the search service.

Pagination cannot fill that evidential gap. pagination.relation qualifies pagination.total: eq describes an exact count under that response's semantics, gte a lower bound, and unknown no reliable total. None is a relevance assessment. A large total does not make a conclusion common or well supported; a small displayed page does not prove that better material is absent. If your application sorts the records it has already loaded, identify this as local presentation. It does not make the first local card the best match in the archive.

Offer a user decision

After inspection, offer actions tied to the question: keep the reference, record an uncertainty, refine one supported input, or stop. A reader who needs memory context might try quantization memory while retaining subreddit=LocalLLaMA. Explain the field-local AND requirement before submission. If an exact author or UTC date range is genuinely relevant, use the documented filters and show the restriction. Do not offer a hidden semantic-search switch, arbitrary field weights, an author-reputation filter or a best-answer endpoint that this API does not provide.

A new successful retrieval uses one credit even when it returns no records. Make further requests deliberate, and distinguish a successful empty response from a failure or an unanswered transport attempt. The useful outcome of this exercise may be a reference plus an unresolved condition, rather than a definitive answer. Judge the interface by whether the reader can explain that distinction. Historical material can help frame the next investigation without proving current model behavior, complete archive coverage, permanent source availability or the usefulness of an unseen result.

Make your first authenticated request

Create an account, copy the key shown at the top of the account page, and put it in a server environment variable. The three examples below request the same small page. Inspect the HTTP status before using the JSON; keep credentials out of browser bundles, shared notebooks and request logs.

cURL

curl --get --fail-with-body 'https://api.redditsearchapi.com/v1/search' \
  -H "Authorization: Bearer ${REDDIT_API_KEY}" \
  --data-urlencode 'q=quantization' \
  --data-urlencode 'subreddit=LocalLLaMA' \
  --data-urlencode 'limit=3'

Python

import json
import os
from urllib.parse import urlencode
from urllib.request import Request, urlopen

params = urlencode({"q":"quantization","subreddit":"LocalLLaMA","limit":"3"})
request = Request(
    "https://api.redditsearchapi.com/v1/search?" + params,
    headers={"Authorization": "Bearer " + os.environ["REDDIT_API_KEY"]},
)
with urlopen(request, timeout=20) as response:
    payload = json.load(response)

print(payload["pagination"])
print(payload["data"])

Node.js 18+

// Node.js 18+ · example.mjs
const parameters = new URLSearchParams({"q":"quantization","subreddit":"LocalLLaMA","limit":"3"});
const response = await fetch(
  "https://api.redditsearchapi.com/v1/search?" + parameters,
  {headers: {Authorization: "Bearer " + process.env.REDDIT_API_KEY}}
);
if (!response.ok) throw new Error("HTTP " + response.status);
const payload = await response.json();
console.log(payload.pagination);
console.log(payload.data);

Read the response before building a table

This is an illustrative empty successful response, not a live query result. An empty page still costs one credit. Read data, pagination and credits separately; a total must always be interpreted with relation. The balance shown is an example after one eligible trial request.

{
  "data": [],
  "pagination": {
    "page": 1,
    "limit": 3,
    "total": 0,
    "relation": "eq",
    "has_more": false,
    "window_exhausted": false,
    "truncated": false
  },
  "credits": {
    "cost": 1,
    "balance": 4999
  }
}

Response

Inspect the actual objects before assuming a column exists. Keep omitted values, null and empty strings distinct. Relationship fields, when returned, may help with local grouping; they do not establish a complete thread. Preserve the raw response so a revised mapping can be tested without paying to fetch it again.

Combine ordinary text with an exact community and a UTC date window. Keep the nonsecret query parameters with the saved response. Limit controls the page size, page selects a bounded offset, and min_score is a filter rather than a sorting option. A page order is not a chronological or relevance ranking.

Six routes, one read-only API contract

Choose the route for the object you need. Search selects posts and comments; posts and comments constrain the record kind. Item looks up a known id. Subreddits returns matching community names rather than a complete community dataset. Status is an uncharged service-scope response and does not test search availability.

MethodAPIUse
GET/v1/searchSearch posts and comments
GET/v1/postsPosts only
GET/v1/commentsComments only
GET/v1/itemOne known record id
GET/v1/subredditsCommunity names by prefix
GET/v1/statusService scope; no charge

Set the boundaries of a collection job

Combine ordinary text with an exact community and a UTC date window. Keep the nonsecret query parameters with the saved response. Limit controls the page size, page selects a bounded offset, and min_score is a filter rather than a sorting option. A page order is not a chronological or relevance ranking.

ParameterMeaning
qText in title and text
subredditExact community spelling
authorExact author value
kindpost or comment
from / toYYYY-MM-DD, UTC; end day included
min_scoreMinimum score, not sorting
limit / pageBoth range from 1 to 100
prefix / idRoute-specific name prefix or known id

Map observed fields deliberately

Inspect the actual objects before assuming a column exists. Keep omitted values, null and empty strings distinct. Relationship fields, when returned, may help with local grouping; they do not establish a complete thread. Preserve the raw response so a revised mapping can be tested without paying to fetch it again.

ParameterMeaning
idKeep the source identifier
kindInspect the record kind
subredditPreserve the returned community name
title / textTreat missing, null and empty separately
created_utc / scoreCheck numeric values before conversion
parent_id / link_idOptional links; group locally if present
Conceptual illustration, not a screenshot or measured result.

Where this archive API fits

Use this service when your task starts with reading available historical records. A live feed, posting, editing, voting or a server-built thread requires a different integration. Direct page scraping and official Reddit access have their own behaviour and requirements; this endpoint does not impersonate either interface or promise their coverage.

How do search, posts and comments differ?

Use /v1/search for the supported search across record kinds. /v1/posts and /v1/comments add a post or comment constraint. They share the documented search filters; /v1/item is the separate route for a known id. None of these routes creates, edits or deletes Reddit content.

How is this different from scraping Reddit pages?

You request structured historical records through the documented routes instead of downloading current HTML and extracting page elements. This avoids making your loader depend on page markup. It does not provide a live proxy, browser session, official OAuth compatibility or a promise of complete historical coverage.

Documentation

1. Write down what the request is allowed to answer

The example is a model developer reading past LocalLLaMA discussions about quantization. The API base is https://api.redditsearchapi.com and the proposed first route is /v1/search?q=quantization&subreddit=LocalLLaMA&limit=3. Authenticate from your server with Authorization: Bearer followed by your API key, or the X-API-Key header. Keep the raw credential out of a browser bundle, query-history entry and shared screenshot. Keys and balances belong to this domain.

This independent historical archive does not provide a live Reddit feed, Reddit account authorization, posting, voting or private messages. A page timestamp, a record timestamp and the time you retrieved a response describe different things. Record only the timestamp fields actually present. No requested date range or successful response establishes complete coverage of the period.

2. Test what the words mean before adding controls

q is analyzed against title and text using best_fields matching with operator AND. For quantization memory, both analyzed terms must match within a matching field; putting one word only in the title and the other only in text does not by itself satisfy that field-level requirement. This is a conceptual counterexample, not a recorded archive result. Do not call the request exact-phrase search, an OR search or a ranked recommendation.

Search, posts and comments accept q, subreddit, author, kind, from, to, min_score, limit and page. kind accepts post or comment. /v1/posts and /v1/comments constrain record kind and do not require id. /v1/item takes id instead of the search filter set. /v1/subreddits accepts prefix and limit for community aggregation; its buckets are not a guaranteed complete directory. There are no parent_id, link_id or sort parameters.

3. Keep a dated search separate from a dated conclusion

Supply from and to as YYYY-MM-DD UTC dates. The to date includes its final second; a date-time such as 2026-06-01T00:00:00Z is not a valid filter value. An example interval from=2026-06-01&to=2026-06-30 describes the requested June window. It does not assert that records for every day exist. Keep the actual submitted dates beside any local reading note.

min_score excludes records below the supplied threshold; it never asks for score order. Retrieval uses archive _doc order, neither chronological nor relevance nor score order. A date filter does not make the first returned record the earliest. If your own interface sorts records it already has, identify that as local presentation of a bounded response rather than the server ordering all matching discussions.

4. Read pagination as evidence about this window

limit and page each accept integers from 1 through 100. Keep the query conditions and limit unchanged when incrementing page. Inspect pagination.has_more and pagination.window_exhausted instead of inferring another page from an attractive total. The last full 100-record page of the 100-page window has no lookahead beyond the exposed window, so a full last page cannot establish an exact total.

pagination.relation qualifies pagination.total: eq is exact, gte is a lower bound and unknown means no reliable total, which may be null. A deep empty page can carry an unknown total rather than proving the whole query had no matches. Community aggregations also expose truncation separately. Do not label a lower bound as an exact match count or promise that bounded page iteration exports every matching archive record.

5. Map a flat record to an honest reading card

The data array contains flat source records. Treat each field as conditional on the returned item rather than assuming every post has a title, author, timestamp or usable link. Preserve source text separately from your own annotations. Only expose a source link after validating the returned value for safe navigation in your application; a missing parent is not permission to invent a thread URL.

Returned parent_id and link_id values can support local grouping of records you actually possess. They are not query filters and do not prove complete ancestry or a complete thread. If the author’s model settings are missing, mark the reading question unresolved. Fetching more material is an optional further request, not a service guarantee that the context can be recovered.

6. Put the failure beside the request that produced it

HTTP 400 means invalid input, 401 a missing or invalid API key, 402 insufficient credit, 429 a rate limit and 502 an upstream failure. Let the account operator handle credentials or balance without presenting a service-key problem as the reader’s personal login failure. Correct invalid parameters before retrying; avoid an uncontrolled retry loop after a rate limit or an uncertain connection failure.

Every successful retrieval costs one credit, including an empty data array. Invalid requests are not charged; upstream failures refund a reserved credit, with pending reconciliation possible if immediate refund handling fails. A lost response does not establish whether a successful request occurred. The public uncharged /v1/status returns a static archive disclosure and an HTTP response; it does not test search health, record availability or the completeness of your notebook.

Keeping and replacing your key

API key

Your API key is stored encrypted and is available after sign-in. Keep it private.

Keep the key on your server. Regeneration immediately disables the previous key. Your credits and account remain available.

Recovering account access

Save this one-time code privately. You need your email and this code to reset a forgotten password. A new code replaces the previous one.

Continue with Google

An existing account can be linked when Google establishes authoritative ownership of the email. Other email addresses require confirmation with the existing account password.

Request records and local copies

Request activity · last 30 days

Detailed request records, including client IP and user agent, are kept for 30 days.

Summaries cover the selected period. IP, response and latency details are available only for logged requests and expire after 30 days. Older records may lack these fields.

Requests

The export contains the currently displayed page and filters. Times use your browser timezone; chart days use UTC.

Reddit Data API is an independent historical archive service, not an official Reddit product or a live mirror. Availability of a record, time range or optional field is not guaranteed. Record the scope and retrieval time of your own batch, review the terms and privacy information, and avoid presenting a bounded archive sample as all activity on Reddit. The account exposes request costs, statuses and available client details; older requests may lack IP or latency fields.

Request costs you can account for

$1 / 1,000

A successful retrieval costs one credit, including an empty result: $1 per 1,000 successes. Eligible new accounts receive $5 = 5,000 credits once across the network. The minimum paid top-up is $50 = 50,000 credits. Invalid requests are not charged; upstream failures refund the reservation, sometimes after reconciliation. A successful retry is a new paid retrieval, so rerun local transformations from saved inputs first.

$5 / 5,000

Welcome credit: $5 · 5,000 credits

$50 / 50,000

Create an invoice before sending. Send exactly the displayed amount using the displayed token and network. Credit is added only after blockchain confirmation.

Conceptual illustration, not a screenshot or measured result.

Continue with the related reference