# List comments

List recent public comments from one or more subreddits, newest first, with cursor pagination. May take up to 60 seconds.

- Platform: [Reddit](https://docs.upscrape.com/docs/platforms/reddit)
- Capability ID: `reddit.comments.list`
- Cost: 1 credit per request
- Maximum runtime: 60 seconds
- Execute endpoint: `POST https://data.upscrape.com/execute`

## Request

Use the exact public capability ID in the shared execute envelope.

```bash
curl --request POST \
  --url https://data.upscrape.com/execute \
  --header "Authorization: Bearer $UPSCRAPE_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Prefer: wait=30" \
  --data '{
  "input": {
    "limit": 25,
    "subreddits": "SaaS"
  },
  "capability": "reddit.comments.list"
}'
```

## Input


| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `after` | `string` | No | Opaque cursor from a previous result's next field. |
| `limit` | `integer` | No | Page size (default 50). From 1 to 100. Default: `50`. |
| `subreddits` | `string` | Yes | One to 25 comma-separated subreddit names, optionally prefixed with r/, or the literal all. |

### Example input

```json
{
  "limit": 25,
  "subreddits": "SaaS"
}
```

## Response

Successful output is returned in `results[0].data`.

Raw platform output is intentionally open-ended and may evolve with the upstream source.

### Illustrative sample output

This example shows one response. Values and optional fields vary with the data available.

```json
{
  "items": [
    {
      "author": "AutoModerator",
      "body": "Low-Effort/AI content is auto-removed. I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.",
      "created_utc": 1787376875,
      "id": "t1_p563b8h",
      "nsfw": false,
      "parent_permalink": "https://www.reddit.com/r/SaaS/comments/1vux3n0/i_wanted_to_see_my_rentals_like_my_stock/",
      "parent_title": "I wanted to see my rentals like my stock portfolio, so we built it",
      "permalink": "https://www.reddit.com/r/SaaS/comments/1vux3n0/i_wanted_to_see_my_rentals_like_my_stock/p563b8h/",
      "score": 0,
      "score_available": false,
      "subreddit": "SaaS",
      "type": "comment"
    },
    {
      "author": "Prince-ow",
      "body": "actually i think asking right after a specific action is probably the sweet spot but a simple question tied to what they just did feels much less annoying than a generic survey, and the feedback is usually more useful because the experience is still fresh.",
      "created_utc": 1787376833,
      "id": "t1_p5637ys",
      "nsfw": false,
      "parent_permalink": "https://www.reddit.com/r/SaaS/comments/1vv0srd/how_often_do_you_actually_ask_customers_for/",
      "parent_title": "how often do you actually ask customers for feedback?",
      "permalink": "https://www.reddit.com/r/SaaS/comments/1vv0srd/how_often_do_you_actually_ask_customers_for/p5637ys/",
      "score": 0,
      "score_available": false,
      "subreddit": "SaaS",
      "type": "comment"
    },
    {
      "author": "Agitated_Offer_4343",
      "body": "the stronger question is what theyre typing into ChatGPT at 2am when the pain is so bad theyll pay to make it stop. not who they are, but the exact words they use when theyve already decided to fix it if your daily plan includes reading five real Reddit threads or support tickets where someone describes that exact moment youll learn more than any AI lesson. thats the pain intensity made concrete",
      "created_utc": 1787376720,
      "id": "t1_p562z84",
      "nsfw": false,
      "parent_permalink": "https://www.reddit.com/r/SaaS/comments/1vu2751/marketingdistributionpromotion_my_learning_plan/",
      "parent_title": "Marketing/Distribution/Promotion - My Learning Plan",
      "permalink": "https://www.reddit.com/r/SaaS/comments/1vu2751/marketingdistributionpromotion_my_learning_plan/p562z84/",
      "score": 0,
      "score_available": false,
      "subreddit": "SaaS",
      "type": "comment"
    }
  ],
  "next": "t1_p55yk3l"
}
```
### Illustrative output fields

Derived from the sample above for orientation only. These fields are not a fixed response schema.

| Path | Observed type | Example |
| --- | --- | --- |
| `items` | `array` | 3 items |
| `items` | `array` | 3 items |
| `next` | `string` | t1_p55yk3l |

## Execution behavior

A `200` response completed inline. A `202` response was queued; poll `GET /jobs/{id}` until the job reaches `completed` or `failed`. Use an `Idempotency-Key` when retrying must not create a duplicate logical job.

## Related documentation

- [Authentication](https://docs.upscrape.com/docs/api/authentication)
- [Jobs and results](https://docs.upscrape.com/docs/api/jobs)
- [Errors and retries](https://docs.upscrape.com/docs/api/errors)
- [Idempotency](https://docs.upscrape.com/docs/api/idempotency)
