{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit User Karma & Post History Extractor",
    "description": "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.",
    "version": "2.0",
    "x-build-id": "YDxWZQ5NFS5bB9C71"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xyrelith-data~reddit-user-karma-and-post-history-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xyrelith-data-reddit-user-karma-and-post-history-extractor",
        "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/xyrelith-data~reddit-user-karma-and-post-history-extractor/runs": {
      "post": {
        "operationId": "runs-sync-xyrelith-data-reddit-user-karma-and-post-history-extractor",
        "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/xyrelith-data~reddit-user-karma-and-post-history-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-xyrelith-data-reddit-user-karma-and-post-history-extractor",
        "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": {
          "usernames": {
            "title": "Reddit Usernames",
            "minItems": 1,
            "type": "array",
            "description": "List of Reddit usernames to scrape. Accepts bare names (spez), u/ prefixed (u/spez) or profile URLs.",
            "items": {
              "type": "string"
            }
          },
          "includeProfileInfo": {
            "title": "Include profile info record",
            "type": "boolean",
            "description": "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.",
            "default": true
          },
          "sections": {
            "title": "Profile sections",
            "type": "array",
            "description": "Which parts of the user's history to scrape. Overview returns posts and comments merged newest-first (or by the selected sort).",
            "items": {
              "type": "string",
              "enum": [
                "overview",
                "posts",
                "comments"
              ],
              "enumTitles": [
                "Overview (posts + comments)",
                "Posts",
                "Comments"
              ]
            },
            "default": [
              "posts"
            ]
          },
          "maxPosts": {
            "title": "Maximum posts per user",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of matching posts to emit per user.",
            "default": 100
          },
          "maxComments": {
            "title": "Maximum comments per user",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of matching comments to emit per user.",
            "default": 100
          },
          "sort": {
            "title": "Sort history by",
            "enum": [
              "newest",
              "oldest",
              "top"
            ],
            "type": "string",
            "description": "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).",
            "default": "newest"
          },
          "timeFilter": {
            "title": "Created within the last",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "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.",
            "default": "all"
          },
          "includeNSFW": {
            "title": "Include NSFW (18+) content",
            "type": "boolean",
            "description": "Include NSFW posts in the user's history.",
            "default": false
          },
          "onlyWithFlair": {
            "title": "Only posts with flair",
            "type": "boolean",
            "description": "Keep only posts that have a link flair set. Has no effect on comments (comments don't carry link flair).",
            "default": false
          },
          "subreddits": {
            "title": "Restrict to subreddits",
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string"
            }
          },
          "keyword": {
            "title": "Keyword filter",
            "type": "string",
            "description": "Only keep posts/comments whose title, self-text or comment body contains this text (case-insensitive substring match). Leave empty to disable."
          },
          "titleContains": {
            "title": "Title contains keyword",
            "type": "string",
            "description": "Only keep posts whose title contains this text (case-insensitive substring match). Has no effect on comments. Leave empty to keep all titles."
          },
          "contentContains": {
            "title": "Post text contains keyword",
            "type": "string",
            "description": "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": {
            "title": "Flair contains keyword",
            "type": "string",
            "description": "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": {
            "title": "Author flair contains keyword",
            "type": "string",
            "description": "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": {
            "title": "Domain contains",
            "type": "string",
            "description": "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": {
            "title": "Distinguished (official) posts only",
            "enum": [
              "moderator",
              "admin",
              "special",
              "none"
            ],
            "type": "string",
            "description": "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": {
            "title": "Minimum awards received",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep posts with at least this many total awards. Has no effect on comments. Leave unset to keep all posts."
          },
          "onlyOriginalContent": {
            "title": "Only original content (OC) posts",
            "type": "boolean",
            "description": "When enabled, only posts the author tagged as original content are kept. Has no effect on comments.",
            "default": false
          },
          "excludeArchived": {
            "title": "Exclude archived posts",
            "type": "boolean",
            "description": "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.",
            "default": false
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string"
            }
          },
          "minContentLength": {
            "title": "Minimum post body length (characters)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "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": {
            "title": "Maximum post body length (characters)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "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": {
            "title": "Only posts of this type",
            "enum": [
              "self",
              "link",
              "image",
              "video",
              "gallery",
              "poll"
            ],
            "type": "string",
            "description": "Keep only posts of the selected content type. Leave unset to keep all types. Has no effect on comments."
          },
          "minScore": {
            "title": "Minimum score (upvotes minus downvotes)",
            "minimum": -1000000,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep posts/comments with a score at or above this value. Leave unset to keep all scores."
          },
          "maxScore": {
            "title": "Maximum score (upvotes minus downvotes)",
            "minimum": -1000000,
            "maximum": 1000000,
            "type": "integer",
            "description": "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": {
            "title": "Minimum comments on the post",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "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": {
            "title": "Maximum comments on the post",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep posts that have at most this many comments. Useful for finding under-discussed posts. Has no effect on comments."
          },
          "minUpvoteRatio": {
            "title": "Minimum upvote ratio",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "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": {
            "title": "Exclude stickied/pinned posts",
            "type": "boolean",
            "description": "When enabled, posts pinned/stickied in their community are dropped from the results.",
            "default": false
          },
          "excludeRemoved": {
            "title": "Exclude removed/deleted posts",
            "type": "boolean",
            "description": "When enabled, posts removed by a moderator, Reddit, or deleted by their author (marker: removed_by_category) are dropped from the results.",
            "default": false
          },
          "excludeCrossposts": {
            "title": "Exclude crossposts",
            "type": "boolean",
            "description": "When enabled, posts that are crossposts from another subreddit are dropped, keeping only the user's original submissions.",
            "default": false
          },
          "excludeSpoilers": {
            "title": "Exclude spoiler-tagged posts",
            "type": "boolean",
            "description": "When enabled, posts marked as a spoiler by their author are dropped from the results.",
            "default": false
          },
          "excludeLocked": {
            "title": "Exclude locked posts",
            "type": "boolean",
            "description": "When enabled, posts with comments locked by a moderator are dropped from the results.",
            "default": false
          },
          "excludeDeletedAuthor": {
            "title": "Exclude posts with a deleted author",
            "type": "boolean",
            "description": "When enabled, posts whose author account was deleted (shown as [deleted]/[removed]) are dropped from the results.",
            "default": false
          },
          "postedAfter": {
            "title": "Items created on or after (YYYY-MM-DD)",
            "type": "string",
            "description": "Only keep items created on or after this date (UTC)."
          },
          "postedBefore": {
            "title": "Items created on or before (YYYY-MM-DD)",
            "type": "string",
            "description": "Only keep items created on or before this date (interpreted as the end of that day, UTC)."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}