Platform APIs
Reddit API
Subreddit feeds, nested comment trees and post detail without a Reddit OAuth app or API review.
GET /reddit/thread?url=...1 credit per threadauth: x-api-keycontent-type: application/jsonenvelope: data + meta
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| url | string | yes | Public Reddit thread URL. |
| depth | number | no | Comment tree depth, 1 to 8. Defaults to 4. |
| sort | string | no | best, top, new or controversial. Defaults to best. |
request.sh
curl -s "https://api.cleanfetch.dev/v1/reddit/thread?url=https://www.reddit.com/r/SaaS/comments/1abcxyz/example_thread/" \ -H "x-api-key: cf_live_your_key_here"
response.json
200 OK / application/json
{
"data": {
"platform": "reddit",
"thread": {
"title": "How we cut scraping infra cost by 60%",
"subreddit": "SaaS",
"author": "example_user",
"score": 842,
"commentCount": 126,
"comments": [
{
"author": "reply_user",
"body": "What did you move to?",
"score": 41,
"replies": []
}
]
}
},
"meta": {
"requestId": "req_cf_01j9k988c8d",
"lookupStatus": "found",
"creditsCharged": 1,
"latencyMs": 710,
"cached": true
}
}Endpoints
Use /v1/reddit/thread for a post and its comments, /v1/reddit/subreddit for a community snapshot and /v1/reddit/search for public posts. The directory lists 11 Reddit endpoints.
Credits
A thread costs 1 credit at the default depth. Very deep trees can cost 2 credits. A removed thread returns not_found and costs 1 credit.
Comment shape
Comments are nested under replies. Each comment carries author, body, score, createdAt and an optional removed flag. HTML is converted to plain text and the original markdown body is kept when available.