crawlbaseDocs
Log in

API usage

Add &scraper=reddit-post 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/comments/1c8a1bb/' \
  --data-urlencode 'scraper=reddit-post' -G
from crawlbase import CrawlingAPI

api = CrawlingAPI({'token': 'YOUR_TOKEN'})
res = api.get(
    'https://www.reddit.com/r/programming/comments/1c8a1bb/',
    {'scraper': 'reddit-post'}
)

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/comments/1c8a1bb/',
  { scraper: 'reddit-post' }
);
const data = JSON.parse(res.body);
require 'crawlbase'
api = Crawlbase::API.new(token: 'YOUR_TOKEN')

res = api.get('https://www.reddit.com/r/programming/comments/1c8a1bb/', scraper: 'reddit-post')
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/comments/1c8a1bb/

Response shape

JSON response body. Field types may be null when the source page omits the value.

post
object
The post itself.
post.id
string
Reddit fullname of the post (for example t3_...).
post.title
string
Post title.
post.author
string
Username of the post author.
post.subreddit
string
Subreddit the post belongs to (without the r/ prefix).
post.score
integer
Post score (upvotes minus downvotes).
post.upvoteRatio
number | null
Fraction of votes that are upvotes (0 to 1).
post.commentsCount
integer
Total number of comments on the post.
post.createdAt
string
Post creation time (ISO 8601).
post.url
string | null
Outbound link the post points to (null for text posts).
post.domain
string | null
Domain of the outbound link.
post.permalink
string
Permalink to the post on Reddit.
post.flair
string | null
Post flair text, when set.
post.isNsfw
boolean
True when the post is marked NSFW.
post.selfText
string
Body text of a self (text) post; empty for link posts.
commentCount
integer
Number of top-level comments returned in comments.
comments
array
Top-level comments, each with a nested replies tree.
comments[].id
string
Reddit fullname of the comment (for example t1_...).
comments[].author
string
Username of the comment author.
comments[].score
integer
Comment score (upvotes minus downvotes).
comments[].createdAt
string
Comment creation time (ISO 8601).
comments[].body
string
Comment text.
comments[].permalink
string
Permalink to the comment on Reddit.
comments[].isSubmitter
boolean
True when the comment author is the post author (OP).
comments[].replies
array
Nested replies, each the same shape as a comment.

Sample response

{
  "post": {
    "id": "t3_1c8a1bb",
    "title": "The hidden cost of deep dependency trees",
    "author": "buildmaster",
    "subreddit": "programming",
    "score": 2417,
    "upvoteRatio": 0.96,
    "commentsCount": 312,
    "createdAt": "2026-07-14T09:12:44+00:00",
    "url": "https://example.com/blog/dependency-trees",
    "domain": "example.com",
    "permalink": "https://old.reddit.com/r/programming/comments/1c8a1bb/the_hidden_cost_of_deep_dependency_trees/",
    "flair": null,
    "isNsfw": false,
    "selfText": ""
  },
  "commentCount": 3,
  "comments": [
    {
      "id": "t1_l0aa111",
      "author": "perftuner",
      "score": 184,
      "createdAt": "2026-07-14T09:31:07+00:00",
      "body": "This matches what we saw. Flattening the tree cut our cold install time in half.",
      "permalink": "https://old.reddit.com/r/programming/comments/1c8a1bb/the_hidden_cost_of_deep_dependency_trees/l0aa111/",
      "isSubmitter": false,
      "replies": [
        {
          "id": "t1_l0aa222",
          "author": "buildmaster",
          "score": 71,
          "createdAt": "2026-07-14T09:44:52+00:00",
          "body": "Yep. The transitive fan-out is where most of the time goes.",
          "permalink": "https://old.reddit.com/r/programming/comments/1c8a1bb/the_hidden_cost_of_deep_dependency_trees/l0aa222/",
          "isSubmitter": true,
          "replies": []
        }
      ]
    }
  ]
}