{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper Pro",
    "description": "High-reliability Reddit scraper with no artificial limits. Extract posts, comments, users, and subreddit data at scale. Supports JSON API, OAuth, HTML, and Playwright modes. Full comment trees, working filters, NSFW support, multi-account rate-boost.",
    "version": "0.1",
    "x-build-id": "RZgA2XWn5GOi5iLXh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kalirobot~reddit-scraper-pro/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kalirobot-reddit-scraper-pro",
        "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/kalirobot~reddit-scraper-pro/runs": {
      "post": {
        "operationId": "runs-sync-kalirobot-reddit-scraper-pro",
        "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/kalirobot~reddit-scraper-pro/run-sync": {
      "post": {
        "operationId": "run-sync-kalirobot-reddit-scraper-pro",
        "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": {
          "scrapingMode": {
            "title": "1️⃣ SCRAPING MODE",
            "enum": [
              "browser",
              "json_api",
              "official_api",
              "html_scraping"
            ],
            "type": "string",
            "description": "CHOOSE HOW TO SCRAPE REDDIT",
            "default": "json_api"
          },
          "redditCredentials": {
            "title": "Reddit API Credentials (Optional - for official_api mode)",
            "type": "array",
            "description": "Add Reddit App credentials for 'official_api' mode. Multiple accounts = higher limits!",
            "items": {
              "type": "object",
              "properties": {
                "client_id": {
                  "type": "string",
                  "title": "Client ID",
                  "description": "Reddit App Client ID",
                  "editor": "textfield"
                },
                "client_secret": {
                  "type": "string",
                  "title": "Client Secret",
                  "description": "Reddit App Client Secret (stored securely by Apify)",
                  "editor": "textfield"
                },
                "user_agent": {
                  "type": "string",
                  "title": "User Agent",
                  "description": "User Agent string (format: platform:appid:version (by /u/username))",
                  "editor": "textfield",
                  "default": "RedditScraperPro/1.0"
                }
              },
              "required": [
                "client_id",
                "client_secret"
              ]
            }
          },
          "startUrls": {
            "title": "2A. DIRECT URLs",
            "type": "array",
            "description": "PASTE REDDIT URLs (SUBREDDITS, POSTS, USERS)",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "subreddits": {
            "title": "2B. SUBREDDIT LIST",
            "type": "array",
            "description": "LIST OF SUBREDDIT NAMES (e.g., python, webdev, machinelearning)",
            "items": {
              "type": "string"
            }
          },
          "specialSubreddit": {
            "title": "2C. SPECIAL FEEDS",
            "enum": [
              "",
              "all",
              "popular"
            ],
            "type": "string",
            "description": "r/all = ALL OF REDDIT | r/popular = POPULAR POSTS",
            "default": ""
          },
          "countryCode": {
            "title": "Country Filter (for r/popular only)",
            "enum": [
              "GLOBAL",
              "US",
              "GB",
              "CA",
              "AU",
              "DE",
              "FR",
              "IT",
              "ES",
              "IN",
              "JP",
              "MX",
              "BR",
              "AR",
              "NZ",
              "PH",
              "PL",
              "PT",
              "RO",
              "RS",
              "SG",
              "SE",
              "TW",
              "TH",
              "TR"
            ],
            "type": "string",
            "description": "Filter r/popular by country",
            "default": "GLOBAL"
          },
          "searchKeywords": {
            "title": "2D. SEARCH POSTS",
            "type": "array",
            "description": "SEARCH BY KEYWORD (e.g., GPT-4, AI, Python)",
            "items": {
              "type": "string"
            }
          },
          "searchSubreddits": {
            "title": "2E. DISCOVER SUBREDDITS (Browser Mode)",
            "type": "array",
            "description": "FIND SUBREDDIT SUGGESTIONS (e.g., 'webdev' → r/webdev, r/web_design, etc.)",
            "items": {
              "type": "string"
            }
          },
          "scrapeOptions": {
            "title": "3️⃣ WHAT TO SCRAPE",
            "type": "object",
            "description": "CHOOSE CONTENT TYPES",
            "properties": {
              "posts": {
                "type": "boolean",
                "title": "Scrape Posts",
                "description": "Extract Reddit posts",
                "editor": "checkbox",
                "default": true
              },
              "comments": {
                "type": "boolean",
                "title": "Scrape Comments",
                "description": "Extract comments from posts",
                "editor": "checkbox",
                "default": true
              },
              "users": {
                "type": "boolean",
                "title": "Scrape User Profiles",
                "description": "Extract user profile information",
                "editor": "checkbox",
                "default": false
              },
              "subredditInfo": {
                "type": "boolean",
                "title": "Include Subreddit Metadata",
                "description": "Include subreddit info (subscribers, description, etc.)",
                "editor": "checkbox",
                "default": true
              }
            },
            "default": {
              "posts": true,
              "comments": true,
              "users": false,
              "subredditInfo": true
            }
          },
          "filters": {
            "title": "4️⃣ FILTERS & SORTING",
            "type": "object",
            "description": "FILTER AND SORT POSTS",
            "properties": {
              "sortBy": {
                "type": "string",
                "title": "Sort By",
                "description": "hot (Beliebt), new (Neu), top (Top), controversial (Kontrovers), rising (Aufsteigend)",
                "enum": [
                  "hot",
                  "new",
                  "top",
                  "controversial",
                  "rising"
                ],
                "editor": "select",
                "default": "hot"
              },
              "timeRange": {
                "type": "string",
                "title": "Time Range (for top/controversial)",
                "description": "hour (Stunde), day (24h), week (Woche), month (Monat), year (Jahr), all (Aller Zeiten)",
                "enum": [
                  "hour",
                  "day",
                  "week",
                  "month",
                  "year",
                  "all"
                ],
                "editor": "select",
                "default": "all"
              },
              "minUpvotes": {
                "type": "integer",
                "title": "Minimum Upvotes",
                "description": "Minimum score required",
                "editor": "number",
                "default": 0,
                "minimum": 0
              },
              "maxUpvotes": {
                "type": "integer",
                "title": "Maximum Upvotes (optional)",
                "description": "Maximum score (leave empty for unlimited)",
                "editor": "number",
                "minimum": 0
              },
              "minComments": {
                "type": "integer",
                "title": "Minimum Comments",
                "description": "Minimum number of comments",
                "editor": "number",
                "default": 0,
                "minimum": 0
              },
              "maxComments": {
                "type": "integer",
                "title": "Maximum Comments (optional)",
                "description": "Only scrape posts with <= this number of comments (leave empty for unlimited)",
                "editor": "number",
                "minimum": 0
              },
              "excludeNSFW": {
                "type": "boolean",
                "title": "Exclude NSFW Content",
                "description": "Skip NSFW posts (works in most modes)",
                "editor": "checkbox",
                "default": false
              }
            }
          },
          "limits": {
            "title": "5️⃣ LIMITS",
            "type": "object",
            "description": "SET CRAWLING LIMITS",
            "properties": {
              "maxPosts": {
                "type": "integer",
                "title": "Maximum Posts",
                "description": "Leave empty for unlimited",
                "editor": "number",
                "minimum": 1
              },
              "maxCommentsPerPost": {
                "type": "integer",
                "title": "Maximum Comments per Post",
                "description": "Leave empty for all comments",
                "editor": "number",
                "minimum": 1
              },
              "maxCommentDepth": {
                "type": "integer",
                "title": "Maximum Comment Depth",
                "description": "How deep to traverse nested comments",
                "editor": "number",
                "default": 10,
                "minimum": 1,
                "maximum": 50
              }
            },
            "default": {
              "maxCommentDepth": 10
            }
          },
          "output": {
            "title": "6️⃣ OUTPUT OPTIONS",
            "type": "object",
            "description": "CONFIGURE OUTPUT FORMAT",
            "properties": {
              "format": {
                "type": "string",
                "title": "Output Format",
                "description": "nested = comments as tree, flat = all items separate",
                "enum": [
                  "nested",
                  "flat"
                ],
                "editor": "select",
                "default": "nested"
              },
              "includeMetadata": {
                "type": "boolean",
                "title": "Include Scraping Metadata",
                "description": "Add metadata about scraping process",
                "editor": "checkbox",
                "default": true
              }
            },
            "default": {
              "format": "nested",
              "includeMetadata": true
            }
          },
          "proxy": {
            "title": "7️⃣ PROXY CONFIGURATION",
            "type": "object",
            "description": "PROXY SETTINGS (RECOMMENDED)",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Parallel requests (1-2 recommended for json_api, 3-5 for official_api)",
            "default": 2
          },
          "requestDelay": {
            "title": "Request Delay (seconds)",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "Delay between requests to avoid rate limiting",
            "default": 1.5
          },
          "scrollTimeout": {
            "title": "Scroll Timeout (Browser Mode)",
            "minimum": 10,
            "maximum": 120,
            "type": "integer",
            "description": "Max time for infinite scroll in browser mode",
            "default": 40
          },
          "debugMode": {
            "title": "Debug Mode",
            "type": "boolean",
            "description": "Enable verbose logging",
            "default": false
          },
          "notificationUrl": {
            "title": "8️⃣ NOTIFICATION URL (OPTIONAL)",
            "type": "string",
            "description": "GET NOTIFIED WHEN SCRAPING COMPLETES"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}