# Reddit Scraper: Extract Posts, Comments, Search & AI Datasets (`karamelo/reddit-scraper-extract-posts-comments-search-ai-datasets`) Actor

Scrape Reddit posts, nested comments, and search listings without an API key. Export clean JSON, CSV, or formatted SFT and RAG datasets for AI training.

- **URL**: https://apify.com/karamelo/reddit-scraper-extract-posts-comments-search-ai-datasets.md
- **Developed by:** [karamelo](https://apify.com/karamelo) (community)
- **Categories:** Automation, Lead generation, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 post scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

### What does Reddit Scraper do?

The **Reddit Scraper** extracts clean, structured data from public Reddit pages without requiring a Reddit developer account or API credentials. It allows you to **extract Reddit posts**, **scrape Reddit comments**, extract user profiles, and run automated **subreddit search queries** at scale.

This Actor is highly optimized to run fast and bypass Reddit's anti-bot restrictions directly. Output can be exported in formats like JSON, CSV, or Excel, as well as specialized formats ready for AI ingestion (Chat fine-tuning JSONL or RAG-friendly Markdown documents).

---

### Who is it for?

Reddit Scraper is built for anyone who needs Reddit data at scale without dealing with Reddit's restrictive official API:
*   🔬 **Researchers & Academics** — collect public opinion data, survey sentiment on topics, and build datasets for academic studies.
*   📊 **Market Analysts & Competitor Intelligence** — track brand mentions, product feedback, and competitor discussions across subreddits.
*   📈 **SEO & Content Marketers** — discover trending topics, find content ideas, and monitor keyword discussions.
*   🤖 **AI/ML Engineers** — gather training data, build sentiment analysis datasets, or feed LLM pipelines with real conversations.
*   📰 **Journalists & Media Monitors** — monitor communities for breaking stories and track public reactions to events.
*   🏢 **Product Managers** — collect user feedback from product subreddits, track feature requests, and follow bug reports.
*   💼 **Lead Generation Teams** — find potential customers asking for recommendations or solutions in your industry.

---

### Why use Reddit Scraper?

*   ✅ **No API Keys or Accounts Required**: Works immediately without Reddit developer credentials.
*   🔎 **Subreddit Listings & Keyword Search**: Easily fetch hot, new, top, rising, or relevance listings.
*   📦 **Recursive Comment Threads**: Scrape nested reply trees up to the configured nesting level.
*   ⚡ **High-Performance Direct Crawling**: Bypasses typical cloud/datacenter IP blocks using Crawlee's advanced got-scraping engine.
*   🧠 **AI-Ready Exports**: Native support for SFT fine-tuning (JSONL) and RAG Markdown chunks.
*   💰 **Pay-per-Event Economy**: Optimized for minimal execution overhead.

---

### What data can you extract?

#### Post Fields:
| Field | Type | Description |
|---|---|---|
| `type` | String | Item type: `'post'` |
| `id` | String | Unique identifier of the post |
| `title` | String | Post title |
| `author` | String | Username of the post author |
| `subreddit` | String | Subreddit name |
| `score` | Integer | Net upvotes (best-effort, may be `0` due to public path limits) |
| `upvoteRatio` | Number | Upvote percentage (0-1, best-effort) |
| `numComments` | Integer | Total comment count |
| `createdAt` | String | ISO 8601 timestamp of post creation |
| `url` | String | Full direct URL to the post |
| `permalink` | String | Relative URL path to the post |
| `selfText` | String | Body text of the post |
| `domain` | String | Link domain (for external link posts) |
| `isVideo` | Boolean | True if the post is a video link |
| `isSelf` | Boolean | True if the post is a text post |
| `isNSFW` | Boolean | True if the post is marked NSFW |
| `isSpoiler` | Boolean | True if the post is marked as a spoiler |
| `thumbnail` | String | URL to the post thumbnail image |
| `subredditSubscribers` | Integer | Total subscriber count of the subreddit |
| `scrapedAt` | String | Timestamp when this item was extracted |

#### Comment Fields:
| Field | Type | Description |
|---|---|---|
| `type` | String | Item type: `'comment'` |
| `id` | String | Unique identifier of the comment |
| `postId` | String | Parent post identifier |
| `postTitle` | String | Title of the parent post |
| `author` | String | Username of the commenter |
| `body` | String | Text body of the comment |
| `score` | Integer | Net upvotes of the comment (best-effort) |
| `createdAt` | String | ISO 8601 timestamp of comment creation |
| `depth` | Integer | Nesting reply depth level (0 = top-level comment) |
| `parentId` | String | ID of the parent comment or post |
| `scrapedAt` | String | Timestamp when this item was extracted |

---

### How much does it cost to scrape Reddit?

This Actor runs on a standard consumption model. With Apify's free tier credits, you can scrape thousands of pages for free every month.
*   **1,000 subreddit listing posts** costs approximately **$0.15** in compute usage.
*   **1,000 comment threads** costs approximately **$0.25** in compute usage.

---

### How to use Reddit Scraper (Step-by-Step)

1.  Go to the **Reddit Scraper** on the [Apify Console](https://console.apify.com/).
2.  Add Reddit links to the **Reddit Target URLs** field. Any of these formats work:
    *   `https://www.reddit.com/r/technology/` (or simply `r/technology`)
    *   `https://www.reddit.com/r/AskReddit/comments/abc123/post-title/`
    *   `https://www.reddit.com/user/spez/`
3.  Or enter a query in the **Search Query Keyword** field to search across Reddit.
4.  Configure optional filters such as **Sorting Mode**, **Max Comments per Thread**, or **Output Format Mode**.
5.  Click **Start** and wait for results.
6.  Download your data as JSON, CSV, or Excel from the **Dataset** tab.

#### Searching Reddit with Keyword Filtering
To narrow down search results to specific keywords, pass the `filterKeywords` parameter. The scraper will automatically discard any posts that do not contain at least one of the specified terms in the title or self text body:
```json
{
  "searchQuery": "best project management tools",
  "searchSubreddit": "productivity",
  "sort": "relevance",
  "timeFilter": "month",
  "maxPostsPerSource": 50,
  "filterKeywords": ["Notion", "Asana", "Monday"]
}
````

***

### Input Parameters Table

| Parameter | Type | Default | Description |
|---|---|---|---|
| `urls` | Array | — | Reddit URLs to scrape (subreddits, posts, users). |
| `searchQuery` | String | — | Search Reddit for posts matching this keyword/phrase. |
| `searchSubreddit` | String | — | Limit search query to this specific subreddit. |
| `sort` | Enum | `hot` | Sort order: `hot`, `new`, `top`, `rising`, `relevance`. |
| `timeFilter` | Enum | `week` | Time filter for top/relevance: `hour`, `day`, `week`, `month`, `year`, `all`. |
| `maxPostsPerSource` | Integer | `100` | Max posts to retrieve per URL or search. `0` = unlimited. |
| `includeComments` | Boolean | `false` | Enable to crawl the comments for each scraped post. |
| `maxCommentsPerPost` | Integer | `100` | Cap the total number of comments scraped from a single post. |
| `commentDepth` | Integer | `3` | Maximum nesting level for comment replies (1 to 10). |
| `outputFormat` | Enum | `default` | Output format: `default`, `jsonl-finetune`, `rag-markdown`. |
| `filterKeywords` | Array | `[]` | Keep only posts containing at least one keyword (case-insensitive). |

***

### Advanced AI Formats

To speed up machine learning workflows, this Actor supports three output modes:

#### 1. Standard JSON (`default`)

Backward-compatible flat structures for general analytics. Each post and comment is exported as a separate row in the dataset.

#### 2. SFT Chat JSONL (`jsonl-finetune`)

Formats thread discussions into OpenAI chat-style (system / user / assistant) JSONL objects, ready to train and fine-tune custom AI models.

- **System message**: Analytical role instruction.
- **User message**: Subreddit name + Post title + Post body text.
- **Assistant message**: Ordered comments serialized as a single string.

```json
{
  "type": "finetune",
  "messages": [
    { "role": "system", "content": "You are analyzing a Reddit discussion..." },
    { "role": "user", "content": "r/AppIdeas — National Park animal sighting tracker\n\nI just went on a safari in Africa..." },
    { "role": "assistant", "content": "1. [user_a, score: 5] It needs a very easy and seamless way to report sightings...\n2. [user_b, score: 2] Consider the serious ethical issues..." }
  ],
  "metadata": {
    "postId": "t3_1uqye4t",
    "subreddit": "AppIdeas",
    "score": 1,
    "url": "https://www.reddit.com/r/AppIdeas/comments/1uqye4t/national_park_animal_sighting_tracker/"
  }
}
```

#### 3. RAG Markdown Chunks (`rag-markdown`)

Combines the post body and top comments into a single Markdown document with a stable `chunkId` and flat metadata, optimized for vector database ingestion (Pinecone, Chroma, Qdrant).

```json
{
  "type": "rag-chunk",
  "chunkId": "reddit-AppIdeas-t3_1uqye4t",
  "markdown": "# National Park animal sighting tracker\n\n**Subreddit:** r/AppIdeas\n**Author:** u/gdubrocks\n**Score:** 1\n\nI just went on a safari...\n\n## Top Comments\n\n### u/user_a (score: 5)\n\nIt needs a very easy and seamless way...\n\n### u/user_b (score: 2)\n\nConsider the serious ethical issues...",
  "metadata": {
    "source": "reddit",
    "subreddit": "AppIdeas",
    "postId": "t3_1uqye4t",
    "title": "National Park animal sighting tracker",
    "score": 1,
    "url": "https://www.reddit.com/r/AppIdeas/comments/1uqye4t/national_park_animal_sighting_tracker/"
  }
}
```

***

### API Usage and Programmatic Integration

You can easily trigger **Reddit Scraper** programmatically using Apify's API and client libraries in Node.js, Python, or standard terminal commands.

#### Node.js (using `apify-client`)

Install client via `npm install apify-client` and invoke:

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });

const run = await client.actor('karamelo/reddit-scraper').call({
    urls: ['https://www.reddit.com/r/technology/'],
    maxPostsPerSource: 100,
    sort: 'hot',
    includeComments: false,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python (using `apify-client`)

Install client via `pip install apify-client` and invoke:

```python
from apify_client import ApifyClient

client = ApifyClient('YOUR_API_TOKEN')

run = client.actor('karamelo/reddit-scraper').call(run_input={
    'urls': ['https://www.reddit.com/r/technology/'],
    'maxPostsPerSource': 100,
    'sort': 'hot',
    'includeComments': False,
})

items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)
```

#### cURL command-line integration

Start the scraper run via HTTP POST:

```bash
curl "https://api.apify.com/v2/acts/karamelo~reddit-scraper/runs" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
    "urls": ["https://www.reddit.com/r/technology/"],
    "maxPostsPerSource": 100,
    "sort": "hot"
  }'
```

To fetch items in JSON format once the run completes:

```bash
curl "https://api.apify.com/v2/datasets/DATASET_ID/items?format=json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
```

***

### Use with AI Agents via Model Context Protocol (MCP)

This Scraper is designed to be accessible directly inside LLM tool pipelines and AI assistants.

#### Claude Code Setup

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=karamelo/reddit-scraper"
```

#### Claude Desktop / Cursor Setup

Add the server entry to your config file:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=karamelo/reddit-scraper"
    }
  }
}
```

#### Agent Integration via x402 (No Apify Account Required)

To run the Actor directly from agent wallets:

```
https://mcp.apify.com?tools=karamelo/reddit-scraper&payment=x402
```

***

### FAQ, Disclaimers, and Support

> ⚖️ **Legal Disclaimer**: Our scraper only accesses publicly available posts and comments shared by users who chose to share them publicly. It does not log in, bypass any authentication barriers, or access private data. The US Ninth Circuit ruling in *hiQ Labs v. LinkedIn* (2022) established that scraping publicly available data does not violate the Computer Fraud and Abuse Act (CFAA). GDPR laws apply when storing personal data (such as usernames). Make sure you have a legitimate reason to scrape and store this data.

For feedback or feature requests, visit the **Issues** tab on the Actor page.

# Actor input Schema

## `urls` (type: `array`):

Enter public Reddit links (subreddits like `r/technology`, direct post threads, or user profiles like `user/spez`). Leave empty if using a Search Query below.

## `searchQuery` (type: `string`):

Search Reddit for posts matching this keyword or phrase. Works globally across all of Reddit, or scoped to a specific subreddit below. Leave empty if using Target URLs instead.

## `searchSubreddit` (type: `string`):

Limit your search query to this specific subreddit (omit 'r/').

## `sort` (type: `string`):

How to sort listing items or search results.

## `timeFilter` (type: `string`):

Time range filter for 'top' or 'relevance' sorts.

## `maxPostsPerSource` (type: `integer`):

Limit the number of posts to retrieve per URL or search query. Set to 0 for unlimited.

## `includeComments` (type: `boolean`):

If enabled, crawls the comments for each scraped post.

## `maxCommentsPerPost` (type: `integer`):

Cap the total number of comments scraped from a single post.

## `commentDepth` (type: `integer`):

Maximum nesting level for comment replies (1 to 10).

## `outputFormat` (type: `string`):

Choose between default structured JSON, supervised fine-tuning chat training JSONL, or RAG-friendly Markdown documents.

## `filterKeywords` (type: `array`):

Only keep posts containing at least one of these keywords (case-insensitive). Leave blank to keep all.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://www.reddit.com/r/technology/"
    }
  ],
  "sort": "hot",
  "timeFilter": "week",
  "maxPostsPerSource": 100,
  "includeComments": false,
  "maxCommentsPerPost": 100,
  "commentDepth": 3,
  "outputFormat": "default"
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing all scraped posts and comments

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        {
            "url": "https://www.reddit.com/r/technology/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("karamelo/reddit-scraper-extract-posts-comments-search-ai-datasets").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "urls": [{ "url": "https://www.reddit.com/r/technology/" }] }

# Run the Actor and wait for it to finish
run = client.actor("karamelo/reddit-scraper-extract-posts-comments-search-ai-datasets").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    {
      "url": "https://www.reddit.com/r/technology/"
    }
  ]
}' |
apify call karamelo/reddit-scraper-extract-posts-comments-search-ai-datasets --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=karamelo/reddit-scraper-extract-posts-comments-search-ai-datasets",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Reddit Scraper: Extract Posts, Comments, Search & AI Datasets",
        "description": "Scrape Reddit posts, nested comments, and search listings without an API key. Export clean JSON, CSV, or formatted SFT and RAG datasets for AI training.",
        "version": "0.0",
        "x-build-id": "VbJqmTY0xahOZwUbF"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/karamelo~reddit-scraper-extract-posts-comments-search-ai-datasets/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-karamelo-reddit-scraper-extract-posts-comments-search-ai-datasets",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/karamelo~reddit-scraper-extract-posts-comments-search-ai-datasets/runs": {
            "post": {
                "operationId": "runs-sync-karamelo-reddit-scraper-extract-posts-comments-search-ai-datasets",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/karamelo~reddit-scraper-extract-posts-comments-search-ai-datasets/run-sync": {
            "post": {
                "operationId": "run-sync-karamelo-reddit-scraper-extract-posts-comments-search-ai-datasets",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "urls": {
                        "title": "Reddit Target URLs",
                        "type": "array",
                        "description": "Enter public Reddit links (subreddits like `r/technology`, direct post threads, or user profiles like `user/spez`). Leave empty if using a Search Query below.",
                        "default": [],
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "searchQuery": {
                        "title": "Search Query Keyword",
                        "type": "string",
                        "description": "Search Reddit for posts matching this keyword or phrase. Works globally across all of Reddit, or scoped to a specific subreddit below. Leave empty if using Target URLs instead."
                    },
                    "searchSubreddit": {
                        "title": "Target Subreddit for Search",
                        "type": "string",
                        "description": "Limit your search query to this specific subreddit (omit 'r/')."
                    },
                    "sort": {
                        "title": "Sorting Mode",
                        "enum": [
                            "hot",
                            "new",
                            "top",
                            "rising",
                            "relevance"
                        ],
                        "type": "string",
                        "description": "How to sort listing items or search results.",
                        "default": "hot"
                    },
                    "timeFilter": {
                        "title": "Timeframe Filter",
                        "enum": [
                            "hour",
                            "day",
                            "week",
                            "month",
                            "year",
                            "all"
                        ],
                        "type": "string",
                        "description": "Time range filter for 'top' or 'relevance' sorts.",
                        "default": "week"
                    },
                    "maxPostsPerSource": {
                        "title": "Maximum Submissions to Extract",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Limit the number of posts to retrieve per URL or search query. Set to 0 for unlimited.",
                        "default": 100
                    },
                    "includeComments": {
                        "title": "Extract Conversation Threads",
                        "type": "boolean",
                        "description": "If enabled, crawls the comments for each scraped post.",
                        "default": false
                    },
                    "maxCommentsPerPost": {
                        "title": "Max Comments per Thread",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Cap the total number of comments scraped from a single post.",
                        "default": 100
                    },
                    "commentDepth": {
                        "title": "Comment Nested Tree Depth",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Maximum nesting level for comment replies (1 to 10).",
                        "default": 3
                    },
                    "outputFormat": {
                        "title": "Data Format Mode",
                        "enum": [
                            "default",
                            "jsonl-finetune",
                            "rag-markdown"
                        ],
                        "type": "string",
                        "description": "Choose between default structured JSON, supervised fine-tuning chat training JSONL, or RAG-friendly Markdown documents.",
                        "default": "default"
                    },
                    "filterKeywords": {
                        "title": "Keyword Inclusions",
                        "type": "array",
                        "description": "Only keep posts containing at least one of these keywords (case-insensitive). Leave blank to keep all.",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
