Reddit comments API
Search Reddit comments by keyword or author, read a whole thread with its nested replies, and pull a user's comment history. Every comment comes back as JSON with its score, author, time and link.
The job
A common question is how to get comments from a Reddit post with the API: pass the post id or link to the thread call and read the reply tree. Comments are where people say what they actually think about a product, a competitor or a problem. A post title tells you the topic; the replies tell you the objections, the alternatives people name and the words they use.
This API reads comments three ways: search across Reddit by keyword, load one thread with its reply tree, or list everything a user has written. It is read-only. It does not post, edit or remove comments.
How it works
Search comments
Call
reddit.search_commentswith a keyword and, if you want, an author or a time window.Read one thread
Call
reddit.threadwith a post id or link to get the post and its nested replies.Pull a user's comments
Call
reddit.user_commentswith a username to page through what they have written.
Endpoints that do it
| Endpoint | What it's for | Credits |
|---|---|---|
| Search commentsGET /v1/reddit/comments/search | Comments across Reddit by keyword or author. | 2 credits |
| Get a thread with commentsGET /v1/reddit/threads/{id} | One post with its nested comments. | 3 credits |
| List user commentsGET /v1/reddit/users/{name}/comments | A user's comment history. | 2 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.
Searching comments
Search for a phrase and read the scores and authors of the matching comments.
curl "https://api.chatterapi.com/v1/reddit/comments/search?q=gummysearch+alternative" \
-H "Authorization: Bearer $CHATTERAPI_KEY"{
"data": [
{
"id": "j01f68f",
"fullname": "t1_j01f68f",
"parentId": null,
"postId": "zk2soo",
"postTitle": "I think quite a lot of people in this subreddit ARE entrepreneurs",
"author": "esoemah",
"body": "I know the guy already answered your question, but I’d like to offer an alternative that you could consider as well: social listening. Basically, you’d monitor social media for any mentions of keywords relevant to your b…",
"bodyTruncated": false,
"score": 2,
"subreddit": "Entrepreneur",
"permalink": "/r/Entrepreneur/comments/zk2soo/i_think_quite_a_lot_of_people_in_this_subreddit/j01f68f/",
"url": "https://www.reddit.com/r/Entrepreneur/comments/zk2soo/i_think_quite_a_lot_of_people_in_this_subreddit/j01f68f/",
"createdAt": "2022-12-13T11:30:40.000Z"
},
{
"id": "le642mq",
"fullname": "t1_le642mq",
"parentId": null,
"postId": "1e86dz5",
"postTitle": "[NBA] LeBron and Curry in the tunnel following the win: Lebron - \"To be honest I like those ones more than the blowouts...I like being tested baby.\" Curry - \"Put the closer on.\"",
"author": "EyePlay",
"body": "The sub is just bigger and Silver has turned the NBA into the social media consumed sport. Unless you want to talk hoops on twitter, reddit has become the main NBA hub over the last ten years. People who consume the NBA …",
"bodyTruncated": false,
"score": 6,
"subreddit": "nba",
"permalink": "/r/nba/comments/1e86dz5/nba_lebron_and_curry_in_the_tunnel_following_the/le642mq/",
"url": "https://www.reddit.com/r/nba/comments/1e86dz5/nba_lebron_and_curry_in_the_tunnel_following_the/le642mq/",
"createdAt": "2024-07-21T02:10:00.000Z"
}
],
"page": {
"nextCursor": "AUod…",
"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
- It is read-only. It cannot create, edit, vote on or delete comments.
- Comments removed by moderators or deleted by their authors are not returned.
- Reddit's content rules apply to what you do with the data.
Questions
How do I get comments from a Reddit post with the API?
reddit.thread with the post id or link. You get the post and its nested replies with score, author, time and link, and you can page the rest with the cursor.Can I get every reply in a thread?
Can I search comments by author?
Can I export comments to a spreadsheet?
Guides
More ways to use the API
- Access the Twitter API
- Claude Reddit bot
- Live Twitter monitor
- Reddit API application
- Reddit brand monitoring
- Reddit data export
- Reddit post API
- Reddit scraper API
- Social listening API
- Post with the Twitter API
- Twitter API statuses
- Twitter exporter
- Twitter scraper API
- Twitter webhook
- Reddit user API
- Subreddit API
- Twitter followers API
- Twitter user API
- Twitter search API
- Social media scraping API
- Reddit listening tool
- Twitter feed API
- Twitter hashtag API
- Social media analytics API
- Twitter image API