Reddit Datasets
EN

REDDIT DATASETS · JSON · REST

Build Reddit samples for labeling and evaluation

Use a Reddit datasets API to inspect MachineLearning comments, define annotation decisions and document a bounded historical sample before building training data.

  • GET
  • JSON
  • HTTPS
  • UTC
Conceptual illustration, not a screenshot or measured result.

Write the question on the specimen sheet

Can a reader distinguish a methodological question from a claim about a model using only a comment? Start there. For a machine learning dataset curator, the first deliverable is a workable annotation rule, not a large row count. Reddit Datasets supplies access to an independent historical Reddit archive, without official affiliation or live updates. Your team chooses the labels and evaluates whether the received material supports that task.

For an NLP experiment, choose the annotation unit before collecting more material: an isolated comment, an opening post or a passage with available context. A moderation notice should not become a model-quality claim merely because it contains a familiar keyword. Save the exclusion reason so an evaluator can inspect the choice.

Conceptual illustration, not a screenshot or measured 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 --get --fail-with-body 'https://api.redditdatasets.com/v1/comments' \
  -H "Authorization: Bearer ${REDDIT_API_KEY}" \
  --data-urlencode 'subreddit=MachineLearning' \
  --data-urlencode 'limit=3'

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
  }
}

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

Open a small accession record

02 / 05

Use GET https://api.redditdatasets.com/v1/comments?subreddit=MachineLearning&limit=3. comments restricts the route to comments, subreddit=MachineLearning chooses the community and limit=3 requests at most three records on the default first page. The community name is a filter, not proof of available coverage or expert authorship. Send X-API-Key: <key> or Authorization: Bearer <key> from your server; both carry this domain's archive key.

Synthetic response excerpt for demonstration only: {"data":[{"id":"demo-comment","kind":"comment","subreddit":"MachineLearning","text":"Illustrative comment."}],"pagination":{"page":1,"limit":3,"total":1,"relation":"eq"},"credits":{"cost":1,"balance":99}}. No real request produced it; record, identifier and balance are fictional. The example illustrates one flat record, not an observed community inventory, a required field list or a ready-labelled training item. A real response can contain fewer records, missing fields or no matches.

Conceptual illustration, not a screenshot or measured result.

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

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.

UseResponse
Available historical recordsSupported read-only routes
Live feed and new activityNot provided
Publishing, editing and votingNot provided
Complete conversation treesNot provided; optional local grouping

Request costs you can account for

$5

Eligible new accounts, once across the network

$1

Per 1,000 successful requests, including empty results

$50

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.

Conceptual illustration, not a screenshot or measured result.

About the service and its limits

Reddit Datasets 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.

Continue with the reference and implementation guide

Questions before your first request

What is Reddit Datasets?

Reddit Datasets 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 Datasets 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 my annotation rule decide?

For this pilot, ask annotators to distinguish a methodological question, a claim and a comment that cannot be judged without context. Write definitions and an exclusion rule before collecting more text. The point is to discover whether a comment is a useful annotation unit. This exercise uses an independent historical archive; it does not certify source authenticity, model suitability or representativeness of MachineLearning.

What should the final handover explain?

Deliver the retained records, decision ledger, rubric version, exclusions and split rule together. State what was observed and what remains unknown, including absent context and retrieval boundaries. A saved response lets colleagues repeat local processing even if a later remote query differs. Consult documentation for filters and pricing for request accounting: annotation rejection does not refund a successful retrieval, and successful retries are charged again. Decide whether the pilot supports the task before increasing its size.

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 Datasets 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/comments, q=dataset, subreddit=LocalLLaMA, 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.

Which request starts this worked example?

Start with https://api.redditdatasets.com/v1/comments?subreddit=MachineLearning&limit=3, the homepage example. Use X-API-Key: <key> or Authorization: Bearer <key> on the server. The comments route restricts results to comments, subreddit chooses the community and limit asks for at most three records. The Get API key page explains registration before payment and saving the once-shown key outside public annotation files.

How can I test the rubric before labeling real records?

These invented examples illustrate your rubric, not actual API results: “Which validation split tests transfer between domains?” is a methodological question; “Our baseline improved” is a claim that still needs a clearly defined label. “Same here” lacks enough information for either decision. A question mark alone is not a reliable annotation rule, and a confident assertion is not evidence of correctness.

How should I change a query without losing the comparison?

Content routes accept q, subreddit, author, kind, from, to, min_score, limit and page. kind uses post or comment; specialized routes retain their type restriction. Dates use YYYY-MM-DD UTC on created_utc and fully include the final to day. min_score filters a numeric threshold without sorting, verifying expertise or removing spam. These filters perform retrieval, not random sampling or automatic balancing of your dataset.

How do annotators resolve disagreements before dataset splits?

Have two annotators compare the saved pilot using the same instruction version. Log their initial decisions and the reason for any revision. If they interpret “methodological” differently, revise the definition and revisit affected rows before expanding collection. For training/evaluation splits, inspect repeated identifiers and known local relationships first. Keeping recognized related records together can address a specific overlap risk, but does not prove that all duplicates or prior training exposure have been found.

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.

Keep, reject or ask for context

03 / 05

In your local queue, give each received record a place for the source reference, proposed label and decision reason. A question about an evaluation method may be usable on its own; “that worked for me” may depend entirely on a missing parent. Treat the latter as context missing instead of guessing its subject. These are curator decisions, not labels returned by the API. Keep the original text beside the decision so a second annotator can challenge it.

Describe the shelf you actually inspected

04 / 05

The shelf is bounded: at most 100 records per request and 100 pages per query. Archive document order, _doc, is not ranking by score, time or relevance. More pages do not turn the result into a random or complete sample. Record the filters, retrieval time and actual response files. Available parent_id or link_id values can help you group records locally, but they cannot supply missing replies or establish a complete conversation.

Budget the pilot before enlarging it

05 / 05

Every successful retrieval costs one credit, including empty results and successful repeats: $1 per 1000 requests. Invalid requests do not debit; upstream failures refund reservations. A client timeout can conceal a charged success and another successful attempt costs another credit. Local rejection during annotation does not reverse the retrieval charge. Minimum paid top-up is $50 for 50000 credits; paid credits do not expire and there are no subscriptions.

Use the guide to test the annotation rule on the saved page. Open documentation when changing filters and pricing when expanding collection. The API key page prepares access; it does not certify that the pilot is ready to become training data.