{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Historical Archive Scraper | Enterprise Grade",
    "description": "All-in-one Reddit Scraper. Scrape posts and full comment threads from any search, subreddit, user, or direct post URL. This enterprise-grade scraper is the fastest in the market and delivers clean and detailed JSON.",
    "version": "1.2",
    "x-build-id": "zxtuog1PjjwXYzcGh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fatihtahta~reddit-scraper-fast/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fatihtahta-reddit-scraper-fast",
        "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/fatihtahta~reddit-scraper-fast/runs": {
      "post": {
        "operationId": "runs-sync-fatihtahta-reddit-scraper-fast",
        "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/fatihtahta~reddit-scraper-fast/run-sync": {
      "post": {
        "operationId": "run-sync-fatihtahta-reddit-scraper-fast",
        "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": {
          "queries": {
            "title": "Add Archive Search Phrases",
            "minItems": 1,
            "type": "array",
            "description": "Optionally add phrases to search for in archived Reddit submissions. Leave this empty when you want every indexed post from the subreddit selected below.",
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Order Keyword Search Candidates",
            "enum": [
              "relevance",
              "new",
              "hot",
              "top",
              "comments"
            ],
            "type": "string",
            "description": "Choose how matching candidates are ordered inside each monthly archive batch. Archive months are still searched newest first so results can be saved progressively.",
            "default": "relevance"
          },
          "subredditName": {
            "title": "Limit Search to One Subreddit",
            "minLength": 1,
            "type": "string",
            "description": "Enter a subreddit without the `r/` prefix, for example `technology`. With no keywords, the Actor collects every indexed post from that subreddit in the selected date window. With keywords, it returns matching posts from that subreddit."
          },
          "subredditKeywords": {
            "title": "Add Search Phrases for That Subreddit",
            "type": "array",
            "description": "Optionally add phrases to search within the selected subreddit. Leave this empty to collect every indexed post from that subreddit. If the main keyword field is filled, it takes priority.",
            "items": {
              "type": "string"
            }
          },
          "subredditSort": {
            "title": "Order Subreddit Search Candidates",
            "enum": [
              "relevance",
              "new",
              "hot",
              "top",
              "comments"
            ],
            "type": "string",
            "description": "Choose how candidates are ordered when a subreddit is selected. This overrides the keyword sort for subreddit-focused runs and applies inside each monthly archive batch.",
            "default": "relevance"
          },
          "timeframe": {
            "title": "Limit Results by Relative Time Window",
            "enum": [
              "all",
              "year",
              "month",
              "week",
              "day"
            ],
            "type": "string",
            "description": "Restrict archive results to an inclusive UTC calendar-date window. Use All time to search the available archive range. Exact dates below take priority when provided.",
            "default": "all"
          },
          "dateFrom": {
            "title": "Keep Posts Starting From a Specific Date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Choose the earliest post date to include. Leave this empty to let the actor use the relative time window above or the full available archive range."
          },
          "dateTo": {
            "title": "Keep Posts Up to a Specific Date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Choose the latest post date to include. Leave this empty to search through the current day. Date-only values are interpreted as UTC archive days."
          },
          "minimumScore": {
            "title": "Set a Minimum Reddit Score",
            "minimum": 0,
            "type": "integer",
            "description": "Only save archived posts with at least this Reddit score. Use 0 to include neutral or positively scored posts, or leave it empty to avoid score filtering."
          },
          "minimumComments": {
            "title": "Set a Minimum Comment Count",
            "minimum": 0,
            "type": "integer",
            "description": "Only save archived posts with at least this many reported comments. Leave it empty to include posts regardless of discussion size."
          },
          "includeNsfw": {
            "title": "Include NSFW and 18+ Posts",
            "type": "boolean",
            "description": "Enable this to include archive records marked as NSFW or 18+. Keep it disabled for a safer default dataset.",
            "default": false
          },
          "strictSearch": {
            "title": "Enable Strict Archive Search",
            "type": "boolean",
            "description": "Enable strict archive search to keep results closely tied to the keywords you entered. On this indexed archive path, this acts as a compatibility alias for full-query token verification.",
            "default": false
          },
          "strictTokenFilter": {
            "title": "Require Every Query Word to Match",
            "type": "boolean",
            "description": "Require every word from the originating query to occur in the saved post title, body, or canonical URL. Enabling either this option or Strict Archive Search applies the same full-query verification.",
            "default": false
          },
          "sentiment_analysis": {
            "title": "Add Sentiment Scores and Labels",
            "type": "boolean",
            "description": "Analyze each saved post title and body with the built-in sentiment model. Disable this when you only need source fields and want lighter record processing.",
            "default": true
          },
          "content_analysis": {
            "title": "Classify Posts into Content Categories",
            "type": "boolean",
            "description": "Classify saved posts into deterministic content categories using their title, body, subreddit, flair, and linked domain. Disable this when category fields are not needed.",
            "default": true
          },
          "maxPosts": {
            "title": "Set a Maximum Number of Records",
            "minimum": 1,
            "type": "integer",
            "description": "Choose the maximum number of archived submissions to save across all search phrases and monthly archive windows. Results are pushed as each month finishes, so longer runs show dataset progress while the actor continues searching older months."
          },
          "mcpConnectors": {
            "title": "Select MCP Connectors",
            "uniqueItems": true,
            "type": "array",
            "description": "Choose optional MCP connectors for compatible Apify workflows. Archive records still go to the default dataset and run summaries go to the key-value store. The current actor does not send the full Reddit dataset through MCP.",
            "default": []
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}