REDDIT DATA API · JSON · REST
Reddit Data API for search and data pipelines
Read archived Reddit posts and comments as JSON. Build a focused research sample, check the fields your application needs, and move validated records into your own analysis or warehouse. Your API key and request history stay together in the account.
- GET
- JSON
- HTTPS
- UTC

Questions before your first request
What is Reddit Data API?
Reddit Data 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 Data 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.
What should I define before loading the warehouse?
Suppose the destination is a table for examining the text and recorded score of historical posts from dataengineering. Define the intended row meaning before the table columns: one accepted source post, with your batch metadata kept separately. This is a proposed local warehouse design, not a statement that the API supplies every property or every post you might need.
When is another page worth requesting?
Fetch more material when the next batch serves a defined validation or analysis need. Do not refetch solely to rerun a local conversion. A future remote response can differ; reproducibility here means retaining inputs and transformation versions for your own processing. Detailed date filters, totals and response codes belong in the documentation, and the pricing page explains charged successes, upstream reservation refunds and separately charged successful retries. The result of this exercise is a reviewable load procedure, not an exhaustive or immutable archive export.
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.
Does Reddit Data API provide live Reddit access?
No. This service reads a historical archive, not a live Reddit feed. It cannot publish posts, vote, send private messages or perform Reddit OAuth actions. The public /v1/status route describes the service scope; it does not prove archive health, complete coverage or current availability of an original Reddit page.
Can I export every record that matches a search?
Not necessarily. A request returns up to 100 records, and page ranges from 1 to 100. Read total together with pagination.relation: exact, lower bound or unknown. Results follow archive order rather than guaranteed chronological or relevance order. Reaching the last accessible page does not prove that a saved sample is exhaustive.
Can I reuse the same key on another domain?
No. Accounts, API keys and credit balances are separated by site. Use the key issued for this domain with its own HTTPS API hostname. Keep that key in server-side configuration, not in browser JavaScript, public repositories or shared logs. A key from another site is not a substitute for a local account. Google sign-in is shared across the network; API keys and balances remain separate for each site.
Which request should I try first?
Start with /v1/posts, q=etl, subreddit=dataengineering, limit=3 and page=1. This small request lets you inspect available fields before writing import or interface logic. It still costs one credit when successful, including an empty result. Adjust the topic and community for your task; the example is not a promise of a fixed record count.
Why keep an untouched copy of the response?
Request https://api.redditdataapi.com/v1/posts?subreddit=dataengineering&limit=3 from your server and save the actual response before conversion. Store the route, nonsecret parameters, retrieval time and loader version beside it. The archive is independent, historical and unofficial. A returned page is neither live Reddit nor evidence of complete community coverage; an empty successful page is a valid input to the job.
How do I map source fields to my own columns?
List only properties you observe or explicitly handle as optional. For id, decide whether the destination accepts the source string unchanged. For title and text, define how omitted properties differ from null and empty strings. For score, accept the numeric forms your validation contract permits instead of quietly converting absence to zero.
What should happen to rejected records?
A rejected row should point back to its raw object and explain the failed rule. Separate type errors from deliberate exclusions so the operator can choose between fixing a mapping and changing the selection policy. Retain accepted, rejected and excluded counts for this batch. Such counts describe your processing of received data, not the volume of activity on Reddit.
When can a validated batch enter the destination table?
Test revised transformations against the same saved input before inserting accepted rows into the destination. If suitable source identifiers are available, document how your loader handles a repeated object. The API does not guarantee unique records across pages. Keep raw landing and normalized output separate so a later schema revision does not overwrite the evidence used to justify the earlier load.
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.
What can you build with Reddit archive data?
Use the API as the retrieval step in a workflow you control. A data team can inspect historical posts before defining warehouse columns; a researcher can document a community and date window; a product team can select relevant passages for manual review. Classification, charting and database loading happen in your application. The service returns source records rather than a finished report, sentiment score or complete conversation tree.
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.
| Method | API | Use |
|---|---|---|
GET | /v1/search | Search posts and comments |
GET | /v1/posts | Posts only |
GET | /v1/comments | Comments only |
GET | /v1/item | One known record id |
GET | /v1/subreddits | Community names by prefix |
GET | /v1/status | Service scope; no charge |
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 --get --fail-with-body 'https://api.redditdataapi.com/v1/search' \
-H "Authorization: Bearer ${REDDIT_API_KEY}" \
--data-urlencode 'q=data pipeline' \
--data-urlencode 'limit=3'import json
import os
from urllib.parse import urlencode
from urllib.request import Request, urlopen
params = urlencode({"q": "data pipeline", "limit": 3})
request = Request(
"https://api.redditdataapi.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+ · example.mjs
const parameters = new URLSearchParams({q: "data pipeline", limit: "3"});
const response = await fetch(
"https://api.redditdataapi.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
}
}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.
| Parameter | Meaning |
|---|---|
q | Text in title and text |
subreddit | Exact community spelling |
author | Exact author value |
kind | post or comment |
from / to | YYYY-MM-DD, UTC; end day included |
min_score | Minimum score, not sorting |
limit / page | Both range from 1 to 100 |
prefix / id | Route-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.
| Parameter | Meaning |
|---|---|
id | Keep the source identifier |
kind | Inspect the record kind |
subreddit | Preserve the returned community name |
title / text | Treat missing, null and empty separately |
created_utc / score | Check numeric values before conversion |
parent_id / link_id | Optional links; group locally if present |
Start with three posts, not a finished table
A warehouse table needs more than a successful API connection. Its columns need meanings, its missing values need rules, and its rejected rows need somewhere to go. Reddit Data API gives data engineers flat historical records to inspect before making those decisions. Use a small batch to draft the mapping between source properties and the table your downstream analysis actually needs.
The working request is https://api.redditdataapi.com/v1/posts?subreddit=dataengineering&limit=3. It asks for up to three posts from the dataengineering community. That is a manageable input for checking a loader, not a random sample or a census. The service is an independent historical archive, unaffiliated with Reddit; it does not supply a live feed.
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.
| Use | Response |
|---|---|
| Available historical records | Supported read-only routes |
| Live feed and new activity | Not provided |
| Publishing, editing and voting | Not provided |
| Complete conversation trees | Not provided; optional local grouping |
Request costs you can account for
Eligible new accounts, once across the network
Per 1,000 successful requests, including empty results
Minimum top-up for 50,000 credits
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.
Make the mapping explicit
02 / 04For each property that occurs in the response, write down its destination column, accepted type and missing-value treatment. A source id might remain a string in a source_record_id column you define. If created_utc is present, inspect its value and unit before converting it to your warehouse timestamp type. Those destination names and conversions are your design, not an export schema supplied by the API.
Keep an absent score separate from a score of zero. Likewise, an empty text value, an explicit null and an omitted property need not mean the same thing. The useful outcome of this first pass is a short mapping specification with examples that exercise those differences, rather than a wide table whose default values conceal them.
Land first; promote after validation
03 / 04Save the response as a raw input before generating normalized rows. Your staging step can attach a local batch identifier and transformation version, then separate accepted rows from records needing inspection. Keep the original object alongside a rejection reason so a type mismatch can be investigated without requesting the same page again.
A second pass through that saved input should exercise your revised rules without another API call. This makes schema changes testable against known material. It does not promise identical future responses: archive coverage, record availability and page contents are not guaranteed. Treat additional retrieved batches as new inputs to validate, not automatic confirmation of the first sample's shape.
Decide what is ready to load
04 / 04Before promoting a batch, reconcile the number of received objects with accepted, rejected and deliberately excluded records. Check that secrets have not entered the raw payload notes or exported columns. If you group records through optional parent_id or link_id values, keep those local relationships separate from source facts; the API does not assemble complete conversation trees.
The guide develops this staging workflow, while the documentation describes filters and bounded retrieval. Each successful retrieval, including an empty response, costs one credit at $1 per 1000 successes. Obtain the domain's key before payment, check the available balance, and use the pricing page for funding details. A small inspection batch lets you decide what your loader can accept before committing to a larger collection job.
About the service and its limits
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.