{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Subreddit Members Scraper With Activity History",
    "description": "Scrape and export subreddit members into your CRM or automation pipeline. Ideal for community targeting, outreach, and social listening workflows driven by live Reddit engagement.",
    "version": "0.1",
    "x-build-id": "aFEXXeradGc7mxXPU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/api-empire~reddit-subreddit-members-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-api-empire-reddit-subreddit-members-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/api-empire~reddit-subreddit-members-scraper/runs": {
      "post": {
        "operationId": "runs-sync-api-empire-reddit-subreddit-members-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/api-empire~reddit-subreddit-members-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-api-empire-reddit-subreddit-members-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": {
          "communityTargets": {
            "title": "🧭 Communities, profiles or search phrases",
            "type": "array",
            "description": "One entry per line. Accepts `r/python`, a full subreddit URL, `u/spez` or a profile URL, or free text (searched across Reddit). Rows are participants discovered from public posts and comments — never a subscriber list.",
            "items": {
              "type": "string"
            }
          },
          "subreddits": {
            "title": "🧩 Extra subreddit names",
            "type": "array",
            "description": "Plain community names to add to the list above, e.g. `learnpython`. Merged with the field above, then de-duplicated.",
            "items": {
              "type": "string"
            }
          },
          "feedSort": {
            "title": "🔀 Feed to read the participants from",
            "enum": [
              "new",
              "hot",
              "top",
              "rising"
            ],
            "type": "string",
            "description": "Which subreddit feed supplies the participant sample. `top` is combined with the time window below.",
            "default": "new"
          },
          "topTimeWindow": {
            "title": "🗓️ Time window for the Top feed",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Only used when the feed above is `top`. Reddit silently serves *today's* top when no window is sent, so this actor always sends one explicitly.",
            "default": "month"
          },
          "fetchRecentActivity": {
            "title": "🕒 Look up each participant's recent activity",
            "type": "boolean",
            "description": "Opens `old.reddit.com/user/<name>/` once per unique participant. Adds last-active date, post/comment split, the other communities they are active in, post & comment karma and account age. Costs exactly 1 residential request per participant.",
            "default": true
          },
          "activitySampleSize": {
            "title": "📚 Recent items to read per participant",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many of the participant's most recent public items (posts and comments mixed, newest first) to analyse. The last-active date, the post/comment split and the community list are all derived from this sample.",
            "default": 25
          },
          "includeActivityItems": {
            "title": "🧾 Also emit each recent item as its own row",
            "type": "boolean",
            "description": "Writes the participant's individual posts/comments as free child rows directly beneath their parent row, linked by `parentId`. Child rows are never charged — only unique participants are.",
            "default": true
          },
          "activityItemsPerUser": {
            "title": "🔢 Child rows per participant",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Caps how many recent items become child rows (0 = none). Does not change the analysis above, which always uses the full sample.",
            "default": 5
          },
          "activeWithinDays": {
            "title": "⏳ Only keep participants active in the last N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "0 disables the filter. Applied BEFORE the row is written, so a dormant account is never charged. The activity lookup itself still runs - it is what the filter reads. Participants whose activity could not be read are kept and flagged rather than silently dropped.",
            "default": 0
          },
          "otherSubreddits": {
            "title": "🎯 Must also be active in one of these communities",
            "type": "array",
            "description": "Keeps only participants whose recent items include at least one of these communities. Leave empty to disable. Requires the activity lookup.",
            "items": {
              "type": "string"
            }
          },
          "excludeAuthors": {
            "title": "🚫 Usernames to skip",
            "type": "array",
            "description": "Case-insensitive. Useful for bots and moderators, e.g. `AutoModerator`.",
            "items": {
              "type": "string"
            }
          },
          "maxParticipants": {
            "title": "🧑‍🤝‍🧑 Max participants (parent rows) per run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Counts unique participants only. Child activity rows are not counted against this cap and are not charged.",
            "default": 50
          },
          "postSampleSize": {
            "title": "📝 Posts to read per community",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How deep to read the chosen feed. 100 items per request; more pages are fetched automatically.",
            "default": 25
          },
          "commentSampleSize": {
            "title": "💬 Comments to read per community",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Reads the community's recent-comment firehose. This surface returns the most distinct people — measured 0 % author overlap with the Top feed and 2.1 % with New. 0 skips it.",
            "default": 25
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "Apify RESIDENTIAL is required. Measured 2026-08-01: every Apify datacenter group is hard-blocked by Reddit, residential exits return 200.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "forceResidential": {
            "title": "🏠 Force the residential proxy group",
            "type": "boolean",
            "description": "Rewrites any datacenter proxy group to RESIDENTIAL and logs it. Turn off only if you know your own proxy setup reaches old.reddit.com.",
            "default": true
          },
          "browserFingerprint": {
            "title": "🧬 TLS fingerprint",
            "enum": [
              "firefox133",
              "safari17_0"
            ],
            "type": "string",
            "description": "Reddit blocks Chrome-family TLS fingerprints on this surface (measured: chrome131 / chrome124 / chrome99_android / edge101 all 403). Firefox and Safari pass.",
            "default": "firefox133"
          },
          "requestDelaySeconds": {
            "title": "⏱️ Delay between requests (seconds)",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Jittered pause added between requests.",
            "default": 1
          },
          "activityConcurrency": {
            "title": "🚀 Parallel activity lookups",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many participant pages to open at once.",
            "default": 3
          },
          "targets": {
            "title": "🔁 targets (v0.1 input)",
            "type": "array",
            "description": "Compatibility input from version 0.1. If supplied it takes priority over `communityTargets`. Leave empty unless you are re-running an old input file.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "🔁 startUrls (v0.1 input)",
            "type": "array",
            "description": "Compatibility alias for `targets`. Accepts plain strings or `{\"url\": \"...\"}` objects.",
            "items": {
              "type": "string"
            }
          },
          "maxPosts": {
            "title": "🔁 maxPosts (v0.1 input)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Compatibility input for `postSampleSize`. The v0.1 schema allowed 10000 while its own help text said 1-1000; the real limit is 1000."
          },
          "maxComments": {
            "title": "🔁 maxComments (v0.1 input)",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Compatibility input for `commentSampleSize`."
          },
          "fetchDetails": {
            "title": "🔁 fetchDetails (v0.1 input)",
            "type": "boolean",
            "description": "Compatibility input for `fetchRecentActivity`. In v0.1 this fetched a per-user profile endpoint that Reddit has since closed; it now drives the activity lookup."
          },
          "sort_order": {
            "title": "🔁 sort_order (v0.1 input)",
            "enum": [
              "new",
              "hot",
              "top",
              "rising"
            ],
            "type": "string",
            "description": "Compatibility input for `feedSort`. Read by v0.1 code but missing from its schema, so it could never be set."
          },
          "maxConcurrentUsers": {
            "title": "🔁 maxConcurrentUsers (v0.1 input)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Compatibility input for `activityConcurrency`. Read by v0.1 code but missing from its schema."
          },
          "requestDelay": {
            "title": "🔁 requestDelay (v0.1 input)",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Compatibility input for `requestDelaySeconds`. Read by v0.1 code but missing from its schema."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}