# Reddit User Karma & Post History Extractor (`xyrelith-data/reddit-user-karma-and-post-history-extractor`) Actor

Look up Reddit accounts by username for archive-wide post/comment/total karma, archived post and comment counts, first/last activity dates, and their public post and comment history with 30+ filters. No API key, login or proxy setup required.

- **URL**: https://apify.com/xyrelith-data/reddit-user-karma-and-post-history-extractor.md
- **Developed by:** [Xyrelith Data](https://apify.com/xyrelith-data) (community)
- **Categories:** Social media, Automation, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 Karma & Post History Extractor

Give this actor a list of Reddit usernames and it returns each account's public profile summary — post karma, comment karma, total karma, archived post/comment counts, and first/last activity dates — together with their post and comment history, filtered by subreddit, keyword, score, date window, post type, flair and 20+ other criteria. No Reddit API key, login or proxy setup is required.

### Data source

Reddit's anonymous `.json` endpoints now return HTTP 403, and the www HTML is JavaScript-challenged from datacenter IPs. The actor therefore reads the public Reddit archive through **Arctic Shift** (`arctic-shift.photon-reddit.com`), which mirrors Reddit posts, comments and account aggregates over a no-key HTTP API.

- **Primary:** Arctic Shift `/api/posts/search`, `/api/comments/search`, `/api/users/search`, `/api/posts/ids`, `/api/comments/ids`.
- **Fallback:** Reddit's public Atom feed (`/user/<name>/.rss`) and profile HTML where reachable. Feed IDs are enriched through the archive ID endpoints when available, which restores scores for recent items.
- Reddit `.json` is never called.

#### Freshness and fallback limits

- Arctic Shift archives an item shortly after it is posted. Its `score` and `num_comments` can read 0 or 1 until the archive re-crawls the item (~36 hours). The `score_captured_at` field on each post/comment shows when the archived score was captured.
- Account karma and archived post/comment counts come from Arctic's `/api/users/search` aggregate. That aggregate is refreshed infrequently; each profile record carries `post_stats_updated_at`, `comment_stats_updated_at` and `karma_updated_at` so you can see how current the numbers are.
- The Atom fallback returns at most the most recent ~100 items. The feed itself has no score or karma values; scores are restored only when the archive ID lookup succeeds. Reddit rate-limits or blocks the feed from some networks (429/503); the actor retries with backoff (honouring `Retry-After`/`X-RateLimit-Reset`) before giving up. It is best effort, not a full-history replacement.
- Profile HTML is often a JavaScript challenge or WAF block. When it is reachable, it fills account creation date, avatar, bio and account flags; otherwise those fields are omitted.

### What this actor does

- **Profile summary** — archive-wide post/comment/total karma, archived post/comment counts, first/last post, comment and overall activity dates, plus account flags/avatar/bio when the profile page is reachable
- **Post and comment history** — newest first, oldest first, or top-scored within the fetched window
- **Overview mode** — posts and comments merged into one chronological feed
- **Date windows and filters** — subreddit, keyword, score range, post type, flair, domain, awards, content length, comment counts, upvote ratio, and exclusion toggles for stickied/removed/crossposted/spoiler/locked/archived posts
- **Flexible username input** — bare usernames, `u/name`, profile URLs, or comma-separated names
- **Pagination** — walks the archive by creation-time cursor until the requested caps or source exhaustion
- **Legacy inputs** — old saved tasks using `username`, `section`, `sortBy`, `maxPost`, `includeComments`, `minPostScore`, `excludeNsfwPosts`, `maxPostAgeDays`, `subreddit` or `keywords` keep working (mapped in code)
- Empty fields are omitted from every record — no `null`, `""`, `[]` or `{}` values

### Output: profile record

One record per username (`dataType: "user_profile"`) when "Include profile info record" is on:

- `username`, `user_id`, `profile_url`
- `post_karma`, `comment_karma`, `total_karma`
- `archived_posts`, `archived_comments` — archive-wide counts, not just the rows in this dataset
- `first_post_at`, `last_post_at`, `first_comment_at`, `last_comment_at`, `first_activity_at`, `last_activity_at` (+ matching `*_utc` epochs)
- `post_stats_updated_at`, `comment_stats_updated_at`, `karma_updated_at`
- `created_at` / `created_utc` — account creation, when the profile page exposes it
- `is_gold` (Reddit Premium), `is_mod`, `is_employee`, `has_verified_email`, `verified`, `accept_followers`, `hide_from_robots` — when exposed by the profile page
- `icon_img` (avatar), `snoovatar_img`, `snoovatar_size`, `user_subreddit` (bio, banner, display name, subscribers, NSFW flag, type, URL)
- `crawled_at`, `source`

### Output: post record

One record per post (`dataType: "post"`) returned by the `posts` or `overview` sections:

- `subreddit`, `subreddit_prefixed`, `subreddit_id`, `subreddit_subscribers`, `subreddit_type`
- `post_id`, `post_name`, `title`
- `author`, `author_meta` — `{username, id, flair, flair_background_color, flair_text_color, flair_css_class, flair_richtext, flair_template_id, flair_type, is_premium, is_blocked, has_patreon_flair}`
- `content`, `content_html` — self-post body
- `content_url`, `url`, `permalink`, `url_overridden_by_dest`, `domain`
- `post_hint`, `is_self`, `post_type`, `media_type`
- `score`, `ups`, `downs`, `upvote_ratio`, `num_comments`, `num_crossposts`, `num_duplicates`
- `link_flair`, `link_flair_background_color`, `link_flair_text_color`, `link_flair_css_class`, `link_flair_template_id`, `link_flair_type`, `link_flair_richtext`
- `thumbnail_url`, `thumbnail_width`, `thumbnail_height`
- `created_utc`, `created_at`, `edited`, `edited_at`
- `is_stickied`, `is_locked`, `is_archived`, `is_pinned`, `is_nsfw`, `is_spoiler`, `is_original_content`, `is_crosspost`, `crosspost_parent_id`
- `is_crosspostable`, `is_meta`, `is_reddit_media_domain`, `is_robot_indexable`, `is_created_from_ads_ui`
- `allow_live_comments`, `contest_mode`, `hide_score`, `content_categories`, `media_only`, `quarantine`, `suggested_sort`, `no_follow`, `send_replies`
- `gilded`, `total_awards_received`, `awards` — `[{name, count, coin_price, icon_url}]`
- `removed_by_category`, `distinguished`, `hidden`
- `has_media`, `images`, `gallery_images`, `gallery_count`
- `video_url`, `video_duration_seconds`, `video_width`, `video_height`, `video_has_audio`, `video_bitrate_kbps`
- `poll_data` — poll options, vote counts and end time
- `embed_provider`, `embed_type`, `embed_title`, `embed_author_name`, `embed_thumbnail_url`, `embed_html`, `embed_width`, `embed_height`
- `search_term` — the keyword filter that matched, when set
- `score_captured_at` — when the archived score was captured
- `crawled_at`, `source` — `arctic_shift`, `arctic_ids`, `rss` or `username_only`

### Output: comment record

One record per comment (`dataType: "comment"`) returned by the `comments` or `overview` sections:

- `post_id`, `post_url`, `post_title`, `post_author`, `link_id`
- `comment_id`, `comment_name`
- `author`, `author_meta`
- `body`, `body_html`
- `score`, `ups`, `downs`, `score_hidden`, `controversiality`
- `subreddit`, `subreddit_prefixed`, `subreddit_id`, `subreddit_type`
- `created_utc`, `created_at`, `edited`, `edited_at`
- `depth`, `parent_id`, `parent_kind`, `is_op`, `comment_type`
- `is_stickied`, `is_locked`, `distinguished`, `is_nsfw`, `collapsed`, `collapsed_reason`, `collapsed_reason_code`, `collapsed_because_crowd_control`
- `can_gild`, `no_follow`, `send_replies`, `unrepliable_reason`
- `gilded`, `total_awards_received`, `awards`
- `removed_by_category`, `permalink`
- `search_term` — the keyword filter that matched, when set
- `score_captured_at`
- `crawled_at`, `source`

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `usernames` | array | – | Usernames to scrape — bare (`spez`), `u/`-prefixed, profile URLs, or comma-separated names |
| `includeProfileInfo` | boolean | `true` | Emit the profile summary record |
| `sections` | array | `["posts"]` | `overview` (posts + comments), `posts`, `comments` |
| `maxPosts` | integer | `100` | Max matching posts per user (1–5,000) |
| `maxComments` | integer | `100` | Max matching comments per user (1–5,000) |
| `sort` | select | `newest` | `newest`, `oldest`, or `top` (score-ranked within the fetched items) |
| `timeFilter` | select | `all` | Created within the past hour/day/week/month/year |
| `includeNSFW` | boolean | `false` | Include 18+ posts and comments on 18+ posts |
| `onlyWithFlair` | boolean | `false` | Keep only posts that have a link flair |
| `subreddits` | array | – | Restrict to posts/comments made in these subreddits |
| `keyword` | string | – | Keep only posts/comments whose title, self-text or body contains this text |
| `titleContains` | string | – | Keep only posts whose title contains this text |
| `contentContains` | string | – | Keep only self posts whose body contains this text |
| `flairContains` | string | – | Keep only posts whose link flair contains this text |
| `authorFlairContains` | string | – | Keep only posts whose author flair contains this text |
| `domain` | string | – | Keep only posts whose link domain contains this text, e.g. `youtube.com` |
| `distinguished` | select | – | Only `moderator`, `admin`, `special`, or `none` (regular) posts |
| `postType` | select | – | Only `self`, `link`, `image`, `video`, `gallery` or `poll` posts |
| `minScore` / `maxScore` | integer | – | Keep only posts/comments with a score in this range |
| `minPostComments` / `maxPostComments` | integer | – | Keep only posts whose own comment count is in this range |
| `minUpvoteRatio` | number | – | Keep only posts with an upvote ratio at or above this value (0–1) |
| `minAwards` | integer | – | Keep only posts with at least this many total awards |
| `minContentLength` / `maxContentLength` | integer | – | Keep only self posts whose body length (characters) is in this range |
| `onlyOriginalContent` | boolean | `false` | Keep only posts tagged as original content |
| `excludeStickied` | boolean | `false` | Drop stickied/pinned posts |
| `excludeRemoved` | boolean | `false` | Drop removed/deleted posts |
| `excludeCrossposts` | boolean | `false` | Drop crossposted posts |
| `excludeSpoilers` | boolean | `false` | Drop spoiler-tagged posts |
| `excludeLocked` | boolean | `false` | Drop posts with comments locked by a moderator |
| `excludeArchived` | boolean | `false` | Drop archived posts |
| `excludeDeletedAuthor` | boolean | `false` | Drop posts whose author account was deleted |
| `excludeKeywords` | array | – | Drop posts whose title/body/flair contains any of these terms |
| `postedAfter` / `postedBefore` | date | – | Keep only items created within this date range (UTC) |

#### Example: profile summary and recent overview

```json
{
  "usernames": ["spez"],
  "includeProfileInfo": true,
  "sections": ["overview"],
  "maxPosts": 50,
  "maxComments": 50
}
```

#### Example: recent posts in selected subreddits

```json
{
  "usernames": ["u/example_user"],
  "sections": ["posts"],
  "sort": "newest",
  "maxPosts": 200,
  "subreddits": ["pics", "AskReddit"],
  "keyword": "photo",
  "excludeStickied": true
}
```

#### Example: high-scoring comments from the past year

```json
{
  "usernames": ["spez"],
  "includeProfileInfo": false,
  "sections": ["comments"],
  "timeFilter": "year",
  "maxComments": 500,
  "minScore": 50
}
```

### Use cases

- **User research** — analyze an account's posting patterns, engagement and karma
- **Account vetting** — check activity dates, karma and history before trusting a recommendation or partnership
- **Content discovery** — pull a creator's or influencer's posts by subreddit, keyword or score
- **Moderation research** — audit a user's post history across specific communities
- **Behavioral and social research** — bulk-export public user history for academic or market research
- **Profile monitoring** — track a user's public activity over time on a schedule

### FAQ

**Do I need a Reddit API key or account login?**
No — the actor reads the public Reddit archive and public profile surfaces without credentials.

**Do I need to configure a proxy?**
No — there is no proxy setting to configure.

**Why do some scores read 0 or 1?**
Arctic Shift archives an item at posting time and updates score/comment counts on a later crawl (~36 hours). Check `score_captured_at`; the item's score becomes accurate after that re-crawl.

**Why are karma totals different from the live profile?**
Arctic's account aggregate is refreshed infrequently and may lag the live profile. `karma_updated_at` shows the aggregate date. The actor never invents a fresher number.

**What happens when the archive is rate-limited?**
The actor retries with backoff (and a smaller page size) and, if the search still fails, falls back to the public Atom feed (most recent ~100 items; scores only where the archive ID lookup succeeds). The run status message says which source was used.

**Does it include private activity like upvotes or saved posts?**
No — only public posts and comments are available. Voting history, saved items and hidden posts are private to the account owner.

**What happens for suspended or nonexistent usernames?**
The run completes and reports that no records were found for that username.

**Is history capped?**
The actor pages through the archive by creation-time cursor until `maxPosts`/`maxComments` or source exhaustion. Reddit's Atom fallback is capped at the most recent ~100 items by Reddit itself.

**Can I filter to a date range?**
Yes — use `postedAfter` / `postedBefore` (UTC dates) or `timeFilter`. The window is passed to the archive, so pagination stops at the boundary.

**Is this actor affiliated with Reddit?**
No — this is an independent, third-party actor reading public Reddit archive data. It is not built, endorsed or maintained by Reddit, Inc.

# Actor input Schema

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

List of Reddit usernames to scrape. Accepts bare names (spez), u/ prefixed (u/spez) or profile URLs.

## `includeProfileInfo` (type: `boolean`):

Emit a user_profile record with archive-wide post/comment/total karma, archived post/comment counts, first/last activity dates, and any profile fields the public profile page exposes.

## `sections` (type: `array`):

Which parts of the user's history to scrape. Overview returns posts and comments merged newest-first (or by the selected sort).

## `maxPosts` (type: `integer`):

Maximum number of matching posts to emit per user.

## `maxComments` (type: `integer`):

Maximum number of matching comments to emit per user.

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

Newest or oldest first by creation time. Top ranks the fetched items by score (the archive itself only sorts by date, so this is a ranking within the most recent items up to the cap).

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

Only keep posts/comments created within this rolling window (UTC). Applied as a date window for every sort; an explicit 'postedAfter' later than the window wins.

## `includeNSFW` (type: `boolean`):

Include NSFW posts in the user's history.

## `onlyWithFlair` (type: `boolean`):

Keep only posts that have a link flair set. Has no effect on comments (comments don't carry link flair).

## `subreddits` (type: `array`):

Only keep posts/comments made in these subreddits (case-insensitive). Accepts bare names (python), r/ prefixed (r/python), or subreddit URLs. Leave empty to include every subreddit in the user's history.

## `keyword` (type: `string`):

Only keep posts/comments whose title, self-text or comment body contains this text (case-insensitive substring match). Leave empty to disable.

## `titleContains` (type: `string`):

Only keep posts whose title contains this text (case-insensitive substring match). Has no effect on comments. Leave empty to keep all titles.

## `contentContains` (type: `string`):

Only keep self (text) posts whose body contains this text (case-insensitive substring match). Link/image/video posts have no body text and are excluded when this is set. Has no effect on comments. Leave empty to keep all posts.

## `flairContains` (type: `string`):

Only keep posts whose link flair text contains this text (case-insensitive substring match). Has no effect on comments. Leave empty to keep all flairs.

## `authorFlairContains` (type: `string`):

Only keep posts whose author flair text contains this text (case-insensitive substring match). Has no effect on comments. Leave empty to keep all.

## `domain` (type: `string`):

Only keep posts whose link domain contains this text (case-insensitive, e.g. 'youtube.com' or 'self.python'). Has no effect on comments. Leave empty to keep all domains.

## `distinguished` (type: `string`):

Only keep posts distinguished by Reddit as moderator, admin or special (e.g. Reddit-team) posts, or only regular (non-distinguished) posts. Has no effect on comments. Leave unset to keep all posts.

## `minAwards` (type: `integer`):

Only keep posts with at least this many total awards. Has no effect on comments. Leave unset to keep all posts.

## `onlyOriginalContent` (type: `boolean`):

When enabled, only posts the author tagged as original content are kept. Has no effect on comments.

## `excludeArchived` (type: `boolean`):

When enabled, posts that Reddit has archived (locked from further voting/commenting after 6 months) are dropped from the results. Has no effect on comments.

## `excludeKeywords` (type: `array`):

Drop posts whose title, self-text body or flair contains any of these keywords or phrases (case-insensitive substring match) — useful for filtering out megathreads, giveaways or spam boilerplate. Has no effect on comments. Leave empty to keep all posts.

## `minContentLength` (type: `integer`):

Only keep self (text) posts whose body is at least this many characters long. Link/image/video posts have no body and are excluded when this is set. Has no effect on comments. Leave unset to keep all lengths.

## `maxContentLength` (type: `integer`):

Only keep self (text) posts whose body is at most this many characters long. Has no effect on comments. Leave unset to keep all lengths.

## `postType` (type: `string`):

Keep only posts of the selected content type. Leave unset to keep all types. Has no effect on comments.

## `minScore` (type: `integer`):

Only keep posts/comments with a score at or above this value. Leave unset to keep all scores.

## `maxScore` (type: `integer`):

Only keep posts/comments with a score at or below this value. Useful for finding overlooked/low-visibility items. Leave unset to keep all scores.

## `minPostComments` (type: `integer`):

Only keep posts that have at least this many comments (the post's own comment count — not to be confused with 'Maximum comments per user' above, which caps how many comment records are scraped). Has no effect on comments.

## `maxPostComments` (type: `integer`):

Only keep posts that have at most this many comments. Useful for finding under-discussed posts. Has no effect on comments.

## `minUpvoteRatio` (type: `number`):

Only keep posts whose upvote ratio (fraction of votes that are upvotes, 0-1) is at or above this value. Useful for filtering out controversial/divisive posts. Has no effect on comments.

## `excludeStickied` (type: `boolean`):

When enabled, posts pinned/stickied in their community are dropped from the results.

## `excludeRemoved` (type: `boolean`):

When enabled, posts removed by a moderator, Reddit, or deleted by their author (marker: removed_by_category) are dropped from the results.

## `excludeCrossposts` (type: `boolean`):

When enabled, posts that are crossposts from another subreddit are dropped, keeping only the user's original submissions.

## `excludeSpoilers` (type: `boolean`):

When enabled, posts marked as a spoiler by their author are dropped from the results.

## `excludeLocked` (type: `boolean`):

When enabled, posts with comments locked by a moderator are dropped from the results.

## `excludeDeletedAuthor` (type: `boolean`):

When enabled, posts whose author account was deleted (shown as \[deleted]/\[removed]) are dropped from the results.

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

Only keep items created on or after this date (UTC).

## `postedBefore` (type: `string`):

Only keep items created on or before this date (interpreted as the end of that day, UTC).

## Actor input object example

```json
{
  "usernames": [
    "spez",
    "u/example_user",
    "https://www.reddit.com/user/another_user/"
  ],
  "includeProfileInfo": true,
  "sections": [
    "posts",
    "comments"
  ],
  "maxPosts": 100,
  "maxComments": 100,
  "sort": "newest",
  "timeFilter": "all",
  "includeNSFW": false,
  "onlyWithFlair": false,
  "subreddits": [
    "AskReddit",
    "r/technology"
  ],
  "keyword": "climate",
  "titleContains": "launch",
  "contentContains": "tutorial",
  "flairContains": "Discussion",
  "authorFlairContains": "Moderator",
  "domain": "youtube.com",
  "minAwards": 1,
  "onlyOriginalContent": false,
  "excludeArchived": false,
  "excludeKeywords": [
    "megathread"
  ],
  "minContentLength": 100,
  "maxContentLength": 5000,
  "minScore": 10,
  "maxScore": 1000,
  "minPostComments": 5,
  "maxPostComments": 500,
  "minUpvoteRatio": 0.8,
  "excludeStickied": false,
  "excludeRemoved": false,
  "excludeCrossposts": false,
  "excludeSpoilers": false,
  "excludeLocked": false,
  "excludeDeletedAuthor": false,
  "postedAfter": "2025-01-01",
  "postedBefore": "2025-12-31"
}
```

# Actor output Schema

## `profilePostAndCommentRecords` (type: `string`):

Dataset with one user_profile record per requested username and one record per scraped post/comment. Records are distinguished by the dataType field (user_profile, post or comment).

# 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": [
        "spez"
    ],
    "includeProfileInfo": true,
    "sections": [
        "posts"
    ],
    "maxPosts": 3,
    "maxComments": 3,
    "sort": "newest",
    "timeFilter": "all",
    "includeNSFW": false,
    "onlyWithFlair": false,
    "onlyOriginalContent": false,
    "excludeArchived": false,
    "excludeStickied": false,
    "excludeRemoved": false,
    "excludeCrossposts": false,
    "excludeSpoilers": false,
    "excludeLocked": false,
    "excludeDeletedAuthor": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("xyrelith-data/reddit-user-karma-and-post-history-extractor").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": ["spez"],
    "includeProfileInfo": True,
    "sections": ["posts"],
    "maxPosts": 3,
    "maxComments": 3,
    "sort": "newest",
    "timeFilter": "all",
    "includeNSFW": False,
    "onlyWithFlair": False,
    "onlyOriginalContent": False,
    "excludeArchived": False,
    "excludeStickied": False,
    "excludeRemoved": False,
    "excludeCrossposts": False,
    "excludeSpoilers": False,
    "excludeLocked": False,
    "excludeDeletedAuthor": False,
}

# Run the Actor and wait for it to finish
run = client.actor("xyrelith-data/reddit-user-karma-and-post-history-extractor").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": [
    "spez"
  ],
  "includeProfileInfo": true,
  "sections": [
    "posts"
  ],
  "maxPosts": 3,
  "maxComments": 3,
  "sort": "newest",
  "timeFilter": "all",
  "includeNSFW": false,
  "onlyWithFlair": false,
  "onlyOriginalContent": false,
  "excludeArchived": false,
  "excludeStickied": false,
  "excludeRemoved": false,
  "excludeCrossposts": false,
  "excludeSpoilers": false,
  "excludeLocked": false,
  "excludeDeletedAuthor": false
}' |
apify call xyrelith-data/reddit-user-karma-and-post-history-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,xyrelith-data/reddit-user-karma-and-post-history-extractor"
        }
    }
}
```

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/dT3hCTn5EGjdCyIWb/builds/YDxWZQ5NFS5bB9C71/openapi.json
