{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit User Scraper — Profile, Posts & Comments",
    "description": "Look up public Reddit user profiles in bulk and optionally collect each user's recent posts and comments. Usernames, u/name, @name, profile URLs or CSV in; one clean profile row per user out — karma, account age, verified/premium flags, avatar and status. No Reddit login or API key.",
    "version": "1.0",
    "x-build-id": "IL3c3mw3WLmM4mrty"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/coregent~reddit-user-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-coregent-reddit-user-scraper",
        "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/coregent~reddit-user-scraper/runs": {
      "post": {
        "operationId": "runs-sync-coregent-reddit-user-scraper",
        "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/coregent~reddit-user-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-coregent-reddit-user-scraper",
        "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": {
          "users": {
            "title": "Reddit users",
            "type": "array",
            "description": "Usernames or profile URLs, one per line. Every common form works: spez, u/spez, /u/spez, @spez, https://www.reddit.com/user/spez/ (old.reddit.com and new.reddit.com too). Case does not matter, and the same user named twice is looked up once.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "records": {
            "title": "Users with your own IDs",
            "type": "array",
            "description": "For joining results back to your own data: a JSON list of objects like {\"user\": \"spez\", \"externalId\": \"crm_123\"}. The externalId is copied onto the user's profile row and every activity row. \"username\" or \"url\" work in place of \"user\", and \"external_id\" in place of \"externalId\".",
            "default": []
          },
          "csvFile": {
            "title": "CSV file",
            "type": "string",
            "description": "Upload a CSV, or paste its text or an https link to it. Columns: user (required — username or profile URL) and external_id (optional). Common aliases such as username, url and id are recognised; a file with no header is read as one user per line. Maximum 5 MB.",
            "default": ""
          },
          "includePosts": {
            "title": "Include recent posts",
            "type": "boolean",
            "description": "Also collect each found user's recent public posts, one row per post. Off by default: a profile-only lookup is the fastest and cheapest mode. Posts are charged separately from profiles.",
            "default": false
          },
          "includeComments": {
            "title": "Include recent comments",
            "type": "boolean",
            "description": "Also collect each found user's recent public comments, one row per comment, with the post each one was made on. Off by default. Comments are charged separately from profiles.",
            "default": false
          },
          "maxPostsPerUser": {
            "title": "Max posts per user",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap per user when 'Include recent posts' is on. Reddit's own profile listings stop at roughly 1,000 items, so higher values are not accepted.",
            "default": 50
          },
          "maxCommentsPerUser": {
            "title": "Max comments per user",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap per user when 'Include recent comments' is on. Reddit's own profile listings stop at roughly 1,000 items.",
            "default": 50
          },
          "publishedAfter": {
            "title": "Activity published after",
            "type": "string",
            "description": "Keep only posts and comments newer than this. A date (2026-09-01), a full timestamp, or a relative window: 12h, 30d, 2w, 6m, 1y. With the default 'new' sort, a user's feed stops being read once it passes this date. Leave empty for no limit.",
            "default": ""
          },
          "subredditFilter": {
            "title": "Only these communities",
            "type": "array",
            "description": "Keep only activity in these subreddits (names, with or without r/). Case does not matter. Leave empty for all communities.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeNsfw": {
            "title": "Include NSFW activity",
            "type": "boolean",
            "description": "Keep NSFW posts. Off by default: a post Reddit marks as NSFW, or a post in a community marked NSFW, is dropped. An item whose flags the source does not show is kept.",
            "default": false
          },
          "maxUsers": {
            "title": "Max users",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "How many unique users this run looks up. Users beyond it are not looked up and get no row.",
            "default": 1000
          },
          "maxTotalActivityItems": {
            "title": "Max total activity items",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on post and comment rows across all users. The budget is shared fairly: each user gets an equal share of what remains when its activity starts. Reaching it stops activity only — every remaining profile is still looked up.",
            "default": 5000
          },
          "activitySort": {
            "title": "Activity sort",
            "enum": [
              "new",
              "top",
              "hot",
              "controversial"
            ],
            "type": "string",
            "description": "Order in which each user's posts and comments are read, and so which ones a per-user cap keeps. 'new' is newest first; 'top' and 'controversial' are all-time.",
            "default": "new"
          },
          "minActivityScore": {
            "title": "Minimum activity score",
            "type": "integer",
            "description": "Keep only posts and comments scoring at least this much. Leave empty for no minimum. An item whose score is hidden is kept."
          },
          "publishedBefore": {
            "title": "Activity published before",
            "type": "string",
            "description": "Keep only posts and comments older than this date or relative window (same formats as 'Activity published after'). Leave empty for no limit.",
            "default": ""
          },
          "skipUsernames": {
            "title": "Skip these usernames",
            "type": "array",
            "description": "For incremental runs: users you already have. They get a free 'skipped' status row and no request is made. Any username form is accepted.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "skipUserIds": {
            "title": "Skip these user IDs",
            "type": "array",
            "description": "For incremental runs: Reddit user IDs you already have (abc123 or t2_abc123). The profile is looked up to learn its ID, then returned as a free 'skipped' row.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "skipActivityIds": {
            "title": "Skip these post/comment IDs",
            "type": "array",
            "description": "For incremental runs: post (t3_…) or comment (t1_…) IDs you already have. They are dropped before charging.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeCommunitySummary": {
            "title": "Community summary",
            "type": "boolean",
            "description": "When activity is on, add each user's top communities and activity date range to their profile row, and write per-user hour-of-day and weekday counts to the COMMUNITY_SUMMARY key-value record. Only public activity counts — nothing is inferred about the person.",
            "default": true
          },
          "includeProfileSubreddit": {
            "title": "Profile subreddit details",
            "type": "boolean",
            "description": "Add a profileSubreddit object (the user's own u_ community: name, URL, title, description, NSFW flag, follower count) to each profile row. Fields the source does not publish are null.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "How many users are processed at once. Each worker uses its own proxy session and is paced to Reddit's per-address limit, so more workers means more proxy addresses, not faster requests per address.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Datacenter proxy is used by default. Apify Residential is refused (the run fails at start) because its bandwidth is billed to the Actor; supply your own residential provider under Custom proxy URLs if you need one.",
            "default": {
              "useApifyProxy": true
            }
          },
          "debugMode": {
            "title": "Debug logging",
            "type": "boolean",
            "description": "Verbose request logging for troubleshooting.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}