Skip to content
SpideyData
Guides

How to Get Reddit Comments with an API

Developer guide: fetch public Reddit comment trees with sync GETs, then use async comment jobs when you need deeper collection.

SFSpideyData team
8 min read

Introduction

From post id or permalink to JSON comments—sync reads and async jobs explained. Everything here reads public comments with a SpideyData Bearer key. It does not recover deleted comments or read private communities.

Sync GET paths

For a quick live tree, call:

bash
# Illustrative shape — confirm params in the live docs
curl -sS -H "Authorization: Bearer $SPIDER_API_KEY" \
  "$SPIDER_BASE_URL/v1/reddit/posts/<post_id>/comments"

The post id is the base-36 id in a Reddit permalink (/comments/<post_id>/...). Compatible aliases exist, such as GET /v1/reddit/comments/{post_id} and GET /v1/reddit/post/comments?id=..., which accepts limit, depth, and sort. A single comment is available at GET /v1/reddit/comment/{comment_id}. Responses come back in a JSON envelope.

Async comment job flow

Large threads hide replies behind “more comments” stubs. For deeper collection:

  1. POST /v1/reddit/posts/{post_id}/comments with options such as post_url, sort, max_comments, max_depth, and expand_more. Send an Idempotency-Key header. The response is 202 with a job id.
  2. Poll GET /v1/reddit/comment-jobs/{job_id} until the job finishes.
  3. Page through stored comments with GET /v1/reddit/posts/{post_id}/comments using the job’s cursor / job_id parameters.

Polling and stored pages are free; jobs are billed with a base charge plus a charge per delivered comment, and terminal failures are released.

When the free tool is enough

If you only need up to 100 comments from one thread as CSV, the free comment exporter is faster—no key, 10 requests per IP per 24 hours, NSFW excluded. Walkthrough: How to export Reddit comments to CSV.

Expanded trees and deep search meters

  • GET /v1/reddit/post/{post_id}/comments/expanded expands more-stubs in one call and uses a higher per-call meter than a standard read.
  • Searching comment text across Reddit is a separate job: see the Reddit Comment Search API.

Check Pricing for current meters rather than hard-coding numbers.

Boundaries

  • Public comments only; no private or quarantined communities.
  • No deleted-content recovery or full archive.
  • Read-only: no replying, voting, or moderation.
  • Not Reddit’s official API and not affiliated with Reddit.

Next step

Sources and further reading

Next step

Try the smallest path that fits your target

Start with the public Fetch guide, then add browser rendering, crawling, or extraction when the workflow needs it.