Reddit Subreddit
Parse a subreddit listing page into structured JSON with the ranked posts, each post title, author, score, comment count, timestamp, permalink, link domain, flair, and pagination.
API usage
Add &scraper=reddit-subreddit to a Crawling API request. URL-encode the target URL in the url parameter.
curl 'https://api.crawlbase.com/?token=YOUR_TOKEN' \
--data-urlencode 'url=https://www.reddit.com/r/programming/' \
--data-urlencode 'scraper=reddit-subreddit' -Gfrom crawlbase import CrawlingAPI
api = CrawlingAPI({'token': 'YOUR_TOKEN'})
res = api.get(
'https://www.reddit.com/r/programming/',
{'scraper': 'reddit-subreddit'}
)
import json
data = json.loads(res['body'])const { CrawlingAPI } = require('crawlbase');
const api = new CrawlingAPI({ token: 'YOUR_TOKEN' });
const res = await api.get(
'https://www.reddit.com/r/programming/',
{ scraper: 'reddit-subreddit' }
);
const data = JSON.parse(res.body);require 'crawlbase'
api = Crawlbase::API.new(token: 'YOUR_TOKEN')
res = api.get('https://www.reddit.com/r/programming/', scraper: 'reddit-subreddit')
data = JSON.parse(res.body)Example input URL
The URL passed in the url parameter (URL-decoded for readability):
https://www.reddit.com/r/programming/Response shape
JSON response body. Field types may be null when the source page omits the value.
Subreddit name (without the
r/ prefix).Canonical subreddit URL.
Sort order of the listing (for example
hot, new, top).Number of posts returned in
posts.Pagination cursor for the next and previous pages.
URL for the next page of posts, or null on the last page.
URL for the previous page of posts, or null on the first page.
True when a next page is available.
Posts on the listing, in display order.
Position of the post in the returned list (1-based).
Reddit fullname of the post (for example
t3_...).Rank of the post on the subreddit listing.
Post title.
Username of the post author.
Post score (upvotes minus downvotes).
Number of comments on the post.
Post creation time (ISO 8601).
Permalink to the post on Reddit.
Outbound link the post points to (null for text posts).
Domain of the outbound link.
Post flair text, when set.
True when the post is marked NSFW.
True when the post is pinned to the top of the subreddit.
Thumbnail image URL, when present.
Sample response
{
"subreddit": "programming",
"url": "https://old.reddit.com/r/programming/",
"sort": "hot",
"postCount": 3,
"pagination": {
"next_page_url": "https://old.reddit.com/r/programming/?count=25&after=t3_1c8x9aa",
"previous_page_url": null,
"has_next": true
},
"posts": [
{
"position": 1,
"id": "t3_1c8a1bb",
"rank": 1,
"title": "The hidden cost of deep dependency trees",
"author": "buildmaster",
"score": 2417,
"commentsCount": 312,
"createdAt": "2026-07-14T09:12:44+00:00",
"permalink": "https://old.reddit.com/r/programming/comments/1c8a1bb/the_hidden_cost_of_deep_dependency_trees/",
"url": "https://example.com/blog/dependency-trees",
"domain": "example.com",
"flair": null,
"isNsfw": false,
"isStickied": false,
"thumbnail": "https://b.thumbs.redditmedia.com/abc.jpg"
}
]
}