{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper: User Profiles & Subreddit Activity",
    "description": "Reddit Scraper for User Profiles & Subreddit Activity extracts public Reddit profiles, posts, comments, karma, timestamps, and subreddit participation. Analyze user activity, interests, communities, and engagement for audience research, market analysis, and social insights.",
    "version": "0.1",
    "x-build-id": "wTRX83t9zX28Z4NJP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/simpleapi~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-simpleapi-reddit-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/simpleapi~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-simpleapi-reddit-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/simpleapi~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-simpleapi-reddit-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": {
          "usernames": {
            "title": "👤 Reddit Usernames or Profile URLs",
            "minItems": 0,
            "type": "array",
            "description": "One or more Reddit usernames (e.g. \"spez\") or full user profile URLs (e.g. https://www.reddit.com/user/spez/). For each one, the actor fetches a real profile/karma summary, full post + comment history, and subreddit activity affinity below. Use \"+ Add\" for more, \"Bulk edit\" to paste many at once, or \"Text file\" to upload a list.",
            "items": {
              "type": "string"
            }
          },
          "includeUserProfile": {
            "title": "🪪 Include user profile summary",
            "type": "boolean",
            "description": "When on, fetch each username's real profile/karma aggregate (post karma, comment karma, total karma, lifetime post/comment counts). This is an aggregate snapshot that updates infrequently, not a live profile-page read -- disclosed on every profile row and may be null for inactive accounts."
          },
          "includePostHistory": {
            "title": "📝 Include post history",
            "type": "boolean",
            "description": "When on, fetch each username's real submitted-posts archive (title, subreddit, score, body, flair, and more per post), freshly fetched every run."
          },
          "includeCommentHistory": {
            "title": "💬 Include comment history",
            "type": "boolean",
            "description": "When on, fetch each username's real comment archive (body, score, subreddit, parent post, and more per comment), freshly fetched every run."
          },
          "activityDateFrom": {
            "title": "📅 Only activity on or after",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$|^$",
            "type": "string",
            "description": "Only include posts/comments created on or after this date. Choose an absolute date (e.g. 2026-01-15) or a relative range (e.g. \"3 days\", \"2 weeks\", \"1 month\"). Leave empty for full available history. A real, working cutoff applied while paginating each user's post/comment history (the base actor has no equivalent for user-scoped date filtering)."
          },
          "maxHistoryItemsPerUser": {
            "title": "📦 Max history items per user",
            "minimum": 1,
            "type": "integer",
            "description": "Per username, the maximum number of submitted posts AND the maximum number of comments to fetch (each counted separately). For example, 20 means up to 20 posts and up to 20 comments."
          },
          "historyPagesPerUser": {
            "title": "📄 History pages per user",
            "minimum": 1,
            "type": "integer",
            "description": "For each username, the maximum number of pages to fetch for submitted posts and for comments (each page returns up to 100 items). Controls how deep the actor paginates into a user's history."
          },
          "includeSubredditAffinity": {
            "title": "📊 Include subreddit affinity breakdown",
            "type": "boolean",
            "description": "When on, adds one row per username per subreddit the user has been active in, ranked by activity count (posts + comments), with each subreddit's share of the user's total tracked activity. A real, direct measurement -- not derived from the post/comment history sample above.",
            "default": true
          },
          "maxAffinitySubreddits": {
            "title": "🔢 Max subreddits per user in affinity breakdown",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of subreddits to return per username in the affinity breakdown, ranked by activity count (highest first).",
            "default": 15
          },
          "minAffinityActivityCount": {
            "title": "🚦 Minimum activity count to include a subreddit",
            "minimum": 0,
            "type": "integer",
            "description": "Only include a subreddit in the affinity breakdown if the user's tracked activity count there is at least this number. Raise this to filter out one-off/incidental activity and keep only a user's real recurring communities.",
            "default": 1
          },
          "startUrls": {
            "title": "🔗 Start URLs (legacy)",
            "minItems": 0,
            "type": "array",
            "description": "One or more Reddit URLs to scrape with the base actor's original modes. Accepted: (1) Post URLs (containing /comments/); (2) Subreddit URLs (e.g. https://www.reddit.com/r/python/); (3) User profile URLs (also supported here, though the \"Reddit Usernames or Profile URLs\" field above is the recommended way to target users in this variant). Leave empty to use only the user-research features above.",
            "items": {
              "type": "string"
            }
          },
          "skipComments": {
            "title": "💬 Skip comments (legacy post mode)",
            "type": "boolean",
            "description": "If enabled, the actor will not fetch comments for any post URLs in Start URLs. Only the post title, body, score, and other post-level data will be collected.",
            "default": false
          },
          "skipUserPosts": {
            "title": "👤 Skip legacy Start-URL users",
            "type": "boolean",
            "description": "If enabled, any user profile URLs in the legacy Start URLs field are ignored. Does not affect the \"Reddit Usernames or Profile URLs\" field above.",
            "default": false
          },
          "skipCommunity": {
            "title": "🏘️ Skip community metadata",
            "type": "boolean",
            "description": "If enabled, the actor will not fetch subreddit/community metadata for subreddits found in the legacy Start URLs field. Post listings from those subreddits are still scraped when \"Enable subreddit posts\" is on.",
            "default": false
          },
          "searchTerms": {
            "title": "🔎 Search Term (legacy)",
            "type": "array",
            "description": "One or more search phrases to run against Reddit, using the base actor's original search mode. Each term is queried separately and results are pushed as individual rows tagged with the query.",
            "items": {
              "type": "string"
            }
          },
          "searchCommunity": {
            "title": "🏘️ Search community (optional)",
            "type": "string",
            "description": "Optional subreddit name without the \"r/\" prefix (e.g. python). When set, search is restricted to this community only. Leave empty to search all of Reddit. Only has an effect when you have at least one Search Term."
          },
          "ignoreStartUrls": {
            "title": "⏭️ Ignore legacy start URLs",
            "type": "boolean",
            "description": "When enabled, the actor does not scrape any legacy Start URLs; only search runs, using the Search Term(s) below.",
            "default": false
          },
          "searchForPosts": {
            "title": "📝 Search for posts",
            "type": "boolean",
            "description": "Include posts in search results. The only search scope this actor supports.",
            "default": true
          },
          "sortSearch": {
            "title": "📊 Sort search",
            "enum": [
              "relevance",
              "new",
              "hot",
              "top",
              "comments"
            ],
            "type": "string",
            "description": "Controls how search results are ordered after they are collected. Options: relevance/hot/top (all ranked by score, highest first -- no live \"trending\" signal is available from a no-login source), new (newest first), comments (most comments first).",
            "default": "new"
          },
          "timeFilter": {
            "title": "⏱️ Time filter (search)",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Restricts search results to a relative time window: hour (last 60 min), day, week, month, year, or all (no time limit).",
            "default": "all"
          },
          "filterByDate": {
            "title": "📅 Filter by date (search & subreddit listing)",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$|^$",
            "type": "string",
            "description": "Only include posts created on or after this date, for legacy search and subreddit listing results only. (For a user's post/comment history, use \"Only activity on or after\" above instead.) Choose an absolute date (e.g. 2026-01-15) or a relative range (e.g. \"3 days\")."
          },
          "enableSearch": {
            "title": "🔍 Enable search",
            "type": "boolean",
            "description": "When on, the actor runs the legacy search mode if Search Terms are provided.",
            "default": true
          },
          "enableSubreddit": {
            "title": "📰 Enable subreddit posts",
            "type": "boolean",
            "description": "When on, any subreddit URLs in the legacy Start URLs are scraped for their post listing, up to the limits below.",
            "default": true
          },
          "sortSubreddit": {
            "title": "📊 Subreddit listing sort",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "controversial"
            ],
            "type": "string",
            "description": "How to order posts fetched from each legacy subreddit URL. \"new\" and \"top\" are real, direct orderings. \"hot\" and \"rising\" are a disclosed approximation (score decayed by post age). \"controversial\" is a real signal: posts whose upvote ratio is closest to a 50/50 split.",
            "default": "new"
          },
          "enablePost": {
            "title": "📝 Enable post + comments",
            "type": "boolean",
            "description": "When on, any post URLs in the legacy Start URLs are scraped for the full post and its comment tree.",
            "default": true
          },
          "enableUser": {
            "title": "👤 Enable legacy Start-URL user mode",
            "type": "boolean",
            "description": "When on, user profile URLs found in the legacy Start URLs field are scraped using the fetch toggles below. Does not affect the \"Reddit Usernames or Profile URLs\" field above, which always runs when populated.",
            "default": true
          },
          "enableSubredditInfo": {
            "title": "🏘️ Enable subreddit info",
            "type": "boolean",
            "description": "When on, the actor fetches metadata for subreddits found in the legacy Start URLs, plus the optional top-subreddits ranking below.",
            "default": true
          },
          "fetchUserProfile": {
            "title": "👤 Fetch profile (legacy Start-URL users)",
            "type": "boolean",
            "description": "For users found via the legacy Start URLs field, when on, fetch profile/karma summary. Also used as the fallback value for \"Include user profile summary\" above when that field is not explicitly set.",
            "default": true
          },
          "fetchUserSubmitted": {
            "title": "📝 Fetch submitted posts (legacy Start-URL users)",
            "type": "boolean",
            "description": "For users found via the legacy Start URLs field, when on, fetch submitted posts. Also used as the fallback value for \"Include post history\" above when that field is not explicitly set.",
            "default": true
          },
          "fetchUserComments": {
            "title": "💬 Fetch comments (legacy Start-URL users)",
            "type": "boolean",
            "description": "For users found via the legacy Start URLs field, when on, fetch comments. Also used as the fallback value for \"Include comment history\" above when that field is not explicitly set.",
            "default": true
          },
          "fetchTopSubreddits": {
            "title": "🔝 Fetch top subreddits by subscriber count",
            "type": "boolean",
            "description": "When on, the actor fetches a ranking of large subreddits ordered by real subscriber count and adds them as \"top_subreddit\" rows.",
            "default": false
          },
          "maxSubredditsInfo": {
            "title": "🔢 Max subreddits to rank",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "When \"Fetch top subreddits by subscriber count\" is enabled, the maximum number of subreddits to return.",
            "default": 25
          },
          "maxItemsToSave": {
            "title": "📦 Global maximum items to save",
            "minimum": 1,
            "type": "integer",
            "description": "Global maximum number of rows (across user profiles/history/affinity AND every legacy mode combined) the actor will save across the entire run. The run stops collecting once this cap is reached.",
            "default": 200
          },
          "limitPostsPerPage": {
            "title": "📄 Target posts per source (legacy)",
            "minimum": 1,
            "type": "integer",
            "description": "Target number of posts to fetch per legacy search term / per subreddit.",
            "default": 10
          },
          "limitCommentsPerPage": {
            "title": "💬 Max comments per post (legacy)",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of comments to fetch for a single legacy post URL.",
            "default": 50
          },
          "limitCommunityPages": {
            "title": "🏘️ Pages per subreddit / search term (legacy)",
            "minimum": 1,
            "type": "integer",
            "description": "For each legacy subreddit URL or search term, the maximum number of result pages to paginate through.",
            "default": 2
          },
          "maxCommentDepth": {
            "title": "🌳 Max comment tree depth (legacy)",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum depth of nested comment replies to parse for legacy post URLs. Depth 1 means only top-level comments.",
            "default": 5
          },
          "maxItemsPerUser": {
            "title": "👤 Max items per user (legacy Start-URL users)",
            "minimum": 1,
            "type": "integer",
            "description": "For legacy Start-URL users: max submitted posts and max comments to fetch. Also used as the fallback value for \"Max history items per user\" above when that field is not explicitly set.",
            "default": 20
          },
          "limitUserPages": {
            "title": "👤 Pages per user (legacy Start-URL users)",
            "minimum": 1,
            "type": "integer",
            "description": "For legacy Start-URL users: max pages to fetch for submitted posts and comments. Also used as the fallback value for \"History pages per user\" above when that field is not explicitly set.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy Configuration",
            "type": "object",
            "description": "Configure Apify Proxy for this run. By default the actor connects directly. If a request is rate-limited or fails, the actor automatically retries through a datacenter proxy, then a residential proxy, and keeps using the first tier that works. You can also enable Apify Proxy here from the start so all requests go through proxy immediately."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}