# Reddit Posts & Comments Scraper

> Reddit Posts & Comments Scraper is a paid API for AI agents from api.scrapeforagents.tech, paid per call via x402, $0.025/call, status unknown (last checked 2026-10-02).

Fetches structured Reddit post and comment data by URL, post ID, or keyword search query

## Facts

- Endpoint: POST https://api.scrapeforagents.tech/v1/reddit-posts?utm_source=zero.xyz
- Price: $0.025/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/reddit-posts-comments-scraper-908f23c4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xb6e9dMRS586gipELhUFL

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability reddit-posts-comments-scraper-908f23c4 -d '<json body>'
```

Example prompt: Search Reddit for posts about 'mechanical keyboards' sorted by top, collect up to 25 posts per query and return up to 200 comments per post — only threads answered by the original poster.

## When to prefer this

Choose this endpoint when you need structured, pay-per-result Reddit data without paying for failed runs. It is well-suited for bulk collection across multiple post URLs or keyword searches in a single call, and supports sorting and filtering comments (e.g. only OP-answered threads). Prefer this over general web scrapers when you specifically need Reddit post and comment structure with minimal setup.

## Known failure modes

- Private or deleted Reddit posts return empty results and are not charged
- Invalid or malformed post URLs result in an error or empty item list
- Keyword queries with no matching archived posts return zero items
- Posts with very few archived comments may return less than the requested maxCommentsPerPost
- Rate limits or scraping restrictions on Reddit archives may cause partial results
- TXT/CSV file URL over 5 MB is rejected
- maxScanPerPost below 100 is rejected due to schema minimum constraint

## How this service works

Pay-per-call structured web data. Failed or empty runs are not charged.

## Output

A JSON object containing a count of items and an array of post and comment rows, each with fields including post ID, type, title, author, status, post URL, internal post ID, and subreddit name.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "sort": {
   "enum": [
    "best",
    "top",
    "new",
    "old",
    "controversial",
    "qa"
   ],
   "type": "string",
   "default": "best",
   "description": "Order comments from the scanned archive records. Best uses score as an approximation; Q&A puts original-poster comments first."
  },
  "filter": {
   "enum": [
    "",
    "answered",
    "unanswered"
   ],
   "type": "string",
   "default": "",
   "description": "Keep only threads answered by the original poster or only unanswered threads. Applies to scanned comments."
  },
  "postUrl": {
   "type": "string",
   "description": "One public Reddit post URL, redd.it link, or post ID."
  },
  "queries": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "default": [],
   "description": "Find archived public posts by keyword when no URLs are supplied."
  },
  "maxItems": {
   "type": "integer",
   "default": 0,
   "minimum": 0,
   "description": "Maximum combined post and comment rows. Set 0 for no output cap."
  },
  "postUrls": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "default": [],
   "description": "Multiple public post URLs or IDs to collect in one run."
  },
  "postUrlsFile": {
   "type": "string",
   "description": "HTTPS URL of a TXT file with one post per line or CSV with a url or permalink column, up to 5 MB."
  },
  "maxScanPerPost": {
   "type": "integer",
   "default": 1000,
   "maximum": 10000,
   "minimum": 100,
   "description": "Maximum comments to scan per post before sorting; extended scan raises this to at least 10,000."
  },
  "maxPostsPerQuery": {
   "type": "integer",
   "default": 25,
   "maximum": 1000,
   "minimum": 1,
   "description": "Maximum matching posts to collect for each search keyword."
  },
  "expandAllComments": {
   "type": "boolean",
   "default": false,
   "description": "Scan up to 10,000 archived comments per post before sorting and filtering. This cannot recover comments absent from the archive."
  },
  "maxCommentsPerPost": {
   "type": "integer",
   "default": 200,
   "minimum": 0,
   "description": "Maximum comment rows per post. Set 0 to keep all scanned comments."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 1,
  "items": [
   {
    "id": null,
    "_type": null,
    "title": null,
    "author": null,
    "_status": null,
    "postUrl": null,
    "_post_id": null,
    "subreddit": null
   }
  ],
  "product": "reddit-posts"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/reddit-posts-comments-scraper-908f23c4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.scrapeforagents.tech](https://www.zero.xyz/host/api.scrapeforagents.tech/llms.txt)
