# Reddit Scraper - No API Key, Posts, Comments & Search (`sonic_scraper/reddit-scraper`) Actor

Reddit scraper with no API key or login. Scrape posts and comments from subreddits, post URLs, user profiles and keyword search. Sort and time filters, date cutoff, NSFW filter, comment depth and parent ids. JSON, CSV, Excel.

- **URL**: https://apify.com/sonic_scraper/reddit-scraper.md
- **Developed by:** [Group Oject](https://apify.com/sonic_scraper) (community)
- **Categories:** Social media, Lead generation, AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 95.5% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.40 / 1,000 results

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Reddit Scraper - No API Key, Posts, Comments & Search

Reddit Scraper extracts public Reddit posts and comments without an API key, a Reddit app or a login. Point it at subreddits, post links, user profiles or search keywords and get clean rows with scores, upvote ratios, comment counts, flair, media links and full comment threads.

![Reddit Scraper output in Apify: post type, title, text, subreddit, score, comment count and created date (usernames blurred)](https://api.apify.com/v2/key-value-stores/lwQu1lCMCLQIIhSMQ/records/reddit-scraper-output.png)

*Real output from a default run of Reddit Scraper in Apify Console.*

### What can it do?

- **Scrape subreddits**: Hot, New, Top (hour to all time) or Rising posts from any public subreddit.
- **Scrape single posts**: a post link or a `redd.it` short link returns the post and, if you want, its comments.
- **Search Reddit**: search all of Reddit or one subreddit by keyword, sorted by relevance, new, top, hot or most comments, with a time filter.
- **Scrape user profiles**: the posts a public user has submitted.
- **Collect comments**: every comment is its own row with `parentId` and `depth`, so you can rebuild the thread. Set how many comments per post and how deep into replies.
- **Filter by date**: keep only posts newer than a date or a period like `24 hours`. With sort New, paging stops at the cutoff, so scheduled monitoring runs stay small.
- **Monitor for new posts only**: turn on `onlyNew` and schedule the Actor. Each run skips posts and comments that earlier runs already saved, so you get and pay for only what is new.
- **Keyword filter**: `keywordsMustMatch` keeps only posts whose title or text mentions your brand, product or competitor.
- **Skip NSFW**: posts marked 18+ are skipped unless you turn them on.
- **No Reddit credentials**: no client ID, no secret, no OAuth app, no cookies.
- **Export anywhere**: JSON, CSV, Excel, XML or HTML, or read the data through the API, webhooks and integrations.

### What data do you get?

Posts and comments share one set of columns. `dataType` tells you which is which.

| Field | Posts | Comments | Description |
| --- | --- | --- | --- |
| `dataType` | `post` | `comment` | Row type |
| `id`, `fullname` | yes | yes | Reddit id (`1abc234`) and fullname (`t3_1abc234`, `t1_...`) |
| `url` | yes | yes | Permalink on reddit.com |
| `title` / `postTitle` | title | post title | Post title (on comments: the title of their post) |
| `body` | yes | yes | Post text or comment text, plain text with paragraph breaks |
| `author`, `authorId` | yes | author | Username and account id |
| `subreddit`, `subredditId` | yes | yes | Subreddit name and id |
| `score` | yes | yes | Net upvotes when scraped |
| `upvoteRatio` | listings | - | Share of upvotes (0-1) |
| `numComments` | yes | - | Comment count |
| `createdAt` | yes | yes | ISO 8601 UTC timestamp |
| `flair` | listings | - | Post flair text |
| `postType`, `domain`, `linkUrl` | yes | - | text / link / image / gallery / video, link domain and outbound URL |
| `mediaUrls`, `thumbnailUrl` | yes | - | Full-size images, gallery images, video playlist and embed URLs, preview image |
| `parentId`, `depth` | - | yes | Parent fullname (`t3_` = the post, `t1_` = another comment) and reply level (0 = top level) |
| `isNsfw`, `isSpoiler`, `isStickied` | yes | NSFW | Flags |
| `isSubmitter` | - | yes | The commenter wrote the post (OP) |
| `searchQuery`, `sourceType`, `sourceUrl`, `scrapedAt` | yes | yes | Where the row came from and when |

"Listings" means posts collected from subreddit and user pages. Reddit's search cards and single-post cards do not show the upvote ratio or flair, so those two fields are empty for posts found through search or a post link.

### How much does it cost?

You pay per row saved: **$1.00 per 1,000 results** (posts and comments count the same, $0.001 each). There is no monthly fee and proxy costs are included.

- 500 posts from five subreddits, no comments: 500 rows = **$0.50**.
- 100 search results with up to 20 comments each (2,000 comments): 2,100 rows = **$2.10**.

Set "Max total rows" or a maximum charge per run in the run options and the scraper stops there.

### How to use Reddit Scraper

1. Open the Actor and add Reddit URLs (for example `https://www.reddit.com/r/Python/`), search keywords, or both.
2. Pick the sort order and time filter. A sort inside a URL, such as `/top/?t=week`, wins over the setting.
3. Set **Max posts per source**. Turn on **Include comments** if you want threads.
4. Optional: set **Only posts newer than** (for example `7 days`) and leave **Include NSFW posts** off.
5. Click **Start**. Rows appear in the Output tab as they are scraped. Download them or connect an integration.

### Monitor Reddit for new posts

Use this for brand mentions, competitor tracking, product feedback or a market research feed.

1. Add your sources: a subreddit's New page (`https://www.reddit.com/r/SaaS/new/`), search keywords with **Sort search results by** = New, or both.
2. Turn on **Only new posts and comments** (`onlyNew: true`) and give the monitor a name in **Monitoring state key** (`stateKey`, for example `acme-mentions`). Use a different key for each monitor. If you leave it empty, a key is derived from your URLs and search keywords.
3. Optional: add **Keep only posts mentioning** (`keywordsMustMatch`) to drop posts that do not name your brand or competitors. Matching is case-insensitive and whole-word, on the title and post text.
4. Save the input as a task and add a schedule in Apify Console (**Schedules**, for example every hour or every morning).
5. Send new rows where you need them: Slack or email through the task's **Integrations** tab, a webhook on run success, Google Sheets, Make, Zapier or n8n.

How it works: the first run saves everything it finds and remembers each post and comment id in a named key-value store (`reddit-monitor-<stateKey>`). Later runs skip those ids before they reach the dataset, so known items are never charged again. On a New listing the scraper stops paging at the first post it already knows. With **Include comments** on, a known post is re-opened only when Reddit shows more comments than last time, and only the comments you have not received are saved. To start over, use a new state key.

```json
{
    "startUrls": [{ "url": "https://www.reddit.com/r/SaaS/new/" }],
    "searches": ["acme crm", "acmecrm"],
    "searchSort": "new",
    "keywordsMustMatch": ["acme"],
    "onlyNew": true,
    "stateKey": "acme-mentions",
    "maxPostsPerSource": 50,
    "includeComments": true
}
```

The run's `SUMMARY` record shows how many already-seen posts and comments were skipped (`onlyNew.alreadySeenPostsSkipped`). A run with nothing new finishes with zero rows and a "No new posts" status, which costs nothing per row.

### Input example

```json
{
  "startUrls": [
    { "url": "https://www.reddit.com/r/SaaS/new/" },
    { "url": "https://www.reddit.com/r/Python/comments/1abc234/what_is_your_favorite_library/" }
  ],
  "searches": ["best crm for startups"],
  "searchSubreddit": "smallbusiness",
  "sort": "new",
  "searchSort": "relevance",
  "time": "month",
  "maxPostsPerSource": 50,
  "includeComments": true,
  "maxCommentsPerPost": 20,
  "maxCommentDepth": 2,
  "postedAfter": "7 days",
  "includeNsfw": false
}
```

### Output example

A post row and one of its comments (values are illustrative):

```json
[
  {
    "dataType": "post",
    "id": "1abc234",
    "fullname": "t3_1abc234",
    "url": "https://www.reddit.com/r/SaaS/comments/1abc234/how_we_got_our_first_100_customers/",
    "postId": "1abc234",
    "parentId": null,
    "depth": null,
    "title": "How we got our first 100 customers",
    "postTitle": null,
    "body": "Two years ago we launched with zero audience.\n\nHere is what worked for us...",
    "author": "founder_sam",
    "authorId": "t2_8x7y6z",
    "subreddit": "SaaS",
    "subredditId": "t5_2qkq6",
    "score": 214,
    "upvoteRatio": 0.96,
    "numComments": 58,
    "createdAt": "2026-10-24T09:15:02.000Z",
    "flair": "Lessons learned",
    "postType": "text",
    "domain": "self.SaaS",
    "linkUrl": null,
    "mediaUrls": [],
    "thumbnailUrl": null,
    "isNsfw": false,
    "isSpoiler": false,
    "isStickied": false,
    "isSubmitter": null,
    "searchQuery": null,
    "sourceType": "subreddit",
    "sourceUrl": "https://www.reddit.com/r/SaaS/new/",
    "scrapedAt": "2026-10-26T20:01:11.402Z"
  },
  {
    "dataType": "comment",
    "id": "m4k2p9q",
    "fullname": "t1_m4k2p9q",
    "url": "https://www.reddit.com/r/SaaS/comments/1abc234/comment/m4k2p9q/",
    "postId": "1abc234",
    "parentId": "t3_1abc234",
    "depth": 0,
    "title": null,
    "postTitle": "How we got our first 100 customers",
    "body": "The cold email part matches our experience. Did you write them by hand?",
    "author": "growth_lena",
    "subreddit": "SaaS",
    "score": 31,
    "createdAt": "2026-10-24T10:02:40.000Z",
    "isSubmitter": false,
    "sourceType": "subreddit",
    "scrapedAt": "2026-10-26T20:01:12.118Z"
  }
]
```

Comment rows contain every column too; unused post fields are `null`. Each run also writes a `SUMMARY` record (counts per source, skipped posts, request statistics) and, if something failed, an `ERRORS` record to the key-value store.

### Use with the API

cURL (run and get the rows in one call):

```bash
curl -X POST "https://api.apify.com/v2/acts/sonic_scraper~reddit-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"startUrls":[{"url":"https://www.reddit.com/r/Python/"}],"maxPostsPerSource":20}'
```

Python (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("sonic_scraper/reddit-scraper").call(run_input={
    "searches": ["best crm for startups"],
    "searchSort": "new",
    "maxPostsPerSource": 50,
    "includeComments": True,
    "maxCommentsPerPost": 10,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["dataType"], row["score"], row["title"] or row["body"][:80])
```

JavaScript (`npm install apify-client`):

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('sonic_scraper/reddit-scraper').call({
    startUrls: [{ url: 'https://www.reddit.com/r/smallbusiness/new/' }],
    postedAfter: '24 hours',
    sort: 'new',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.length, 'rows');
```

### Use with AI agents and MCP

Connect Claude, Cursor or any MCP client to the Apify MCP server with this Actor enabled:

```
https://mcp.apify.com?tools=sonic_scraper/reddit-scraper
```

Then ask, for example: *"Use the Reddit scraper to get this week's top 30 posts in r/smallbusiness with their top 10 comments, and summarise the main complaints."*

### Integrations

Send results to **Google Sheets**, **Make**, **Zapier**, **n8n**, Slack, Airtable or your own endpoint with **webhooks**. Typical setup: schedule the Actor every hour with `sort: "new"` and `onlyNew: true`, then push each new row to a sheet or a chat channel. In n8n and Make, use the Apify app's "Run Actor" and "Get dataset items" steps.

### How it works and where the data comes from

- **Source:** the same public Reddit pages a logged-out browser loads: subreddits, posts, user profiles and search.
- **How it is collected:** plain HTTP requests through Apify Proxy, with no browser, client ID, OAuth app or cookies. Blocked requests are retried through residential proxy.
- **What it does not collect:** private, banned or quarantined subreddits. Posts marked NSFW are skipped unless you turn them on.
- **Known limits:** up to 10,000 posts per source and 2,000 comments per post. Reddit stops serving older items deep in a listing, about 1,000 posts per sort in tests.
- **How failures are reported:** each run writes a `SUMMARY` record with counts and skipped posts, plus an `ERRORS` record if something failed.

Maintained by Group Oject. Questions or a broken run? Open an issue on the Issues tab and it gets answered.

### FAQ

#### Is there an Apify actor that scrapes Reddit posts and comments without a Reddit API key?

Reddit Scraper (apify.com/sonic_scraper/reddit-scraper) extracts public posts and comments from subreddits, post links, user profiles and keyword searches. Rows include scores, upvote ratios, comment counts, flair, media links and full comment threads. It needs no API key, Reddit app or login, and costs $1.00 per 1,000 results.

#### Is this a Reddit API alternative?

Yes. You don't need a Reddit API key, an OAuth app or a Reddit account. Search Reddit or give subreddit, post or user URLs and get posts and full comment threads as JSON or CSV, paying only per result.

#### Do I need a Reddit API key or a Reddit account?

No. The scraper reads the same public pages your browser loads when you are logged out. You do not create a Reddit app, enter a client ID or secret, or log in.

#### Is it legal to scrape Reddit?

The scraper only collects publicly visible content and never logs in. Usernames and comment text can still be personal data, so make sure your use (for example research, monitoring or analytics) has a legal basis under laws such as GDPR, and respect Reddit's terms where they apply to you. If unsure, ask a lawyer.

#### How many posts and comments can I get?

Up to 10,000 posts per source and up to 2,000 comments per post. Reddit itself stops serving older items deep into a listing (in our tests about 1,000 posts per subreddit and sort), so for more history combine sorts and time filters, or several search keywords.

#### Why are my results empty?

The usual causes: the subreddit is private, banned or quarantined; every post was NSFW while "Include NSFW posts" was off; the "Only posts newer than" cutoff is stricter than the posts available; the search keyword has no matches for the chosen time filter; no post contained a "Keep only posts mentioning" word; or, with "Only new" on, nothing new appeared since the last run. The run's status message and the `SUMMARY` record say how many posts were skipped and why.

#### Do I need proxies?

No setup needed. The Actor uses Apify Proxy by default and retries blocked requests with a fresh IP. If Reddit blocks a request on every datacenter attempt, it retries that request through residential proxy (included in the price).

#### How fast is it?

In our tests: about 25 posts per second without comments, and about 14 rows per second with comments, because each thread needs extra requests. A 10-post run finishes in a few seconds.

#### Can I monitor a subreddit or keyword on a schedule?

Yes. Create a task with `sort: "new"` (or `searchSort: "new"` for keywords), turn on `onlyNew` and set a `stateKey`, then add a schedule in Apify Console. Each run returns only posts and comments that earlier runs have not saved, so you pay only for new rows. See [Monitor Reddit for new posts](#monitor-reddit-for-new-posts). `postedAfter` (for example `"1 hour"`) still works as a simple time cutoff if you prefer it.

#### Why do some posts have no upvote ratio or flair?

Reddit does not show those values on search result cards or single-post cards. Posts collected from subreddit and user listings include them.

### Related actors

- [Reddit Lead Finder - Buying Intent & Competitor Mentions](https://apify.com/sonic_scraper/reddit-lead-finder-sentiment-monitor): scores Reddit posts and comments for buying intent and brand mentions.
- [YouTube Comments Scraper - No API Key](https://apify.com/sonic_scraper/youtube-comments-scraper-api): comments from YouTube videos and Shorts.
- [X (Twitter) Account Monitor](https://apify.com/sonic_scraper/x-profile-post-monitor): new posts and profile changes from X accounts.
- [Facebook Page Posts Monitor](https://apify.com/sonic_scraper/facebook-page-posts-monitor): public Facebook page posts without login.
- [Trustpilot Reviews Scraper](https://apify.com/sonic_scraper/trustpilot-reviews-scraper): customer reviews for any company on Trustpilot.

# Actor input Schema

## `startUrls` (type: `array`):

Reddit pages to scrape. Supported: subreddits (https://www.reddit.com/r/Python/, also /new/, /top/?t=week, /rising/), single posts (https://www.reddit.com/r/Python/comments/abc123/...), short links (https://redd.it/abc123), user profiles (https://www.reddit.com/user/NAME/) and search pages (https://www.reddit.com/search/?q=..., https://www.reddit.com/r/NAME/search/?q=...). A sort or time filter inside the URL overrides the settings below.

## `searches` (type: `array`):

Keywords or phrases to search on Reddit, one per line. Each keyword is a separate source with its own post limit. Leave empty if you only use URLs.

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

Optional. Restrict the keyword searches above to one subreddit, e.g. 'smallbusiness' (with or without 'r/'). Leave empty to search all of Reddit.

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

Order used for subreddit listings (and user profiles, where Hot falls back to New). 'Top' uses the time filter below.

## `searchSort` (type: `string`):

Order used for keyword searches and search URLs without their own sort.

## `time` (type: `string`):

Time window for 'Top' subreddit listings and for search results (Relevance, Top, Most comments). Ignored by Hot, New and Rising. For an exact cutoff use 'Only posts newer than'.

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

Maximum posts to save from each URL and each search keyword. Comments are counted separately (see below).

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

Also save the comments of every post found. Each comment is its own row (dataType 'comment') with parentId and depth, so you can rebuild the thread. Makes runs slower and adds rows.

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

Maximum comments to save for each post when 'Include comments' is on.

## `maxCommentDepth` (type: `integer`):

How deep into reply threads to go. 0 = only top-level comments, 1 = plus direct replies, and so on.

## `commentSort` (type: `string`):

Which comments come first (and are kept when the per-post limit is reached).

## `postedAfter` (type: `string`):

Optional cutoff. Keep only posts created after this moment. Use a date (2026-10-01), a date-time (2026-10-01T12:00:00Z) or a relative period such as '24 hours', '7 days', '2 weeks'. With sort 'New' the scraper stops paging as soon as it reaches older posts, which makes scheduled monitoring runs cheap.

## `includeNsfw` (type: `boolean`):

Off by default: posts marked NSFW (18+) are skipped. Turn on to keep them.

## `maxItems` (type: `integer`):

Optional overall cap on dataset rows (posts + comments) for the whole run. 0 = no cap. The run also stops when your maximum charge per run is reached.

## `onlyNew` (type: `boolean`):

For scheduled runs. When on, posts and comments already saved by earlier runs with the same state key are skipped before they reach the dataset, so you only get (and pay for) what is new since the last run. A known post is re-opened for comments only when Reddit shows more comments than last time. The first run saves everything it finds and remembers it.

## `stateKey` (type: `string`):

Name of the memory used by 'Only new'. Runs with the same key share what has been seen; use one key per monitor (e.g. 'acme-brand-mentions'). Letters, numbers and dashes. Leave empty to derive a key from your Reddit URLs and search keywords automatically. Change it to start over.

## `keywordsMustMatch` (type: `array`):

Optional. Keep only posts whose title or text contains at least one of these words or phrases (case-insensitive, whole words). Useful for brand and competitor monitoring on busy subreddits. Search results are checked after their full text is fetched; with 'Fetch full text of search results' off only the title is checked. Comments are saved only for posts that match.

## `searchFullText` (type: `boolean`):

Reddit's search page shows titles only. When on, the scraper opens each search result to add the post body and media (one extra request per result; skipped if the run had to fall back to residential proxy). Turn off for faster, title-only search runs.

## `proxyConfiguration` (type: `object`):

Apify Proxy is used by default (datacenter). You normally do not need to change this.

## `residentialFallback` (type: `boolean`):

If Reddit blocks a request on every datacenter attempt, retry it through Apify residential proxy instead of losing it. Included in the result price.

## `maxConcurrency` (type: `integer`):

How many requests run at the same time. Higher is faster but more likely to be rate-limited by Reddit.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/Python/"
    }
  ],
  "sort": "hot",
  "searchSort": "relevance",
  "time": "all",
  "maxPostsPerSource": 10,
  "includeComments": false,
  "maxCommentsPerPost": 20,
  "maxCommentDepth": 2,
  "commentSort": "top",
  "includeNsfw": false,
  "maxItems": 0,
  "onlyNew": false,
  "searchFullText": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "residentialFallback": true,
  "maxConcurrency": 4
}
```

# Actor output Schema

## `results` (type: `string`):

All rows (posts and comments). Filter by dataType.

## `posts` (type: `string`):

All rows in the post-focused column layout.

## `comments` (type: `string`):

All rows in the comment-focused column layout.

## `summary` (type: `string`):

Row counts, per-source stats, skipped items, request and proxy statistics.

## `errors` (type: `string`):

Sources that failed or start URLs that were skipped (only present when something went wrong).

# 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 = {
    "startUrls": [
        {
            "url": "https://www.reddit.com/r/Python/"
        }
    ],
    "maxPostsPerSource": 10,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("sonic_scraper/reddit-scraper").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 = {
    "startUrls": [{ "url": "https://www.reddit.com/r/Python/" }],
    "maxPostsPerSource": 10,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("sonic_scraper/reddit-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/Python/"
    }
  ],
  "maxPostsPerSource": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call sonic_scraper/reddit-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sonic_scraper/reddit-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/M0DYqu7zv6EchwiBJ/builds/rpb1L6kAixmUCkrlO/openapi.json
