> ## Documentation Index
> Fetch the complete documentation index at: https://mindcase.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Reddit Posts

> Extract Reddit posts and comments — by URL (subreddit / post / user) or search keyword

`$2.9 / 1k results`

Extract Reddit posts and comments — by URL (subreddit / post / user) or search keyword

## Endpoint

`POST /api/v1/agents/reddit/posts/run`

## Parameters

<ParamField body="inputs" type="array" required>
  **List** · One per line. You can input Reddit URLs (subreddits, posts, users) or search keywords (e.g. 'gpt5', 'r/wallstreetbets').
</ParamField>

<ParamField body="maxPosts" type="integer" default={50}>
  **Number** · Maximum posts per URL/search. Use 0 for all.
</ParamField>

<ParamField body="skipComments" type="boolean" default={false}>
  **Toggle** · Don't fetch any comments at all (post-only mode).
</ParamField>

<ParamField body="maxComments" type="integer" default={10}>
  **Number** · Comments per post. Use 0 for all, or toggle Skip Comments above for none.
</ParamField>

<ParamField body="sortBy" type="string" default="top">
  **Dropdown** · Sort order for posts.

  **Options:** `top`, `new`, `hot`

  *Legend: `top` = Top, `new` = Newest, `hot` = Hot*
</ParamField>

<ParamField body="timeRange" type="string" default="all">
  **Dropdown** · Reddit's search only supports preset time windows — pick one. (No custom date ranges.)

  **Options:** `all`, `year`, `month`, `week`, `day`, `hour`

  *Legend: `all` = All time, `year` = Past year, `month` = Past month, `week` = Past week, `day` = Past 24 hours, `hour` = Past hour*
</ParamField>

## Response columns

| Field          | Display name  | Type       |
| -------------- | ------------- | ---------- |
| `redditUrl`    | Reddit URL    | url        |
| `type`         | Type          | text       |
| `title`        | Title         | text       |
| `body`         | Body          | text       |
| `community`    | Community     | text       |
| `author`       | Author        | text       |
| `posted`       | Posted        | text       |
| `upVotes`      | Up Votes      | number     |
| `upVoteRatio`  | Up Vote Ratio | percentage |
| `comments`     | Comments      | number     |
| `replies`      | Replies       | number     |
| `isVideo`      | Is Video      | boolean    |
| `isAd`         | Is Ad         | boolean    |
| `nsfw`         | NSFW          | boolean    |
| `flair`        | Flair         | text       |
| `category`     | Category      | text       |
| `thumbnail`    | Thumbnail     | url        |
| `images`       | Images        | text       |
| `video`        | Video         | url        |
| `externalLink` | External Link | url        |

## Example

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST https://api.mindcase.co/api/v1/agents/reddit/posts/run \
    -H "Authorization: Bearer mk_live_abc123def456" \
    -H "Content-Type: application/json" \
    -d '{
    "params": {
      "urls": [
        {
          "url": "https://www.reddit.com/r/memes/comments/xfn9vg/rmemes_meme_quiz_2/"
        },
        {
          "url": "https://www.reddit.com/r/wallstreetbets/comments/l8rf4k/times_square_right_now/"
        }
      ],
      "sortBy": "top",
      "maxResults": 12,
      "maxPosts": 2,
      "maxComments": 4
    }
  }'
  ```

  ```python Python theme={null}
  import requests

  resp = requests.post(
      "https://api.mindcase.co/api/v1/agents/reddit/posts/run",
      headers={"Authorization": "Bearer mk_live_abc123def456"},
      json={"params": {
      "urls": [
          {
              "url": "https://www.reddit.com/r/memes/comments/xfn9vg/rmemes_meme_quiz_2/"
          },
          {
              "url": "https://www.reddit.com/r/wallstreetbets/comments/l8rf4k/times_square_right_now/"
          }
      ],
      "sortBy": "top",
      "maxResults": 12,
      "maxPosts": 2,
      "maxComments": 4
  }},
  )
  data = resp.json()
  ```
</CodeGroup>

### Example response

```json Response theme={null}
{
  "job_id": "job_7f3a2b1c",
  "status": "completed",
  "data": [
    {
      "redditUrl": "https://www.reddit.com/r/memes/comments/xfn9vg/rmemes_meme_quiz_2/",
      "type": "Post",
      "title": "R/MEMES MEME QUIZ #2",
      "body": "Thumbnail: default\n",
      "community": "r/memes",
      "author": "elch3w",
      "posted": "2022-12-23T23:15:07.000Z",
      "upVotes": 622849,
      "upVoteRatio": 0.88,
      "comments": 4893,
      "replies": null,
      "isVideo": false,
      "isAd": false,
      "nsfw": false,
      "flair": null,
      "category": null,
      "thumbnail": "default",
      "images": [],
      "video": null,
      "externalLink": "https://reddit.com/r/memes/predictions?tournament=tnmt-3cad1a25-79e9-4d47-b2e1-85b8a3471421"
    }
  ]
}
```
