Skip to content

Reddit API for data science

Reddit gives data scientists text that communities have already labelled, along with scores and timestamps. The endpoints return flat JSON that loads straight into pandas, so your time goes to features and models instead of collection.

Preview the data shape freeRun a search, then script the same call.
Reddit api for data science: a cartographer at a big table laying small coloured tiles into a grid map, a magnifying glass over one cluster, warm light.

The job

Typical projects include sentiment analysis, topic modelling, trend detection, and building a training or evaluation set from a community. Each one needs a reliable collector first.

Responses are plain JSON with consistent field names, which means a notebook can turn a call into a DataFrame in a few lines. The sentiment analysis in Python guide walks through one full pipeline.

How it works

  1. Collect

    Call reddit.search or reddit.subreddit_posts and page with the cursor.

  2. Flatten into a DataFrame

    Use pandas.json_normalize on the data array. Fields like score, numComments and createdAt become columns.

  3. Hold out a date range

    Split train and test by time, not at random, so your evaluation reflects new posts.

Endpoints that do it

EndpointWhat it's forCredits
Search postsGET /v1/reddit/searchPosts by keyword.2 credits
List subreddit postsGET /v1/reddit/subreddits/{name}/postsA subreddit's posts for a corpus.2 credits
Get a thread with commentsGET /v1/reddit/threads/{id}Comments for a post.3 credits

Free tools for the same job

Try the job in a browser first. These tools call the same endpoints, and you don't need a key or any code.

Posts for a corpus

A search call. These rows load directly into a DataFrame.

curl "https://api.chatterapi.com/v1/reddit/search?q=best+crm+for+small+business&time=year" \
  -H "Authorization: Bearer $CHATTERAPI_KEY"
response, first 2 rows
{
  "data": [
    {
      "id": "1wdihhj",
      "fullname": "t3_1wdihhj",
      "title": "What CRM should a small business use?",
      "body": "We’re a small B2B business with 6 people and sales is still pretty founder led, but revenue has grown enough that keeping leads, follow ups and customer conversations spread across spreadsheets and inboxes is starting to…",
      "author": "NotedWhisky",
      "subreddit": "CRM",
      "permalink": "/r/CRM/comments/1wdihhj/what_crm_should_a_small_business_use/",
      "url": "https://www.reddit.com/r/CRM/comments/1wdihhj/what_crm_should_a_small_business_use/",
      "externalUrl": null,
      "score": 51,
      "numComments": 186,
      "upvoteRatio": null,
      "createdAt": "2026-09-11T14:52:16.000Z",
      "nsfw": false,
      "locked": null,
      "media": null
    },
    {
      "id": "1vmy4xb",
      "fullname": "t3_1vmy4xb",
      "title": "If You Had to Pick the Best CRM for Small Business Today, What Would It Be?",
      "body": "I've spent the last few days reading reviews and watching videos, and somehow I'm even more undecided than when I started.\n\nEvery CRM looks amazing on its website, but that doesn't tell you what it's like after you've be…",
      "author": "Living_Dependent242",
      "subreddit": "CRMSoftware",
      "permalink": "/r/CRMSoftware/comments/1vmy4xb/if_you_had_to_pick_the_best_crm_for_small/",
      "url": "https://www.reddit.com/r/CRMSoftware/comments/1vmy4xb/if_you_had_to_pick_the_best_crm_for_small/",
      "externalUrl": null,
      "score": 10,
      "numComments": 56,
      "upvoteRatio": null,
      "createdAt": "2026-08-13T02:25:31.000Z",
      "nsfw": false,
      "locked": null,
      "media": null
    }
  ],
  "page": {
    "nextCursor": "AX-v…",
    "hasMore": true
  }
}

Recorded from a live call on . Long text is shortened and the cursor is cut. A live key is charged 2 credits for this call. A test key returns this same sample for 0 credits.

What it won't do

  • Removed and deleted content is missing, and that can bias a sample.
  • Scores change over time. Store the collection date with each row.
  • Check Reddit's content rules and your own data policy before you train a model on it.

Questions

Does it work with pandas?
Yes. The data array is a list of flat objects, so pandas.json_normalize works directly.
Can I use it for model training?
Check the terms that apply to the content and to your use before you do. This is not legal advice.
How many rows can I pull?
As many as your credits cover. Each page returns up to a fixed number of rows, and the endpoint docs list the limits.

Other solutions

Build it with one API key

Try it free for 7 days with 1,000 credits.