{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper",
    "description": "🏷️ From $0.60 / 1K | Scrape Reddit posts and comments from subreddits, user histories, keyword searches for brand mentions, and permalinks you paste. Billed per unique post after dedupe, $1 per 1,000. Set postedAfter and a scheduled run skips the history it already holds. No API key, no login.",
    "version": "0.1",
    "x-build-id": "a4CC2MDJ8yxfO46q3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/spookyweb~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-spookyweb-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/spookyweb~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-spookyweb-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/spookyweb~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-spookyweb-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": {
          "urls": {
            "title": "Reddit links",
            "type": "array",
            "description": "Paste Reddit links, one per line, and each is resolved to what it names: a subreddit link is walked as that subreddit, a post permalink returns that one thread, a /user/ link returns that account, and a search link keeps the keyword it was built from. Mix them freely with the name fields below. A link that cannot be read stops the run before anything is charged rather than being silently skipped.",
            "items": {
              "type": "string"
            }
          },
          "subreddits": {
            "title": "Subreddits",
            "maxItems": 10000,
            "type": "array",
            "description": "The subreddits to collect from, one per line, written as a plain name such as programming. An r/ prefix or a full reddit.com link is accepted and cleaned up for you. Up to 50 subreddits per run. maxPosts is the total across all of them, spread across the list rather than spent on the first one.",
            "items": {
              "type": "string"
            }
          },
          "redditUsers": {
            "title": "Reddit users",
            "maxItems": 10000,
            "type": "array",
            "description": "Reddit usernames without the u/ prefix, one per line. Each account returns its post history, its comment history when comments are on, and one profile row carrying its karma, age and details. Posts and the profile row are charged at the same rate; comments are charged at a fifth of it.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "maxItems": 10000,
            "type": "array",
            "description": "Optional search terms, one per line, searched inside the subreddits you named. Keywords reach posts that are older than any listing will show, so add two or three when you want depth rather than only the recent history. Leave empty to walk the listings alone.",
            "items": {
              "type": "string"
            }
          },
          "postedAfter": {
            "title": "Posted after",
            "type": "string",
            "description": "Only return posts made on or after this date, so a scheduled run collects what is new instead of paying for the same history every morning. A calendar date such as 2026-08-01 is read as UTC midnight, and a full ISO timestamp works too. Posts outside the window are dropped before comments are fetched and before anything is charged. Leave empty for no lower bound."
          },
          "postedBefore": {
            "title": "Posted before",
            "type": "string",
            "description": "Only return posts made before this date, which is how you take one month at a time out of a deep history. Same date formats as Posted after. Leave empty for no upper bound."
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "all",
              "new",
              "top",
              "controversial",
              "rising"
            ],
            "type": "string",
            "description": "Which of Reddit's listings to read. Leave on Every listing and the run walks new, top, controversial and rising together, which is how it reaches past the thousand posts a single listing stops at. Name one to narrow the run to it.",
            "default": "all"
          },
          "timeWindow": {
            "title": "Time window",
            "enum": [
              "",
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Narrows the sorts that take one, which is Top and Controversial, to a single window. Leave empty and every window is read from all time down to the past hour, which reaches further. This is Reddit's own window on a listing and is not a filter on the post date: use Posted after and Posted before for that.",
            "default": ""
          },
          "minScore": {
            "title": "Minimum score",
            "type": "integer",
            "description": "Drop posts scoring under this. A filtered post is not delivered and not charged. Leave empty to keep everything, including posts on zero or below."
          },
          "excludeNsfw": {
            "title": "Exclude NSFW",
            "type": "boolean",
            "description": "Drop posts Reddit marks over 18, which is what a brand safe dataset needs. Off by default, so nothing is hidden unless you ask.",
            "default": false
          },
          "skipStickied": {
            "title": "Skip pinned posts",
            "type": "boolean",
            "description": "Drop the posts a moderator pinned to the top of the subreddit. They are usually rules and announcements rather than the conversation you came for.",
            "default": false
          },
          "searchAllReddit": {
            "title": "Search all of Reddit",
            "type": "boolean",
            "description": "Search the keywords across every subreddit there is instead of only inside the ones you named, which is how you find every mention of a brand, a product or a person. Needs at least one keyword. The subreddits you name are still walked afterwards.",
            "default": false
          },
          "maxPosts": {
            "title": "Maximum posts",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "How many unique posts to return in total, from 1 to 100000. Duplicates are removed before this is counted and before anything is charged, so this is the number of usable rows you get and the number you pay for. The run stops as soon as it is reached.",
            "default": 1000
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Bring each post's comment thread back nested inside its row, including the replies Reddit collapses behind a more comments link. Comments are free: you pay per post whether the thread comes with it or not. It does make a run slower, so leave it off for a plain post export.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Maximum comments per post",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "How many comments to take from each post, in Reddit's top order. Reddit serves them about a hundred at a time, so a deep thread costs several requests: a run pointed at a handful of posts will go after the whole cap, and a run walking a whole subreddit stops at roughly five hundred a post to keep the run inside its time. When a thread still had more to give, the run says so in its status message rather than leaving you to count.",
            "default": 50
          },
          "commentOutput": {
            "title": "Comment shape",
            "enum": [
              "nested",
              "flat",
              "both"
            ],
            "type": "string",
            "description": "Nested keeps the thread inside its post, which is the shape every existing dataset has. Flat writes one row per comment with parentId and postId, which is what a spreadsheet, a warehouse or an enrichment tool takes without a parser. Both writes the post with its thread and the comment rows beside it. A comment is charged once whichever you pick.",
            "default": "nested"
          },
          "includeSubredditInfo": {
            "title": "Include subreddit details",
            "type": "boolean",
            "description": "Attach the subreddit's own details to every row it produced: subscriber count, description, the date it was created, whether it is marked over 18, and its posted rules. It is context rather than a delivered row, so it costs nothing and appears in the run summary too.",
            "default": false
          },
          "sortNewestFirst": {
            "title": "Newest first",
            "type": "boolean",
            "description": "Order the rows by post date, newest first, before they are written. Runs above ten thousand posts are written in sorted blocks as they are collected, which is what keeps the run inside a small container. Turn this off to keep Reddit's own ordering instead.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}