Reddit comment with context

GET https://api.api.sh/reddit/v1/comment
1 credit / call social try it in the playground →

One comment (its permalink view): the comment, the post it is on, up to context parent comments above it (top first, each with its parent id) and the replies under it in thread order (up to limit). Give the comment link as url, or post_id plus comment_id. Each item has author, text, HTML, date, permalink, links and images. Every response includes credits_used: the credits this call cost.

Part of the Reddit API: 30 endpoints with prices, use cases and example responses.

Parameters

nametypedescription
url string Comment link: reddit.com/r/<sub>/comments/<post id>/comment/<comment id>/ or .../<post id>/<slug>/<comment id>/ (old. and new. links too). Example: https://www.reddit.com/r/Python/comments/1qpq3cc/comment/o2ay8su/
post_id string The post (id like 1qpq3cc, t3_1qpq3cc, or its link), with comment_id, when url is not given.
comment_id string Comment id (o2ay8su or t1_o2ay8su), with post_id.
context integer Parent comments to include above the comment, 0 to 8 (default 3). Default: 3
limit integer Most items to read (post, parents, comment and replies), 1 to 100 (default 50). Default: 50

Every endpoint also takes fresh, raw, fields (see lean responses and caching).

Example

curl "https://api.api.sh/reddit/v1/comment?url=https%3A%2F%2Fsiteproxy.ruqli.workers.dev%3A443%2Fhttps%2Fwww.reddit.com%2Fr%2FPython%2Fcomments%2F1qpq3cc%2Fcomment%2Fo2ay8su%2F" \
  -H "x-api-key: $APISH_KEY"

Response

A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).

Example response (real call, trimmed: lists cut to 2 items, long text shortened, raw left out)

{"subreddit": "Python","post_id": "t3_1qpq3cc","comment_id": "t1_o2ay8su","context": 3,"url": "https://www.reddit.com/r/Python/comments/1qpq3cc/comment/o2ay8su/","post": {"id": "t3_1qpq3cc","author": "Fragrant_Ad3054","subreddit": "Python","title": "(Rant) AI is killing programming and the Python community","text": "I'm sorry but it has to come out.\n We are experiencing an endless sleep paralysis and it is getting worse and worse.\n Before, when we wanted…","created_at": "2026-01-28T22:24:43+00:00","updated_at": "2026-01-28T22:24:43+00:00","url": "https://www.reddit.com/r/Python/comments/1qpq3cc/rant_ai_is_killing_programming_and_the_python/","author_url": "https://www.reddit.com/user/Fragrant_Ad3054","category_label": "r/Python","thumbnail": null,"external_url": null,"images": [],"videos": [],"links": [],"permalink": "/r/Python/comments/1qpq3cc/rant_ai_is_killing_programming_and_the_python/","content_html": "<!-- SC_OFF --><div class=\"md\"><p>I'm sorry but it has to come out.</p> <p>We are experiencing an endless sleep paralysis and it is getting …"},"parents_count": 0,"parents": [],"comment": {"id": "t1_o2ay8su","author": "metadatame","subreddit": "Python","title": "/u/metadatame on (Rant) AI is killing programming and the Python community","text": "It'll keep us all in job - someone has to fix what people are messing up","created_at": "2026-01-28T22:33:15+00:00","updated_at": "2026-01-28T22:33:15+00:00","url": "https://www.reddit.com/r/Python/comments/1qpq3cc/rant_ai_is_killing_programming_and_the_python/o2ay8su/","author_url": "https://www.reddit.com/user/metadatame","category_label": "r/Python","thumbnail": null,"external_url": null,"images": [],"videos": [],"links": [],"permalink": "/r/Python/comments/1qpq3cc/rant_ai_is_killing_programming_and_the_python/o2ay8su/","content_html": "<!-- SC_OFF --><div class=\"md\"><p>It'll keep us all in job - someone has to fix what people are messing up</p> </div><!-- SC_ON -->","parent_id": "t3_1qpq3cc"},"replies_count": 46,"note": "replies are in thread order (each reply follows the comment it answers); their nesting is not part of this source","replies": [{"id": "t1_o2azt7s","author": "Slimmanoman","subreddit": "Python","title": "/u/Slimmanoman on (Rant) AI is killing programming and the Python community","text": "Man I don't look forward to digging through thousands of chatgpt-coded lines with a hallucinating documentation. Human code can be bad but a…","created_at": "2026-01-28T22:40:47+00:00","updated_at": "2026-01-28T22:40:47+00:00","url": "https://www.reddit.com/r/Python/comments/1qpq3cc/rant_ai_is_killing_programming_and_the_python/o2azt7s/","author_url": "https://www.reddit.com/user/Slimmanoman","category_label": "r/Python","thumbnail": null,"external_url": null,"images": [],"videos": [],"links": [],"permalink": "/r/Python/comments/1qpq3cc/rant_ai_is_killing_programming_and_the_python/o2azt7s/","content_html": "<!-- SC_OFF --><div class=\"md\"><p>Man I don't look forward to digging through thousands of chatgpt-coded lines with a hallucinating document…"},{"id": "t1_o2b1ow3","author": "james_pic","subreddit": "Python","title": "/u/james_pic on (Rant) AI is killing programming and the Python community","text": "As dumb as LLMs can be, they can't match the dumbest human programmers. They simply don't have the imagination to find such creative ways to…","created_at": "2026-01-28T22:49:54+00:00","updated_at": "2026-01-28T22:49:54+00:00","url": "https://www.reddit.com/r/Python/comments/1qpq3cc/rant_ai_is_killing_programming_and_the_python/o2b1ow3/","author_url": "https://www.reddit.com/user/james_pic","category_label": "r/Python","thumbnail": null,"external_url": null,"images": [],"videos": [],"links": [],"permalink": "/r/Python/comments/1qpq3cc/rant_ai_is_killing_programming_and_the_python/o2b1ow3/","content_html": "<!-- SC_OFF --><div class=\"md\"><p>As dumb as LLMs can be, they can't match the dumbest human programmers. They simply don't have the imagina…"},"… 44 more"],"cached": false,"credits_used": 1}
The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.