{
  "openapi": "3.0.1",
  "info": {
    "title": "👽 Reddit Scraper - Posts, Comments, Search & Subreddits",
    "description": "Bulk Reddit scraping without an API key or login: paste hundreds of post, subreddit, user or search URLs, mine whole subreddits, expand nested comment threads, and stream clean posts, comments, communities and users to your dataset.",
    "version": "1.0",
    "x-build-id": "dIzM0vq9JuH2jzd75"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/citrine_venus~reddit-scraper-posts-comments-search-subreddits/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-citrine_venus-reddit-scraper-posts-comments-search-subreddits",
        "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/citrine_venus~reddit-scraper-posts-comments-search-subreddits/runs": {
      "post": {
        "operationId": "runs-sync-citrine_venus-reddit-scraper-posts-comments-search-subreddits",
        "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/citrine_venus~reddit-scraper-posts-comments-search-subreddits/run-sync": {
      "post": {
        "operationId": "run-sync-citrine_venus-reddit-scraper-posts-comments-search-subreddits",
        "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": "🧷 Reddit URLs to scrape",
            "type": "array",
            "description": "🎯 Post, subreddit, user-profile or search-result links — mix and match freely. Example: a post link pulls that thread (+ comments if you turn that on below); a subreddit link walks its listing; a profile link pulls karma, posts and comments.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchTerms": {
            "title": "💬 What should we search for?",
            "type": "array",
            "description": "🗯️ One keyword or phrase per line — e.g. \"best laptops 2025\", \"AI news\". Every line runs as its own independent search with its own result cap (set further down). Leave blank if links alone are enough.",
            "items": {
              "type": "string"
            }
          },
          "searchPosts": {
            "title": "📰 Include posts",
            "type": "boolean",
            "description": "Toggle posts on/off in the keyword search above.",
            "default": true
          },
          "searchComments": {
            "title": "🗨️ Include comments",
            "type": "boolean",
            "description": "Toggle comments on/off in the keyword search above.",
            "default": false
          },
          "searchCommunities": {
            "title": "🏘️ Include communities",
            "type": "boolean",
            "description": "Toggle subreddits on/off in the keyword search above.",
            "default": false
          },
          "withinCommunity": {
            "title": "🎯 Stay inside one subreddit",
            "type": "string",
            "description": "Optional leash for the keyword search — a bare name, r/name, or full subreddit link. Leave empty to roam all of Reddit."
          },
          "searchSort": {
            "title": "🧭 Sort keyword results by",
            "enum": [
              "relevance",
              "hot",
              "top",
              "new",
              "comments"
            ],
            "type": "string",
            "description": "How Reddit ranks what the keyword search returns. (Links above ignore this — they scrape exactly what's at the link.)",
            "default": "new"
          },
          "searchTime": {
            "title": "🗓️ Time range",
            "enum": [
              "all",
              "hour",
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Limits keyword search results to a time range. (Links above ignore this too.)",
            "default": "all"
          },
          "subredditUrls": {
            "title": "🏔️ Subreddits to mine in full",
            "type": "array",
            "description": "🪧 Name, r/name, or full link — e.g. AskReddit, r/AskReddit, or https://www.reddit.com/r/AskReddit/. One per line. Comments come along too if you flip on 🧵 comment threading below.",
            "items": {
              "type": "string"
            }
          },
          "onlyWithFlair": {
            "title": "🏷️ Flaired posts only",
            "type": "boolean",
            "description": "Skip posts with no flair tag; keep only the ones a mod or the community has tagged.",
            "default": false
          },
          "includeNSFW": {
            "title": "🔞 Allow NSFW (18+)",
            "type": "boolean",
            "description": "Off by default — flip on to include posts Reddit marks Not Safe For Work.",
            "default": false
          },
          "postedAfter": {
            "title": "🌅 Posts from this date onward",
            "type": "string",
            "description": "00:00 UTC on this day and later only. Setting this switches results to newest-first automatically."
          },
          "postedBefore": {
            "title": "🌇 Posts up to this date",
            "type": "string",
            "description": "23:59:59 UTC on this day and earlier only."
          },
          "commentedAfter": {
            "title": "💭 Comments from this date onward",
            "type": "string",
            "description": "Only keep comments posted on or after this UTC date."
          },
          "commentedBefore": {
            "title": "💭 Comments up to this date",
            "type": "string",
            "description": "Only keep comments posted on or before this UTC date."
          },
          "crawlCommentsPerPost": {
            "title": "💬 Pull comments for every post found",
            "type": "boolean",
            "description": "Applies to everything above (links, keyword search, and subreddit harvests). Adds real time to the run, so dial it in with the cap below.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "🎚️ Max comments per post",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Comment ceiling for a single post once threading is on above.",
            "default": 10
          },
          "maxPostsCount": {
            "title": "📰 Max posts per source",
            "minimum": 0,
            "maximum": 50000,
            "type": "integer",
            "description": "The cap for each search term / link / subreddit individually. Chasing a whole subreddit? Pair this with 🌊 Full Subreddit Scrape above and push it up.",
            "default": 10
          },
          "maxCommentsCount": {
            "title": "🗨️ Max comments from keyword search",
            "minimum": 0,
            "type": "integer",
            "description": "Only counts comments found via the 🗨️ keyword comment search toggle — unrelated to the per-post comment cap above.",
            "default": 10
          },
          "maxCommunitiesCount": {
            "title": "🏘️ Max communities from keyword search",
            "minimum": 0,
            "type": "integer",
            "description": "Caps how many subreddits the 🏘️ community search toggle can return.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "🛰️ Proxy configuration",
            "type": "object",
            "description": "Leave as-is to let the run defend itself automatically, or pin Residential here to start hardened from request #1."
          },
          "maxRetries": {
            "title": "🔁 Retries per network tier",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Attempts on one route before the run hands off to the next tier in the network route above.",
            "default": 3
          },
          "requestDelayMin": {
            "title": "🐢 Shortest pause between requests (sec)",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "Lower bound of the randomized gap between requests — a courtesy pause that keeps runs stable.",
            "default": 1
          },
          "requestDelayMax": {
            "title": "🐇 Longest pause between requests (sec)",
            "minimum": 0,
            "maximum": 15,
            "type": "number",
            "description": "Upper bound of that same randomized gap.",
            "default": 2.5
          },
          "postConcurrency": {
            "title": "⚡ Parallel comment fetches",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many posts' comment threads are pulled at once when 🧵 comment threading is on.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}