# Reddit User Scraper - Profiles, Karma, Posts & Comments (`socialscrapers/reddit-user-scraper`) Actor

Reddit user scraper: any public user's profile (post and comment karma, account age, bio, avatar, badges) and their posts and comments with text, votes, subreddit and date. JSON, CSV or Excel. No login, no API key, no RSS needed. From $0.72 per 1,000 results.

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

## Pricing

from $1.66 / 1,000 user profiles

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 User Scraper** gets any public Reddit user's **profile** (post karma, comment karma, total karma, account age, display name, bio, avatar and banner, and the verified, moderator, Premium, employee and bot badges) together with their **post and comment history**: titles, full text, votes, subreddit, date and links. Paste usernames or profile links, press Start, and download the results as JSON, CSV or Excel. **No login, no cookies, no API key and no Reddit app**, and it keeps working after Reddit's RSS shutdown. **From $0.72 per 1,000 results.**

> 💡 **Need a feature that isn't here? Just ask.** Open an issue on the **Issues** tab and tell us what you need: a new field, filter, input type or output format. We build requested features fast, usually within 24 hours, at no extra cost.

> ⭐ **Found it useful?** A short review on the **Reviews** tab helps other people find this scraper, and tells us what to build next.

### What does Reddit User Scraper do?

It reads each user's public profile the way a logged-out visitor sees it and saves:

- 👤 **One profile item per user**: username, display name, post, comment and total karma, when the account was created, bio, avatar and banner, and Reddit's badges (verified, moderator, Premium, employee, automated account, NSFW profile).
- 📝 **Their posts**: title, full text, votes, upvote ratio, comment count, subreddit, flair, date, link, images and video.
- 💬 **Their comments**: text, votes, date, subreddit, and the post each one was written on (title and link).
- 🎛️ **What to collect**: posts and comments, posts only, comments only, or profile details only (one item per user: the fastest way to check karma and account age for a long list of users).
- 📈 **Past the 1,000-item wall**: Reddit lists about 1,000 items per profile listing. Set the limit to 0 and the scraper also reads the user's top, controversial and hot lists over each period, each item once.
- 🔞 **NSFW switch**: leave out posts Reddit marks 18+.
- 💸 **Pay only for results saved**: a user who doesn't exist costs nothing, and the run stops cleanly at the maximum cost you set.

### No login, no API key, no RSS

Reddit ended its RSS feeds on 13 November 2026 and is closing its free public API in stages. This scraper needs neither: it reads what Reddit shows any logged-out visitor, so there is no Reddit account, session cookie, app or API key to set up, and nothing to renew.

### What data can you extract from a Reddit user?

Each user gives one `profile` item, then one `post` or `comment` item per post or comment, told apart by `dataType`. A field Reddit does not show is `null`.

**Profile items**

| Field | What it is |
|---|---|
| `username`, `displayName`, `id`, `url` | Who the user is (`id` is the account's `t2_…` ID), and the profile link |
| `postKarma`, `commentKarma`, `totalKarma` | Karma; the total also counts awards given and received |
| `createdAt` | When the account was created (ISO 8601, UTC) |
| `bio`, `iconUrl`, `bannerUrl` | The profile's "about" text, avatar and banner |
| `isVerified`, `isModerator`, `isPremium`, `isEmployee`, `isBot` | Reddit's verified badge, moderator of a subreddit, Premium, Reddit employee, automated account |
| `hasVerifiedEmail`, `isNsfw`, `acceptsFollowers` | Verified email, profile marked 18+, open to followers |

**Post and comment items**

| Field | What it is |
|---|---|
| `title`, `body` | Post title; post or comment text |
| `score`, `upvoteRatio`, `numComments` | Votes; posts: upvote ratio and comment count |
| `subreddit`, `flair` | Where it was posted, and the post flair |
| `createdAt`, `editedAt` | When it was posted and last edited |
| `url`, `linkUrl`, `imageUrls`, `videoUrl` | Permalink; posts: the link, images and video |
| `postTitle`, `postUrl`, `parentId` | Comments: the post it was written on, and what it replies to |
| `author`, `authorId` | The user |
| `sourceInput`, `scrapedAt` | The username or link it was collected for; when |

### How to scrape a Reddit user's profile, posts and comments

1. Click **Try for free** to open the Actor in Apify Console.
2. In **Reddit usernames or profile URLs**, add users one per line: `spez`, `u/spez`, `@spez` or `https://www.reddit.com/user/spez/`.
3. Choose **What to collect** and set **Max posts and comments per user** (`0` for as many as Reddit shows).
4. Click **Start**, then export the results from the **Output** tab (the **Profiles** and **Posts and comments** views show the main columns) or fetch them through the API.

#### How to check karma and account age for a list of users

Choose **Profile details only** and paste the list: each user gives one profile item, so 1,000 users cost $2.07.

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

You pay per result saved (a profile, a post or a comment); platform usage and residential proxies are included.

| Your Apify plan | Per 1,000 profiles | Per 1,000 posts | Per 1,000 comments |
|---|---|---|---|
| Free and Starter (Bronze) | **$2.07** | **$1.10** | **$0.72** |
| Scale (Silver) | $1.863 | $0.99 | $0.648 |
| Business (Gold) and higher | $1.656 | $0.88 | $0.576 |

Each run also carries a start charge of $0.0015 (one per GB of memory), and Apify then covers the run's first 5 seconds of compute.

Examples:

- **1,000 users, profile details only** = 1,000 profiles = **$2.07**.
- **100 users with their latest 100 posts and comments** = 100 profiles + 10,000 posts or comments = **$7.41 to $11.21**.
- **One user's last 1,000 posts and comments** = 1 profile + 1,000 posts or comments = **$0.72 to $1.10**.

A user who doesn't exist costs nothing. Apify's free plan includes $5 of credit every month, enough for about 2,400 profiles, 4,500 posts or 6,900 comments. Set a **maximum cost per run** in the run options and the scraper stops cleanly before the first result that would go over it, keeping everything saved so far.

### Input example

The form's own example, which finishes in well under a minute:

```json
{
  "usernames": ["nasa"],
  "maxItemsPerSource": 20
}
```

Profile details only, for a list of users:

```json
{
  "usernames": ["spez", "u/kn0thing", "https://www.reddit.com/user/nasa/"],
  "userContent": "profile"
}
```

| Field | Default | What it does |
|---|---|---|
| `usernames` | | Users: a username, `u/name`, `@name`, a profile link, or a link to a profile's posts or comments page. |
| `userContent` | `overview` | `overview` (posts and comments), `submitted` (posts only), `comments` (comments only) or `profile` (profile details only). |
| `maxItemsPerSource` | `100` | Most posts and comments per user, newest first; `0` = as many as Reddit shows. |
| `includeProfile` | `true` | One profile item per user before their posts and comments. |
| `includeNsfw` | `true` | Keep posts marked NSFW (18+). |
| `maxItems` | | Cap on results for the whole run. |
| `proxyConfiguration` | Residential | Keep the default Apify Proxy residential setting. |

Inputs written for other Reddit user scrapers work as they are: `usernames`, `maxPostsCount` and `includeNSFW` are read in this scraper's terms.

### Output example

A profile item:

```json
{
  "dataType": "profile",
  "id": "t2_1dkvvygb",
  "url": "https://www.reddit.com/user/nasa/",
  "username": "nasa",
  "displayName": "NASA",
  "bio": "Explore the universe and discover our home planet with NASA. \n\nVerification: nasa.gov/socialmedia",
  "iconUrl": "https://styles.redditmedia.com/t5_k5gc6/styles/profileIcon_ydyqarnwt7s91.png",
  "postKarma": 260549,
  "commentKarma": 169959,
  "totalKarma": 430508,
  "createdAt": "2018-05-15T21:25:14.000Z",
  "isVerified": true,
  "isBot": false,
  "hasVerifiedEmail": true,
  "isModerator": false,
  "isPremium": false,
  "isEmployee": false,
  "isNsfw": false,
  "acceptsFollowers": true,
  "sourceType": "user",
  "sourceInput": "nasa",
  "scrapedAt": "2026-11-13T14:05:18.510Z"
}
```

One of the user's comments (shortened):

```json
{
  "dataType": "comment",
  "id": "t1_19sjgfrcb1n5x",
  "url": "https://www.reddit.com/r/scifi/comments/1xtrkyf/calling_rscifi_were_authors_andy_weir_and/19sjgfrcb1n5x/",
  "body": "Thanks for all these amazing questions, y'all! I had fun answering…",
  "author": "nasa",
  "subreddit": "scifi",
  "createdAt": "2026-11-12T20:08:46.000Z",
  "score": 7,
  "postTitle": "Calling r/Sci-Fi! We’re authors Andy Weir and Benjamin Percy, and NASA scientist Dr. Shawn Domagal-Goldman. Ask us anything…",
  "postUrl": "https://www.reddit.com/r/scifi/comments/1xtrkyf/calling_rscifi_were_authors_andy_weir_and/",
  "sourceType": "user",
  "sourceInput": "nasa",
  "scrapedAt": "2026-11-13T14:05:18.510Z"
}
```

### Use cases

- **Account vetting**: karma, account age and badges before you trust, hire, partner with or moderate a user.
- **Influencer and expert research**: what a user posts and comments, in which subreddits, and how it scores.
- **Moderation and trust and safety**: a user's history across subreddits in one export.
- **Audience research**: the interests of the users active in your niche, from what they write.
- **Datasets for AI and NLP**: users' public posts and comments with their context.

### Use it via API and integrations

```bash
curl -X POST "https://api.apify.com/v2/acts/socialscrapers~reddit-user-scraper/run-sync-get-dataset-items?token=<YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"usernames": ["nasa", "spez"], "maxItemsPerSource": 50}'
```

Python (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("socialscrapers/reddit-user-scraper").call(run_input={"usernames": ["nasa", "spez"], "userContent": "profile"})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["username"], item["totalKarma"], item["createdAt"])
```

No code needed for the rest: schedule runs, send results to Google Sheets, Make, Zapier, n8n, Slack or a webhook from the **Integrations** tab, or let AI agents call the Actor through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp).

### FAQ

**Do I need a Reddit account, cookies or an API key?**
No. The scraper reads only what Reddit shows to visitors who are not logged in, so there is nothing to log in with, no session cookie to paste and no app to register.

**Does it still work after Reddit's RSS shutdown?**
Yes. Nothing here depends on Reddit's RSS feeds, which Reddit ended on 13 November 2026.

**How far back does a user's history go?**
Reddit lists about 1,000 items per profile listing, newest first. With **Max posts and comments per user** at `0`, the scraper also reads the user's top, controversial and hot lists over each period, each item once, which reaches older posts and comments.

**What about users who hide their history, or suspended and deleted accounts?**
A user who hides their posts and comments still gives their profile item. A suspended or deleted account gives nothing, is named in the log and the run's status message, and costs nothing.

**Why is a profile's `createdAt` sometimes midnight?**
Reddit sometimes shows only the day an account was created (its cake day), not the time. The field then holds that day at midnight UTC.

**What happens if my run has a short timeout?**
The scraper stops a little before the timeout, keeps everything saved so far and ends as Succeeded, with a message saying how many results it saved. Raise the timeout to get more.

**Is it legal to scrape Reddit users?**
It reads public data only, but usernames, profiles and what people write are personal data in many places (for example under the GDPR or the CCPA), and Reddit's terms apply to how you collect and use them. You are responsible for using the data lawfully for your purpose and in your jurisdiction.

### Other scrapers by Social Scrapers

| Scraper | What it gets |
| --- | --- |
| [TikTok API](https://apify.com/socialscrapers/tiktok-api) | Profiles, Videos and Comments |
| [TikTok Comments Scraper](https://apify.com/socialscrapers/tiktok-comments-scraper) | Comments, Replies and Likes |
| [TikTok Hashtag Scraper](https://apify.com/socialscrapers/tiktok-hashtag-scraper) | Top Videos, Views and Likes |
| [TikTok Profile Scraper](https://apify.com/socialscrapers/tiktok-profile-scraper) | Followers, Bio, Stats and Videos |
| [TikTok Scraper](https://apify.com/socialscrapers/tiktok-scraper) | Videos, Profiles, Hashtags and Comments |
| [TikTok Sound Scraper](https://apify.com/socialscrapers/tiktok-sound-scraper) | Videos Using a Sound and Music Info |
| [TikTok Video Scraper](https://apify.com/socialscrapers/tiktok-video-scraper) | Views, Likes, Captions and Comments |
| [Instagram API](https://apify.com/socialscrapers/instagram-api) | Profiles, Posts, Reels, Comments and Hashtags |
| [Instagram Comments Scraper](https://apify.com/socialscrapers/instagram-comments-scraper) | Comments, Likes and Reply Counts |
| [Instagram Hashtag Scraper](https://apify.com/socialscrapers/instagram-hashtag-scraper) | Reels and Keyword Search |
| [Instagram Post Details Scraper](https://apify.com/socialscrapers/instagram-post-details-scraper) | Likes, Comments, Views and Media |
| [Instagram Post Scraper](https://apify.com/socialscrapers/instagram-post-scraper) | Posts, Reels and Comments |
| [Instagram Profile Scraper](https://apify.com/socialscrapers/instagram-profile-scraper) | Followers, Bio, Posts and Reels |
| [Instagram Reels Scraper](https://apify.com/socialscrapers/instagram-reels-scraper) | Reels, Plays, Likes and Comments |
| [Instagram Reels Transcript Scraper](https://apify.com/socialscrapers/instagram-reels-transcript-scraper) | Speech to Text and Captions |
| [Instagram Scraper](https://apify.com/socialscrapers/instagram-scraper) | Posts, Profiles, Reels, Comments and Hashtags |
| [YouTube API](https://apify.com/socialscrapers/youtube-api) | Videos, Transcripts, Search, Channels and Comments |
| [YouTube Channel Scraper](https://apify.com/socialscrapers/youtube-channel-scraper) | Videos, Shorts, Subscribers and About |
| [YouTube Comments Scraper](https://apify.com/socialscrapers/youtube-comments-scraper) | Comments, Replies and Likes |
| [YouTube Scraper](https://apify.com/socialscrapers/youtube-scraper) | Videos, Shorts, Channels and Comments |
| [YouTube Search Scraper](https://apify.com/socialscrapers/youtube-search-scraper) | Videos, Channels, Views and Filters |
| [YouTube Shorts Scraper](https://apify.com/socialscrapers/youtube-shorts-scraper) | Shorts, Views, Likes and Search |
| [YouTube Transcript Scraper](https://apify.com/socialscrapers/youtube-transcript-scraper) | Subtitles, Captions and SRT |
| [YouTube Video Details Scraper](https://apify.com/socialscrapers/youtube-video-details-scraper) | Stats, Subtitles and Comments |
| [Facebook Ads Library Scraper](https://apify.com/socialscrapers/facebook-ads-library-scraper) | Meta Ad Library and Spend |
| [Facebook Comments Scraper](https://apify.com/socialscrapers/facebook-comments-scraper) | Posts, Reels, Videos and Replies |
| [Facebook Groups Scraper](https://apify.com/socialscrapers/facebook-groups-scraper) | Public Group Posts and Reactions |
| [Facebook Marketplace Scraper](https://apify.com/socialscrapers/facebook-marketplace-scraper) | Prices, Locations and Sellers |
| [Facebook Page Contact Info Scraper](https://apify.com/socialscrapers/facebook-page-contact-scraper) | Email, Phone and WhatsApp |
| [Facebook Posts Scraper](https://apify.com/socialscrapers/facebook-profile-posts-scraper) | Pages, Profiles and Timelines |
| [Facebook Pages Scraper](https://apify.com/socialscrapers/facebook-profile-scraper) | Profiles, Contact Info and Reviews |
| [Facebook Reels Scraper](https://apify.com/socialscrapers/facebook-reels-scraper) | Reels, Videos, Plays and Captions |
| [X (Twitter) Profile Scraper](https://apify.com/socialscrapers/x-profile-scraper) | Followers, Bio and Tweets |
| [X (Twitter) Tweet Scraper](https://apify.com/socialscrapers/x-tweet-scraper) | Latest Posts by Profile |
| [Threads Profile Scraper](https://apify.com/socialscrapers/threads-profile-scraper) | Followers, Bio, Links and Posts |
| [Threads Replies Scraper](https://apify.com/socialscrapers/threads-replies-scraper) | Comments, Authors, Likes and Media |
| [Threads Scraper](https://apify.com/socialscrapers/threads-scraper) | Posts, Profiles, Replies and Search |
| [Threads Search Scraper](https://apify.com/socialscrapers/threads-search-scraper) | Keywords, Hashtags, Top and Recent Posts |
| [Reddit Comments Scraper](https://apify.com/socialscrapers/reddit-comments-scraper) | Threads, Replies, Votes and Authors |
| [Reddit Scraper](https://apify.com/socialscrapers/reddit-scraper) | Posts, Comments, Subreddits, Users and Search |
| [Reddit Search Scraper](https://apify.com/socialscrapers/reddit-search-scraper) | Posts by Keyword, Subreddit and Date |
| [Subreddit Scraper](https://apify.com/socialscrapers/subreddit-scraper) | Hot, New and Top Posts with Comments |
| [Quora Scraper](https://apify.com/socialscrapers/quora-scraper) | Answers, Questions, Profiles and Topic Search |
| [LinkedIn Ad Library Scraper](https://apify.com/socialscrapers/linkedin-ad-library-scraper) | Ads, Advertisers and Impressions |
| [LinkedIn Job Search Scraper](https://apify.com/socialscrapers/linkedin-job-search-scraper) | Filters, Salaries and New Jobs |
| [LinkedIn Jobs Scraper](https://apify.com/socialscrapers/linkedin-jobs-scraper) | Job Listings, Salaries and Companies |
| [Google Maps Email Extractor](https://apify.com/socialscrapers/google-maps-email-extractor) | Emails, Phones and Social Links |
| [Google Maps Scraper](https://apify.com/socialscrapers/google-maps-scraper) | Places, Phones, Websites, Ratings and Hours |
| [Google News Scraper](https://apify.com/socialscrapers/google-news-scraper) | Headlines, Articles and Search |
| [Google Ads Transparency Scraper](https://apify.com/socialscrapers/google-ads-transparency-scraper) | Ad Creatives and Advertisers |
| [Amazon Product Scraper](https://apify.com/socialscrapers/amazon-product-scraper) | Search Results, Prices, Ratings, ASINs |
| [Indeed Jobs Scraper](https://apify.com/socialscrapers/indeed-jobs-scraper) | Salaries, Full Descriptions, Company Data |
| [Contact Details Scraper](https://apify.com/socialscrapers/contact-details-scraper) | Emails, Phones and Social Links |
| [Telegram Channel Scraper](https://apify.com/socialscrapers/telegram-channel-scraper) | Posts, Views and Media |
| [Doximity Scraper](https://apify.com/socialscrapers/doximity-physician-scraper) | Physician Profiles and Doctor Directory |
| [KevinMD Scraper](https://apify.com/socialscrapers/kevinmd-articles-scraper) | Physician Articles and Author Specialties |
| [Op-Med Scraper](https://apify.com/socialscrapers/opmed-articles-scraper) | Physician Essays and Doctor Profiles |
| [Career Site Jobs Scraper](https://apify.com/socialscrapers/career-site-jobs-scraper) | Greenhouse, Lever, Ashby and Workday |
| [Google Trends Scraper](https://apify.com/socialscrapers/google-trends-scraper) | Interest Over Time, Regions and Queries |

# Actor input Schema

## `usernames` (type: `array`):

One user per line: <code>spez</code>, <code>u/spez</code>, <code>@spez</code> or <code>https://www.reddit.com/user/spez/</code>. A link to a profile's posts or comments page (<code>/user/spez/submitted/</code>, <code>/user/spez/comments/</code>) reads that page. Share links from the Reddit app work too.

## `userContent` (type: `string`):

<b>Posts and comments</b> (the user's whole history, newest first), <b>Posts only</b>, <b>Comments only</b>, or <b>Profile details only</b> (one profile item per user, nothing else).

## `maxItemsPerSource` (type: `integer`):

Most posts and comments to save for each user, newest first. 0 = as many as Reddit shows: once the newest-first list ends (Reddit stops each near 1,000 items), the user's other lists (top, controversial and hot over each period) are read too, each item once. Example: 500.

## `includeProfile` (type: `boolean`):

One profile item per user before their posts and comments: post, comment and total karma, account age, display name, bio, avatar and banner, and the verified, moderator, Premium, employee and bot badges.

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

Keep posts Reddit marks NSFW (18+). Turn off to leave them out; nothing is charged for a post left out.

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

Overall cap on results (profiles, posts and comments) for the whole run. The run stops once it is reached. Leave empty (or 0) for no cap. Example: 10000.

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

Keep the default: Apify Proxy with the RESIDENTIAL group. Reddit refuses most datacenter IPs: with another Apify Proxy group, sessions Reddit refuses are retried on RESIDENTIAL (same country).

## Actor input object example

```json
{
  "usernames": [
    "nasa"
  ],
  "userContent": "overview",
  "maxItemsPerSource": 20,
  "includeProfile": true,
  "includeNsfw": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "usernames": [
        "nasa"
    ],
    "maxItemsPerSource": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("socialscrapers/reddit-user-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 = {
    "usernames": ["nasa"],
    "maxItemsPerSource": 20,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("socialscrapers/reddit-user-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 '{
  "usernames": [
    "nasa"
  ],
  "maxItemsPerSource": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call socialscrapers/reddit-user-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,socialscrapers/reddit-user-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/YIJQ8AC5fRySc4xzk/builds/W1ItDyNdFenyl2MSs/openapi.json
