Get Reddit Data

Read the API contract before mapping records into rows

GET routes, both key headers, inclusive UTC dates and pagination totals. Map received historical records into your own table without assuming complete coverage.

Protected reads and the public status exception

Protected reads use GET under https://api.getredditdata.com with X-API-Key: <key> or Authorization: Bearer <key>. Both alternatives carry this domain's archive key, not a Reddit OAuth token. Keep the secret server-side. The account panel's Secure HttpOnly session cookie is separate from retrieval authentication. The independent historical archive provides JSON records without live updates or official Reddit affiliation.

/v1/search searches posts and comments. /v1/posts constrains results to posts and /v1/comments to comments. All three accept q, subreddit, author, kind, from, to, min_score, limit and page, not id. kind accepts post or comment; omit it to allow both through search. q is text search, without arbitrary query DSL, sentiment classification or server-side custom analytics.

/v1/item?id=... requires id only and looks for one archived record, which may be absent. It does not walk parents or replies. /v1/subreddits accepts prefix and limit only for community-name discovery, without page traversal or guaranteed globally exact counts. /v1/status is public and uncharged: its static scope disclosure confirms that the HTTP application responds, without checking search availability, record freshness, key validity or balance.

Dates, flat records and your destination table

from and to accept YYYY-MM-DD in UTC and filter created_utc, not when a record entered the archive. The complete final to day is included. These are day filters, not intraday cursor values. If you divide work by date, record the actual bounds and distinguish your job's processing time from source creation time. Such partitioning does not prove exhaustive retrieval or a schedule of archive updates.

min_score sets a numeric score threshold without sorting or assessing the validity of advice. Retrieval follows internal _doc order, not chronology, relevance or score. A high threshold can change which discussions your table includes; it is not a representative sampling method. Local sorting organizes only received records and cannot establish that every earlier record has been retrieved.

API responses return flat records rather than server-assembled thread trees. When fields like parent_id or link_id are present, you can group them locally in your client code to reconstruct conversations, but the server does not guarantee complete ancestry or a full thread structure. There are no exposed query filters for parent_id or link_id, so you must handle hierarchical reconstruction manually. Responses contain data, pagination and credits. Individual fields can be missing or vary; preserve that distinction when building your local table rather than assuming a fixed archive schema.

Page boundaries, totals and failure handling

Content routes accept limit and page from 1 to 100, one page per request. A series of calls does not guarantee 10000 distinct records or a complete dataset. There is no page=101 for the same query. Smaller windows and local deduplication can organize collection, without proving coverage, uniqueness or identical results on another retrieval. Save the actual responses used for your analysis.

Read pagination.total with relation: eq means an exact query total, gte a lower bound and unknown no reliable total, possibly null. An empty page after page one can return unknown rather than a count of zero. An exact total does not prove that all matches were downloaded or that the archive contains all history. Preserve returned has_more and window_exhausted as boundary signals, not unlimited-export tokens.

HTTP 400 concerns invalid parameters, 401 a missing or invalid key, 402 insufficient credits and 429 a frequency limit. Invalid requests do not debit; upstream failures refund reservations. Every successful retrieval costs one credit, even empty or repeated. Response loss may conceal a billed success, and a local processing failure does not refund it. Save the received response before advancing local progress and budget successful retries separately.

API routes

MethodRouteParameters
GET/v1/searchq, subreddit, author, kind, from, to, min_score, limit, page
GET/v1/postsq, subreddit, author, kind, from, to, min_score, limit, page
GET/v1/commentsq, subreddit, author, kind, from, to, min_score, limit, page
GET/v1/itemid
GET/v1/subredditsprefix
GET/v1/status—

Query parameters

ParameterValue / type / range
qtext
subredditkeyword
authorkeyword
kindpost | comment
fromISO date
toISO date
min_scoreinteger
limit1–100
page1–100
iditem ID
prefixsubreddit prefix