{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper: Posts, Comments, Hidden Profiles",
    "description": "Search all of Reddit and rebuild any user, hidden profiles included. Posts, comments, and full user history as clean JSON. No account, no API key, no login. Real scores, deep history, AI-ready output.",
    "version": "0.0",
    "x-build-id": "gE5chad2vefl4GNqM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/starvoid~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-starvoid-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/starvoid~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-starvoid-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/starvoid~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-starvoid-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "post",
              "search",
              "comment",
              "profile"
            ],
            "type": "string",
            "description": "What to return. post = the post only. search = the post plus its comments (set Comments per post). comment = comments only, each with its post link (needs a subreddit). profile = a user's full activity.",
            "default": "post"
          },
          "startUrls": {
            "title": "Reddit URLs",
            "type": "array",
            "description": "Paste Reddit URLs directly: a post, a subreddit (r/...), or a user (u/...). Post URLs are fetched straight away. Optional if you use keywords below.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to find on Reddit. By default a result must contain all of them (whole words, any order, case-insensitive). Turn on 'Match any term' to keep results with any one of them.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "Limit to these subreddits (name only, no r/). Combined with every keyword.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "global": {
            "title": "Global search (all of Reddit)",
            "type": "boolean",
            "description": "Search all of Reddit by keyword instead of naming subreddits, reaching past Reddit's own ~250-result limit into years of history. A $2 one-time fee per run. Leave off and list subreddit names to search those communities free of the fee.",
            "default": false
          },
          "usernames": {
            "title": "Usernames",
            "type": "array",
            "description": "Profile mode only. Reddit username(s), without the u/ prefix.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "time": {
            "title": "Time range",
            "enum": [
              "all",
              "hour",
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Quick time filter. For a precise window use the dates below.",
            "default": "all"
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "top",
              "new"
            ],
            "type": "string",
            "description": "Top returns the highest-scored posts and comments, a representative sample rather than whatever was posted in the last hour. New returns the most recent, best for monitoring. Applies to subreddit searches; global search is ordered by relevance.",
            "default": "top"
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Only results on or after this date (YYYY-MM-DD). Reaches back years, far beyond Reddit's API window.",
            "default": ""
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Only results on or before this date (YYYY-MM-DD).",
            "default": ""
          },
          "exactPhrase": {
            "title": "Match exact phrase",
            "type": "boolean",
            "description": "Match each search term as an exact phrase (words together, in order) instead of its words anywhere.",
            "default": false
          },
          "matchAny": {
            "title": "Match any term",
            "type": "boolean",
            "description": "Keep results that contain ANY of the search terms, instead of requiring all of them.",
            "default": false
          },
          "negativeTerms": {
            "title": "Exclude terms",
            "type": "array",
            "description": "Drop any result that contains one of these words or phrases.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeRegex": {
            "title": "Keep only matching (regex)",
            "type": "string",
            "description": "Keep only results whose text matches this pattern (case-insensitive). Advanced: OR with a|b, AND with (?=.*a)(?=.*b).",
            "default": ""
          },
          "excludeRegex": {
            "title": "Drop matching (regex)",
            "type": "string",
            "description": "Drop results whose text matches this pattern (case-insensitive).",
            "default": ""
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "How many rows to return: posts in Post and Search mode, comments in Comment mode, and each of posts and comments in Profile mode. In Profile mode it can only lower the 100 posts and 100 comments the flat fee covers; use Full profile history to go beyond.",
            "default": 100
          },
          "fullHistory": {
            "title": "Full profile history",
            "type": "boolean",
            "description": "Profile mode only. Off (default) returns up to 100 posts and 100 comments in the flat fee. On returns the account's entire history with no cap, and bills a small charge per additional 100 posts and per additional 100 comments, so heavy accounts deliver in full and only runs that ask for more pay more.",
            "default": false
          },
          "maxComments": {
            "title": "Comments per post",
            "minimum": 0,
            "type": "integer",
            "description": "Full post mode: how many comments to pull for each post. Each comment returned is billed as a comment event. (In Comment mode, use Max results to set how many comments you want.)",
            "default": 0
          },
          "includeNSFW": {
            "title": "Include NSFW",
            "type": "boolean",
            "description": "Include content flagged 18+ (over_18). On by default, since Reddit tags a lot of ordinary content and whole subreddits as NSFW. Turn off for a clean, work-safe dataset.",
            "default": true
          },
          "includeRemoved": {
            "title": "Include removed and deleted",
            "type": "boolean",
            "description": "Include posts and comments that a moderator removed or the author deleted. On by default; each affected row carries a removed flag. Turn off to drop them and keep only content that is still live.",
            "default": true
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "default",
              "jsonl-finetune",
              "rag-markdown"
            ],
            "type": "string",
            "description": "Posts mode: reshape each post into an AI-ready record. Fine-tuning gives OpenAI chat-format training examples; RAG markdown gives embed-ready documents. Both fold comments in and bill per post only.",
            "default": "default"
          },
          "maxCommentDepth": {
            "title": "Max comment depth",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Posts mode: how deep into reply threads to go. 0 = top level only.",
            "default": 3
          },
          "sliceMonths": {
            "title": "Query slice size (months)",
            "minimum": 1,
            "maximum": 24,
            "type": "integer",
            "description": "Split the date range into windows of this many months to pull more results. Smaller means deeper.",
            "default": 3
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many requests to run in parallel. Higher is faster.",
            "default": 10
          },
          "session": {
            "title": "Session (advanced)",
            "type": "string",
            "description": "Optional. Advanced users only. Leave this empty."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}