API · Reddit
GET /reddit/posts/{id}/thread
A post's full comment tree with collapsed replies read in.
| |
|---|
| Request | GET /v1/reddit/posts/{id}/thread |
| Operation id | reddit.post.thread |
| Cost | 5 credits, refunded if the call fails |
| Auth | API key: Authorization: Bearer <key> or x-api-key. |
A post's full comment tree with collapsed replies read in.
| Name | Type | Required | Description |
|---|
id | string | yes | A post id (1y1u285), fullname (t3_1y1u285) or post URL. Example: 1y1u285. |
| Name | Type | Required | Description |
|---|
sort | "confidence" | "top" | "new" | "controversial" | "old" | "qa" | no | Comment order. Default confidence. One of confidence, top, new, controversial, old, qa. |
limit | integer | no | Comments on the first read, 1 to 500. Default 100. |
max_expansions | integer | no | Expansion reads, 1 to 9. Default 9. |
| Status | Meaning | Schema |
|---|
200 | The post and its expanded comment tree. | ExpandedThread |
400 | Invalid input. Nothing was charged. | Error |
401 | Missing or invalid API key. | Error |
402 | Not enough credits, a spend cap was reached, or payment is required. | Error |
403 | The target is private, or the account is suspended. | Error |
404 | The subreddit, post or user does not exist. | Error |
429 | Too many requests. Wait for Retry-After seconds. | Error |
503 | Reddit is temporarily unavailable. Retryable; nothing was charged. | Error |
| Field | Type | Description |
|---|
post | Link | |
comments | CommentTree | |
expansion | object | |
Errors use one shape everywhere; see Errors for every code and what to do.