{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper — Posts, Comments, Search & Profiles",
    "description": "Scrape Reddit posts and comments from subreddits, keyword searches, post URLs and user profiles. One clean row per post (title, text, author, score, upvote ratio, comments, date, flair, media, NSFW) and per comment (parent, depth). Date filter. No login or API key.",
    "version": "0.1",
    "x-build-id": "UbDMQh3C1zl6SgvSN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/inovaflow~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-inovaflow-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/inovaflow~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-inovaflow-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/inovaflow~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-inovaflow-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": {
          "subreddits": {
            "title": "Subreddits",
            "maxItems": 200,
            "type": "array",
            "description": "Community names, one per line — `startups`, `r/SaaS` or a URL like `https://www.reddit.com/r/startups/top/?t=week` (a sort in the URL wins over the sort below).",
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Subreddit and profile sort",
            "enum": [
              "new",
              "hot",
              "top",
              "rising",
              "controversial"
            ],
            "type": "string",
            "description": "Which feed to read for subreddits and user profiles. `new` = newest first (best for monitoring and for the \"posted after\" filter).",
            "default": "new"
          },
          "timeFilter": {
            "title": "Time window (top, controversial and search)",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Limits `top` and `controversial` feeds and keyword searches to a period. Ignored by `new`, `hot` and `rising`.",
            "default": "all"
          },
          "searchQueries": {
            "title": "Keyword searches",
            "maxItems": 100,
            "type": "array",
            "description": "Search terms, one per line — `notion alternative`, `\"cold email\" agency`. Reddit's search operators work (`subreddit:SaaS`, `author:name`, `title:crm`, quotes, `OR`).",
            "items": {
              "type": "string"
            }
          },
          "searchSubreddit": {
            "title": "Search inside one subreddit (optional)",
            "type": "string",
            "description": "Leave empty to search all of Reddit. Set a community name (e.g. `SaaS`) to search only there."
          },
          "searchSort": {
            "title": "Search sort",
            "enum": [
              "new",
              "relevance",
              "top",
              "comments",
              "hot"
            ],
            "type": "string",
            "description": "`new` = newest matches first, `relevance` = Reddit's best matches, `top` = most upvoted, `comments` = most discussed.",
            "default": "new"
          },
          "postUrls": {
            "title": "Post URLs (with their comment threads)",
            "maxItems": 1000,
            "type": "array",
            "description": "Links to posts, one per line — full URLs, `redd.it` short links, `/s/` share links or bare post ids. Each gives the post row plus its comment thread, up to the comment limit below.",
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "User profiles",
            "maxItems": 200,
            "type": "array",
            "description": "Usernames or profile URLs, one per line — `spez`, `u/spez`, `https://www.reddit.com/user/spez/`. Returns what the user posted (or commented — see below).",
            "items": {
              "type": "string"
            }
          },
          "userContent": {
            "title": "From profiles, get",
            "enum": [
              "posts",
              "comments",
              "both"
            ],
            "type": "string",
            "description": "Posts the user submitted, their comments, or both.",
            "default": "posts"
          },
          "maxPostsPerSource": {
            "title": "Maximum posts per source",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap for each subreddit, each search and each profile. Reddit itself lists at most ~1,000 posts per feed and ~250 per search. Also caps what you pay.",
            "default": 100
          },
          "postedAfter": {
            "title": "Only posts after",
            "type": "string",
            "description": "Skip older posts: a date (`2026-09-01`) or a window (`24 hours`, `7 days`, `2 weeks`). With the `new` sort, reading stops at the first older post — you pay only for what is newer."
          },
          "includeComments": {
            "title": "Also get comments for every post",
            "type": "boolean",
            "description": "Off = post rows only (comments come only for the post URLs above). On = each post from subreddits, searches and profiles also gets its comment thread.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Maximum comments per post",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Cap on comment rows per thread. \"Load more\" branches are expanded until the cap is reached.",
            "default": 500
          },
          "commentSort": {
            "title": "Comment order",
            "enum": [
              "confidence",
              "top",
              "new",
              "controversial",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "Which comments come first — this decides which ones you get when a thread is bigger than the cap.",
            "default": "confidence"
          },
          "includeNsfw": {
            "title": "Include NSFW posts",
            "type": "boolean",
            "description": "Off = posts marked NSFW (18+) are skipped. On = they are delivered with `nsfw: true`.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many threads are read at once. The default suits almost every run.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Reddit blocks datacenter IPs, so the Actor always uses Apify's residential proxy (you can pick its country here, or supply your own proxy URLs). Proxy traffic is included in the price.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}