{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper — Posts & Full Comment Threads",
    "description": "Scrape Reddit posts with full nested comment threads — or search any subreddit or keyword across posts, comments and communities. Bodies come as AI-ready text, HTML and Markdown for LLMs. $1.25 per 1,000 results; no login or developer token needed.",
    "version": "0.1",
    "x-build-id": "jb9VloJP9bzwEm8hZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/blackfalcondata~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-blackfalcondata-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/blackfalcondata~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-blackfalcondata-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/blackfalcondata~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-blackfalcondata-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": {
          "startUrls": {
            "title": "🔗 Start URLs",
            "type": "array",
            "description": "Reddit URLs to scrape — subreddits, post pages, or search result pages. Each URL determines what type of content is fetched: a subreddit URL scrapes its post feed, a post URL scrapes that discussion's comment thread. User profile and community \"about\" URLs are accepted but currently return limited or no data.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchTerms": {
            "title": "🔎 Search Terms",
            "type": "array",
            "description": "Search Reddit for these terms. Each entry becomes an independent search for the selected result type.",
            "items": {
              "type": "string"
            }
          },
          "searchCommunity": {
            "title": "🔎 Search Within Subreddit",
            "type": "string",
            "description": "Restrict all Search Terms to one subreddit (e.g. \"programming\" or \"r/programming\"). Post results are strictly filtered to that community; comment and community searches follow Reddit's own scoping. Leave blank to search all of Reddit."
          },
          "searchType": {
            "title": "🔎 Search Type",
            "enum": [
              "posts",
              "comments",
              "communities"
            ],
            "type": "string",
            "description": "Reddit search result type. Posts return discovery records plus their comment threads; comments and communities return their own records directly. User search is not exposed because Reddit does not currently provide a stable public result structure for it.",
            "default": "posts"
          },
          "sort": {
            "title": "📊 Sort",
            "enum": [
              "relevance",
              "hot",
              "top",
              "new",
              "comments"
            ],
            "type": "string",
            "description": "Sort order for posts and search results.",
            "default": "hot"
          },
          "time": {
            "title": "🕒 Time Filter",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Restrict subreddit-feed results to a time window (applies to Top sort on feeds; search is not time-windowed).",
            "default": "all"
          },
          "includeNSFW": {
            "title": "🔞 Include NSFW",
            "type": "boolean",
            "description": "Include posts and communities marked as NSFW (18+).",
            "default": false
          },
          "postDateFrom": {
            "title": "📅 Posts From Date",
            "type": "string",
            "description": "Keep only posts created at or after this ISO-8601 date (e.g. \"2024-01-01\"). Applies wherever the post carries a timestamp (feeds, post URLs, dated search results). Leave blank for no lower bound."
          },
          "postDateTo": {
            "title": "📅 Posts Until Date",
            "type": "string",
            "description": "Keep only posts created at or before this ISO-8601 date (e.g. \"2024-06-30\"). Combine with Posts From Date for an exact window. Leave blank for no upper bound."
          },
          "commentDateFrom": {
            "title": "📅 Comments From Date",
            "type": "string",
            "description": "Keep only comments created at or after this ISO-8601 date. Blank means comments of any age are collected."
          },
          "commentDateTo": {
            "title": "📅 Comments Until Date",
            "type": "string",
            "description": "Keep only comments created at or before this ISO-8601 date. Blank disables the upper comment bound."
          },
          "postDateLimit": {
            "title": "📅 Post Date Limit (legacy)",
            "type": "string",
            "description": "Legacy alias of Posts From Date — Posts From Date wins when both are set. Skip posts older than this ISO-8601 date (e.g. \"2024-01-01\")."
          },
          "maxItems": {
            "title": "🔢 Max Items",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum total records to save across all sources (posts, comments, communities).",
            "default": 100
          },
          "maximizeCoverage": {
            "title": "🚀 Maximize Coverage",
            "type": "boolean",
            "description": "Subreddit feeds only: traverse several sort orders (your selected sort, then hot, new and top) and de-duplicate by post ID, reaching posts a single listing cannot expose. Reddit shows roughly 1,000 posts per listing; this pushes past that window at the cost of extra page fetches. Set Max Items accordingly.",
            "default": false
          },
          "maxComments": {
            "title": "💬 Max Comments Per Post",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of comments to collect from each post page.",
            "default": 200
          },
          "includeCollapsed": {
            "title": "💬 Include Collapsed Comments",
            "type": "boolean",
            "description": "Expand and include comments that are initially collapsed (controversial or low-score). Enables deeper thread coverage, up to the comment and depth limits you set.",
            "default": true
          },
          "commentDepth": {
            "title": "🌳 Comment Depth",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum reply nesting depth to collect (1 = top-level only).",
            "default": 10
          },
          "skipComments": {
            "title": "⏭️ Skip Comments",
            "type": "boolean",
            "description": "Do not collect comments from post pages — output posts only.",
            "default": false
          },
          "descriptionFormat": {
            "title": "📄 Description Format",
            "enum": [
              "all",
              "text",
              "html",
              "markdown"
            ],
            "type": "string",
            "description": "Controls which body/description fields are included in output. \"all\" emits text + HTML + markdown variants.",
            "default": "all"
          },
          "sentiment": {
            "title": "💭 Sentiment Analysis",
            "type": "boolean",
            "description": "Score the body text of every post and comment with a fast lexicon sentiment model. Adds a \"sentiment\" object (score, label, confidence) to each record; off by default to keep records lean.",
            "default": false
          },
          "excludeEmptyFields": {
            "title": "🧹 Exclude Empty Fields",
            "type": "boolean",
            "description": "Strip null and empty fields from output records to reduce payload size.",
            "default": false
          },
          "includeRunMetadata": {
            "title": "📋 Include Run Metadata",
            "type": "boolean",
            "description": "Append a single run-summary record at the end of the dataset (run ID, timing, item counts). It is marked itemType=\"runMetadata\" and is added in addition to your matching records — filter on itemType to exclude it.",
            "default": false
          },
          "appConnector": {
            "title": "Send results to Notion (or another connected app)",
            "type": "string",
            "description": "Optional. Pick a connected app under Settings → API & Integrations to receive your scraped Reddit results. Notion is supported today (a run-summary page); other MCP connectors are best-effort as Apify expands its catalog."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}