# Reddit Posts

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

**Pricing:** $2.9 / 1k results

**Endpoint:** `POST /api/v1/agents/reddit/posts/run`

**Auth:** `Authorization: Bearer mk_live_...`

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `inputs` | array | Yes | One per line. You can input Reddit URLs (subreddits, posts, users) or search keywords (e.g. 'gpt5', 'r/wallstreetbets'). |
| `maxPosts` | integer | No | Maximum posts per URL/search. Use 0 for all. |
| `skipComments` | boolean | No | Don't fetch any comments at all (post-only mode). |
| `maxComments` | integer | No | Comments per post. Use 0 for all, or toggle Skip Comments above for none. |
| `sortBy` | string | No | Sort order for posts. |
| `timeRange` | string | No | Time window for posts. Only applies when Sort By is "Top" — Reddit ignores it for New/Hot. (Preset windows only; no custom date ranges.) |

## Example

```bash
curl -X POST https://api.mindcase.co/api/v1/agents/reddit/posts/run \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"params":{"inputs":["..."]}}'
```

```python
import requests

resp = requests.post(
    "https://api.mindcase.co/api/v1/agents/reddit/posts/run",
    headers={"Authorization": "Bearer mk_live_YOUR_API_KEY"},
    json={"params": {
    "inputs": [
        "..."
    ]
}},
)
data = resp.json()
```

## Get the results

`run` is async and returns a `job_id`. Poll until `status` is `completed`, then read the rows:

```bash
# 1) check status
curl https://api.mindcase.co/api/v1/jobs/JOB_ID \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY"

# 2) when status == completed, fetch the rows
curl https://api.mindcase.co/api/v1/jobs/JOB_ID/results \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY"
```

Full API reference (auth, jobs, balance, endpoints): https://mindcase.co/skills.md

## Response columns

| Field | Display name | Type |
|-------|--------------|------|
| `type` | Type | text |
| `redditUrl` | Reddit URL | url |
| `redditId` | Reddit ID | text |
| `postId` | Post ID | text |
| `title` | Title | text |
| `body` | Body | text |
| `community` | Community | text |
| `author` | Author | text |
| `posted` | Posted | text |
| `postKarma` | Post Karma | number |
| `commentKarma` | Comment Karma | number |
| `authorBio` | Author Bio | text |
| `authorVerified` | Author Verified | boolean |
