Language navigation

The retrieval contract behind your locally curated sample

GET routes, both key headers, UTC dates and pagination totals. Record available metadata without assuming bulk export, random sampling or certified provenance.

Get API key

Protected reads and the public status exception

Protected reads use GET under https://api.redditdatasets.com with X-API-Key: <key> or Authorization: Bearer <key>. Both formats carry this domain's archive key, not a Reddit OAuth token. Keep it server-side and out of public dataset files. The account panel's Secure HttpOnly session cookie is separate from retrieval authentication. Signup displays the key once immediately before payment; a top-up is not required for key issuance.

/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.

Available fields and your own provenance record

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, verifying expertise or removing spam. Retrieval follows internal _doc order, not chronology, relevance, score or random selection. A higher threshold changes the retrieved group rather than certifying its quality. Keep your own labels and calculated attributes distinct from source fields and document the exclusions those choices produce.

Content records are flat and fields may vary or be absent. Present parent_id and link_id can support local grouping, without complete ancestry or conversations; neither is an exposed search filter. Responses contain data, pagination and credits. The service does not supply a dataset-specification schema or per-record provenance certificate. Your own specification records observed metadata, received responses and transformation choices rather than inventing missing origin information.

Page boundaries, totals and failure handling

Content routes accept limit and page from 1 to 100, one page per request. A sequence of calls does not guarantee 10000 distinct records or a complete dataset. There is no supported bulk-download or random-sampling parameter. Date partitions and local deduplication organize work without proving full coverage or unique records. Save the responses actually used for annotation because repeated queries do not guarantee the same input.

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