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.

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
Collect
Call
reddit.searchorreddit.subreddit_postsand page with the cursor.Flatten into a DataFrame
Use
pandas.json_normalizeon thedataarray. Fields likescore,numCommentsandcreatedAtbecome columns.Hold out a date range
Split train and test by time, not at random, so your evaluation reflects new posts.
Endpoints that do it
| Endpoint | What it's for | Credits |
|---|---|---|
| Search postsGET /v1/reddit/search | Posts by keyword. | 2 credits |
| List subreddit postsGET /v1/reddit/subreddits/{name}/posts | A 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"{
"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?
data array is a list of flat objects, so pandas.json_normalize works directly.