{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Posts Scraper",
    "description": "Transform your Reddit research with ultra fast data extraction! Collect 1000+ posts per minute from any subreddit, search query, or URL. Track trending topics, monitor brand discussions, and analyze community engagement effortlessly. Start gathering valuable insights in minutes!",
    "version": "1.0",
    "x-build-id": "G3xNyDfCL8I21MwfP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parseforge~reddit-posts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parseforge-reddit-posts-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/parseforge~reddit-posts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parseforge-reddit-posts-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/parseforge~reddit-posts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parseforge-reddit-posts-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": [
          "proxyConfiguration"
        ],
        "properties": {
          "maxItems": {
            "title": "📊 Maximum Posts",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000"
          },
          "startUrls": {
            "title": "🔗 Start URLs",
            "type": "array",
            "description": "Direct Reddit URLs to scrape. Supports subreddit URLs and search URLs.\n\nExamples:\n- https://www.reddit.com/r/programming/\n- https://www.reddit.com/r/javascript/top/\n- https://www.reddit.com/search?q=machine+learning",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "subreddits": {
            "title": "📱 Subreddits",
            "type": "array",
            "description": "List of subreddits to scrape posts from (without r/ prefix).\n\nExamples: programming, javascript, datascience",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "🔍 Search Queries",
            "type": "array",
            "description": "Search terms to find posts across Reddit. Each query will search all of Reddit unless you specify a subreddit in the query.\n\nExamples:\n- machine learning\n- best programming language 2025\n- subreddit:programming typescript",
            "items": {
              "type": "string"
            }
          },
          "searchInSubreddit": {
            "title": "📍 Search Within Subreddit",
            "type": "string",
            "description": "Limit search queries to a specific subreddit (optional). Leave empty to search all of Reddit."
          },
          "sort": {
            "title": "🔄 Sort By",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "controversial",
              "relevance"
            ],
            "type": "string",
            "description": "How to sort the posts:\n\n- hot: Currently popular posts\n- new: Most recent posts\n- top: Highest scored posts (use with Time Filter)\n- rising: Posts gaining momentum\n- controversial: Most debated posts\n- relevance: Best match (search only)",
            "default": "hot"
          },
          "time": {
            "title": "⏰ Time Filter",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Time range for 'top', 'controversial', and search results:\n\n- hour: Past hour\n- day: Past 24 hours\n- week: Past 7 days\n- month: Past 30 days\n- year: Past 365 days\n- all: All time",
            "default": "day"
          },
          "includeNSFW": {
            "title": "🔞 Include NSFW Content",
            "type": "boolean",
            "description": "Include posts marked as NSFW (Not Safe For Work / 18+)",
            "default": true
          },
          "includeSpoilers": {
            "title": "⚠️ Include Spoilers",
            "type": "boolean",
            "description": "Include posts marked as spoilers",
            "default": true
          },
          "includeStickied": {
            "title": "📌 Include Stickied Posts",
            "type": "boolean",
            "description": "Include moderator-pinned posts at the top of subreddits",
            "default": true
          },
          "minScore": {
            "title": "⬆️ Minimum Score",
            "minimum": 0,
            "type": "integer",
            "description": "Only include posts with at least this many upvotes. Leave empty for no minimum."
          },
          "maxScore": {
            "title": "⬇️ Maximum Score",
            "minimum": 0,
            "type": "integer",
            "description": "Only include posts with at most this many upvotes. Leave empty for no maximum."
          },
          "minComments": {
            "title": "💬 Minimum Comments",
            "minimum": 0,
            "type": "integer",
            "description": "Only include posts with at least this many comments. Leave empty for no minimum."
          },
          "maxComments": {
            "title": "💬 Maximum Comments",
            "minimum": 0,
            "type": "integer",
            "description": "Only include posts with at most this many comments. Leave empty for no maximum."
          },
          "flairFilter": {
            "title": "🏷️ Flair Filter",
            "type": "string",
            "description": "Only include posts with this exact flair text. Case-sensitive.\n\nExample: Discussion, Question, Tutorial"
          },
          "domainFilter": {
            "title": "🌐 Domain Filter",
            "type": "string",
            "description": "Only include posts from URLs containing this domain.\n\nExamples: youtube.com, github.com, imgur.com"
          },
          "authorFilter": {
            "title": "👤 Author Filter",
            "type": "string",
            "description": "Only include posts from this specific author (username without u/)."
          },
          "maxPages": {
            "title": "📄 Maximum Pages Per Source",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of pages to scrape per subreddit/query. Each page contains up to 100 posts.",
            "default": 10
          },
          "postsPerSource": {
            "title": "📝 Posts Per Source",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum posts to scrape from each subreddit or search query.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "⚙️ Proxy Configuration",
            "type": "object",
            "description": "Proxy settings for Reddit scraping. Reddit blocks datacenter IPs, so residential proxies are REQUIRED when running on Apify.\n\nWithout proxies: Works only on local/residential IPs\nWith RESIDENTIAL proxies: Works everywhere (recommended)"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}