Post
getPost(url, options?): PostResponse
Returns a post with up to max_comments comments, nested as on Reddit, and a digest: the original poster's replies in the thread, the most upvoted comments, and the ones Reddit marks as controversial. The digest only sorts what Reddit reports; nothing is scored or summarized. Reddit hides long threads behind "load more comments"; threadapi follows those links until it has the comments you asked for.
Costs 1 credit for up to 500 comments and 1 more for each further 100 returned.
Security
API Key
All requests require a valid API key from the developer dashboard.
Headers: Authorization: Bearer YOUR_API_KEYorX-API-Key: YOUR_API_KEY
See Authentication for headers and rate limits.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
urlquery | string | Yes | The post: a reddit.com URL on any subdomain ( |
commentquery | string | No | A comment ID to focus on. The response holds that comment, |
contextquery | integer | No | Parent levels to include above the focused comment, 0 to 8. Default |
max_commentsquery | integer | No | Most comments to return, 0 to 2,000. Default |
formatquery | string | No |
|
Response
Headers on every success: X-Credits-Used, X-Comments-Returned, X-Has-More (true when a larger max_comments would return more), and X-Cache-Tier (MISS and PARTIAL mean some of it was fetched from Reddit just now).
format=json
{
"post": {
"id": "1x144ok",
"subreddit": "programming",
"title": "How big is a Git commit?",
"author": "fagnerbrack",
"score": 88,
"upvote_ratio": 0.82,
"num_comments": 29, // Reddit's count, deleted comments included
"permalink": "/r/programming/comments/1x144ok/how_big_is_a_git_commit/",
"url": "https://ratfactor.com/cards/git-commit-size",
"selftext": "",
"created_at": "2026-10-08T22:00:15Z",
"over_18": false,
"media": [], // images, galleries and videos, as URLs
"comments": [
{
"id": "o2f8m1c",
"parent_id": "t3_1x144ok", // t1_<id> for a reply
"author": "Bpofficial",
"score": 157,
"body": "At least 3",
"created_at": "2026-10-08T22:14:02Z",
"depth": 0,
"is_submitter": false, // true for the original poster
"replies": [ /* comments */ ]
}
]
},
"discussion_graph": {
"author_followups": [ /* the original poster's comments */ ],
"most_upvoted": [ /* highest score, the original poster, AutoModerator and deleted comments left out */ ],
"controversial": [ /* Reddit's controversial flag, or a negative score */ ],
"total_analyzed": 29
},
"meta": {
"comments_returned": 29,
"comments_total": 29,
"has_more": false,
"max_comments": 200,
"credits_used": 1,
"cache": "MISS",
"limited_by_balance": false // true when the balance covered fewer comments than asked for
}
}format=md returns text/markdown: a header line, the post's text, a short digest and the comments as a nested list. Each comment appears once, in full.
# How big is a Git commit?
r/programming, u/fagnerbrack, 88 points (82% upvoted), 29 comments, posted 2026-10-08 22:00 UTC
https://www.reddit.com/r/programming/comments/1x144ok/how_big_is_a_git_commit/
## Digest
Most upvoted:
- u/Bpofficial (+157): At least 3
## Comments (29 of 29)
- u/Bpofficial (+157): At least 3
- u/shiny0metal0ass (+13): A commit of three gits.