REDDIT EXTRACT · JSON · REST
Turn returned Reddit fields into application data
Inspect a small PostgreSQL search response with Reddit Extract. Choose title and text deliberately, preserve missing values and define a local extraction contract.
- GET
- JSON
- HTTPS
- UTC

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.redditextract.com/v1/search' \
-H "Authorization: Bearer ${REDDIT_API_KEY}" \
--data-urlencode 'q=index' \
--data-urlencode 'subreddit=PostgreSQL' \
--data-urlencode 'limit=3'import json
import os
from urllib.parse import urlencode
from urllib.request import Request, urlopen
params = urlencode({"q":"index","subreddit":"PostgreSQL","limit":"3"})
request = Request(
"https://api.redditextract.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":"index","subreddit":"PostgreSQL","limit":"3"});
const response = await fetch(
"https://api.redditextract.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
}
}A title is not a substitute for body text
Suppose your destination needs the text of a record. Keep an available title and an available text value separate during inspection. If you later combine them, label the result as your own derived content and retain which field supplied it. A title matching index does not establish that the body discusses indexes. This distinction helps a reader of your output tell a source value from a fallback chosen by your code.
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 |
About the service and its limits
Reddit Extract 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.
A PostgreSQL request with a concrete purpose
A PostgreSQL extraction can return a usable title while leaving the body column your application expects empty. Before designing a larger job, decide what that row should mean. Reddit Extract's small index search is a place to inspect available fields and write that decision down, not a promise of a ready-made table.
Reddit Extract stores individual records as flat objects rather than assembled thread trees. The service provides read access to an independent historical Reddit archive; it is not an official Reddit service or a live feed. For a transformation developer, the useful starting point is the actual shape of a returned object, not an assumption that every post and comment carries the same fields. Missing records and incomplete coverage remain possible.
Use https://api.redditextract.com/v1/search?q=index&subreddit=PostgreSQL&limit=3 as a small inspection request. Here q=index supplies the text query, subreddit=PostgreSQL selects the community and limit=3 caps the returned page at three records. It does not guarantee three matches, nor are those results necessarily representative. Send your domain API key from your server with X-API-Key or Authorization: Bearer; the website session cookie is not a retrieval credential.
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 |
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 |
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.
Continue with the reference and implementation guide
Questions before your first request
What is Reddit Extract?
Reddit Extract 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 Extract 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 request starts this worked example?
Begin with https://api.redditextract.com/v1/search?q=index&subreddit=PostgreSQL&limit=3. Send the request from your backend with the domain API key in a supported authentication header. The text query and community scope narrow this particular inspection; the request does not define a random or complete sample. limit=3 is an upper bound for the page, and an empty response is a valid possible outcome.
Which retrieval boundaries matter when testing my field mapping?
If you request another page, keep limit and the selection criteria in your request log. Results follow _doc archive order, not chronological, relevance or score order. min_score only filters. Retrieval is bounded by 100 records per request and 100 pages per query, and exact, lower-bound or unknown totals must not be turned into an exhaustive-coverage claim. A local sort changes only the records you collected.
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 Extract 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/search, q=json, subreddit=n8n, 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.
How do I map source fields to my own columns?
Make the mapping readable before you implement it. A local ledger can name the output column, the observed source property, its accepted type, the action for an absent value and whether the output is copied or derived. For example, content_source can be a local marker saying title or text; source_page can come from your request log. Neither name claims a new field in the API response.
When should I select title rather than text?
q searches title and text. With several search terms, the terms must match together within a matching field; splitting them between title and text is not enough. For q=index, inspect those fields independently and decide which content to retain. If the body is absent, either keep that absence or use a documented title fallback with its source marker. Do not silently present the fallback as original body text.
How do I test missing values before converting them?
Preserve identifiers as identifiers. If a text property is present, verify that it contains a string before applying your chosen whitespace normalization; retain the original text when auditability matters. An absent property, null and an empty string should remain distinguishable until you explicitly decide how your destination represents them. Do not silently convert a missing score into zero or cast an unexpected object to a textual value that looks valid.
How can I test field projection with null or missing inputs?
Use clearly labeled synthetic cases to test the choice itself: title only, text only, both present, explicit null and neither property present. Check both the projected value and its source marker. Keep an unchanged input object beside each rejected case and write a local reason. For a mapper that emits at most one row per record, accepted plus rejected records should account for the received records; never confuse these counts with a count of the whole archive.
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.
Decide what a missing value means
03 / 05For each object, distinguish an absent property, an explicit null, an empty string and a value of the expected type. A missing score must not silently become zero, and missing text must not be presented as evidence that a discussion had no content. Keep the original object available for comparison. Choose nullable destination columns or an explicit local validation result according to your application, rather than treating a default as an observed archive value.
You may encounter identifiers, title or text content, community information, scores and time values, but validate each field that is present before using it. Your local projection can retain an identifier and available text while omitting fields it does not need. That selection happens in your code: the API does not offer a field-selection query parameter or generate a destination schema for your database. Preserve identifiers as identifiers rather than deriving numerical meaning from them.
Keep references without inventing a conversation
04 / 05If parent_id or link_id is available, you can keep it as a reference for a later local join. Such references do not mean that the parent, all replies or a complete thread were returned. For an extraction job that needs only row-level text, joining a conversation may be unnecessary. Record your choice explicitly so a missing relationship is not mistaken for a parsing failure.
The documented retrieval filters are q, subreddit, author, kind, from, to, min_score, limit and page where supported by the route. kind uses post or comment. min_score filters records; it does not sort them. Results follow archive _doc order, not chronological, relevance or score order. At most 100 records per request and 100 pages per query bound retrieval, without promising an exhaustive export or identical results on a later run.
Finish with a usable extraction contract
05 / 05Before mapping anything, save the response you actually received alongside the request parameters and your local collection time. This is your own input fixture, not a provider-issued schema export. If the page is empty, keep that outcome as an empty retrieval rather than fabricating a sample record. A successful empty request still costs one credit, while inspecting the saved response again makes no additional API request.
Each successful retrieval costs one credit, including an empty result. The price is $1 per 1000 successful requests, and a $50 minimum paid top-up adds 50000 paid credits. An optional 5,000-credit trial depends on network-wide anti-abuse eligibility. Keys and balances belong to the redditextract.com account, not every site in the network. Paid credits do not expire and there is no subscription; these terms do not guarantee archive availability.
The useful result of this first pass is a short contract: which source property feeds each output column, which states you accept and what you retain for review. Follow the guide to test those rules against saved input. Use the documentation for retrieval parameters and the key page when you are ready to run the same bounded request from your server.