{
  "openapi": "3.0.1",
  "info": {
    "title": "Subreddit Scraper: Posts, Comments & Stats, $0.99/1K",
    "description": "$0.99/1K posts, $0.49/1K comments, no start fee. Past Reddit's 1,000-post limit with Combine sorts. No login or API key. Hot, new, top or rising posts with comments and community stats. Inputs: subreddit URLs, sort, time range, date windows, keywords, only-new, AI labels.",
    "version": "0.5",
    "x-build-id": "SMiapo2AlKCimLHhT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/laptime~subreddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-laptime-subreddit-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/laptime~subreddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-laptime-subreddit-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/laptime~subreddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-laptime-subreddit-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": "Subreddits",
            "type": "array",
            "description": "Subreddit links, one per row: https://www.reddit.com/r/webscraping/. A sort in the link (/new/, /top/?t=week, /rising/) wins over Sort. https://www.reddit.com/r/rust+golang/ reads several at once (each gets its own Max posts), /r/popular/ the Popular feed. old., new. and m.reddit.com links work, and so do post, search and user links.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "controversial",
              "relevance",
              "comments",
              ""
            ],
            "type": "string",
            "description": "One of: hot (default), new, top, rising, controversial. Used by subreddit URLs that have no sort in the URL. With top or controversial, Time range picks the period. Use new with Only posts newer than for monitoring: the run stops at the first older post.",
            "default": "hot"
          },
          "time": {
            "title": "Time range",
            "enum": [
              "all",
              "hour",
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "One of: all, hour, day, week, month, year. Reddit's own time filter, used by Sort = top or controversial and by searches; hot, new and rising ignore it. With All time and Only posts newer than set, the narrowest range that covers your window is used (e.g. 7 days = past week), so you get more posts inside it.",
            "default": "all"
          },
          "maxPostCount": {
            "title": "Max posts per subreddit",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum posts from each subreddit link, not per run: 3 subreddits × 100 = up to 300 posts. Default 100. Reddit lists about 1,000 posts per sort; turn on Combine sorts to go further, and raise Max items in total for big exports.",
            "default": 100
          },
          "combineSorts": {
            "title": "Combine sorts (beyond 1,000 posts)",
            "type": "boolean",
            "description": "Subreddit URLs only. true = read up to 13 lists (new, hot, rising, top and controversial over several time ranges) side by side and merge them without duplicates, to get past Reddit's ~1,000-post limit per list. You pay only for unique posts. Measured: 1,792 posts from r/lisp. It is not a full history: old low-score posts stay out of reach.",
            "default": false
          },
          "maxComments": {
            "title": "Max comments per post",
            "minimum": 0,
            "type": "integer",
            "description": "Comments per post, counting nested replies. Default 0 = posts only, the fastest and cheapest export. Try 20 for the top of each thread, or 5000 for whole threads. $0.49 per 1,000 comments.",
            "default": 0
          },
          "maxItems": {
            "title": "Max items in total",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on posts + comments for the whole run (default 1,000). Raise it for big exports, e.g. 5000 with Combine sorts. The run stops as soon as it is reached, so it doubles as a budget cap: 1,000 posts cost at most $0.99.",
            "default": 1000
          },
          "postDateLimit": {
            "title": "Only posts newer than",
            "type": "string",
            "description": "Skip posts created before this. A date (2026-11-01), a full ISO timestamp, or a relative time: 24 hours, 7 days, 2 weeks, 3 months, 1 year (short forms 24h, 7d; m = months). Relative times are counted from each run's start, so a schedule never needs editing. Skipped posts are not charged, and with Sort = new the run stops at the first older posts. Empty = no limit."
          },
          "postDateTo": {
            "title": "Only posts older than",
            "type": "string",
            "description": "Skip posts created after this (same formats as Only posts newer than). Set both for a date window, e.g. 2026-10-01 to 2026-10-31. Empty = no limit."
          },
          "includeKeywords": {
            "title": "Must contain any of",
            "type": "array",
            "description": "Keep only posts whose title or text contains at least one of these words or phrases (case-insensitive substring match, so \"app\" also matches \"apple\"). Applies to posts; the comments of a kept post are not filtered. Dropped posts are not charged. Empty = keep all.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Must not contain",
            "type": "array",
            "description": "Drop posts whose title or text contains any of these words or phrases (case-insensitive substring match), e.g. to filter out other meanings of your brand name. Dropped posts are not charged. Empty = drop nothing.",
            "items": {
              "type": "string"
            }
          },
          "minUpVotes": {
            "title": "Min upvotes",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only posts with at least this score (upvotes minus downvotes, the upVotes field). Lower-scored posts are skipped and not charged; their comments are not loaded. Empty or 0 = no minimum."
          },
          "minComments": {
            "title": "Min comments",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only posts that have at least this many comments on Reddit (the numberOfComments field), e.g. to find active discussions. Others are skipped and not charged. Empty or 0 = no minimum."
          },
          "postTypes": {
            "title": "Post types",
            "type": "array",
            "description": "Keep only these kinds of post (the mediaType field): text, image, gallery, video, link, poll. E.g. [\"text\"] for discussions only. Other posts are skipped and not charged. Empty = all kinds.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "image",
                "gallery",
                "video",
                "link",
                "poll"
              ],
              "enumTitles": [
                "text: text-only posts",
                "image: one image or GIF",
                "gallery: several images",
                "video: Reddit-hosted video",
                "link: a link to another site",
                "poll: a poll"
              ]
            }
          },
          "flairs": {
            "title": "Only posts with these flairs",
            "type": "array",
            "description": "Keep only posts whose flair (the flair field) is one of these, ignoring case, emoji and punctuation: \"Bot detection\" matches \"Bot detection 🤖\". \"*\" = any flair at all (drops posts without a flair). Others are skipped and not charged. Empty = all posts.",
            "items": {
              "type": "string"
            }
          },
          "excludeModPosts": {
            "title": "Skip pinned and moderator posts",
            "type": "boolean",
            "description": "true = leave out pinned (stickied) posts, posts a moderator or admin marked as official, and AutoModerator's posts (rules, daily threads, announcements). They are skipped and not charged. false (default) = keep them.",
            "default": false
          },
          "excludeAuthors": {
            "title": "Skip posts by these users",
            "type": "array",
            "description": "Leave out posts by these accounts (ignoring case, \"u/\" optional), e.g. bots or your own brand account. Skipped and not charged; their comments under other posts are kept. Empty = keep all authors.",
            "items": {
              "type": "string"
            }
          },
          "includeNSFW": {
            "title": "Include NSFW posts",
            "type": "boolean",
            "description": "true (default) = keep posts marked NSFW (18+). false = skip them; skipped posts are not charged.",
            "default": true
          },
          "commentSort": {
            "title": "Comment order",
            "enum": [
              "confidence",
              "top",
              "new",
              "controversial",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "One of: confidence (= Reddit's \"Best\"), top, new, controversial, old, qa. Decides which comments come first, and so which ones you get when Max comments per post cuts a thread short. Always sent to Reddit, so it wins over a subreddit's suggested order. Complete threads contain the same comments in any order.",
            "default": "confidence"
          },
          "maxCommentDepth": {
            "title": "Max reply depth",
            "minimum": 0,
            "type": "integer",
            "description": "Leave out replies nested deeper than this: 0 = top-level comments only, 1 = plus direct replies, and so on. Empty (default) = every depth, down to the deepest reply chain. A limit makes very big threads much faster. Not charged: left-out replies are never loaded."
          },
          "onlyNew": {
            "title": "Only new posts (monitoring)",
            "type": "boolean",
            "description": "true = skip posts that earlier runs with the same Monitor name already delivered, so scheduled runs return only new posts (comment-search hits and users' comments are remembered too). Skipped posts are not charged; a run with nothing new ends as Succeeded and costs nothing. The memory (the last 50,000 post IDs) is a key-value store named laptime-reddit-monitor-<this Actor's ID> in your own Apify account. New comments on already-delivered posts are not fetched again.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name of the memory used by Only new posts. Use one name per monitoring task (e.g. my-brand, competitor-x); runs with the same name share one memory. Empty = one memory per saved task (or per set of inputs)."
          },
          "webhookUrl": {
            "title": "Send results to a webhook (Slack, Discord or any URL)",
            "type": "string",
            "description": "Optional. When the run delivers rows, it POSTs a summary here: a Slack incoming-webhook or Discord webhook URL gets a message with the first 15 posts (title, link, subreddit, score; comments when the run has no posts) and a link to all rows; any other URL gets JSON (counts, dataset ID, first 50 posts or comments). Nothing is sent when nothing is new. Free."
          },
          "includeSubredditDetails": {
            "title": "Subreddit details",
            "type": "boolean",
            "description": "true (default) = add the subreddit's members, weekly visitors and contributions, description, icon, banner and type to every post (the community* fields). Not charged: one small request per distinct subreddit per run.",
            "default": true
          },
          "includeAuthorDetails": {
            "title": "Author details (karma, account age)",
            "type": "boolean",
            "description": "true = add each author's post karma, comment karma, account creation date and full-size avatar to posts and comments (authorPostKarma, authorCommentKarma, authorCreatedAt). One small request per distinct author, so runs with many authors take longer. Not charged. Default false.",
            "default": false
          },
          "archiveFallback": {
            "title": "Archive fallback",
            "type": "boolean",
            "description": "true (default) = if Reddit refuses a subreddit, a search limited with Search in subreddit, a user's posts or comments, or the rest of a comment thread, fill up from the Arctic Shift archive instead of failing. Archive rows have dataSource \"archive\", and their scores are from when they were archived. Searches across all of Reddit have no archive fallback.",
            "default": true
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "standard",
              "rag-markdown",
              "jsonl-finetune"
            ],
            "type": "string",
            "description": "\"standard\" = one row per post and per comment. \"rag-markdown\" = one document per post (dataType \"rag\": markdown/pageContent with the post and its comments, chunkId, flat metadata). \"jsonl-finetune\" = one OpenAI chat example per post (messages: system, user = post, assistant = comments). Documents: the post price includes 10 comments; more are charged as comments. Export as JSONL.",
            "default": "standard"
          },
          "aiAnalysis": {
            "title": "AI labels (sentiment, intent, lead score)",
            "type": "boolean",
            "description": "true = every post and comment gets aiSentiment (positive, negative, neutral, mixed) with aiSentimentScore (-1 to 1), aiIntent (buying_intent, recommendation_request, question, complaint, praise, self_promotion, job_post, news, discussion), aiEmotion, aiLeadScore (0-100) with aiLeadReason, aiTopic, aiEntities, aiLanguage and aiSummary. One \"ai-label\" event per labelled row ($0.30 per 1,000).",
            "default": false
          },
          "aiScope": {
            "title": "Label which rows",
            "enum": [
              "all",
              "posts",
              "comments"
            ],
            "type": "string",
            "description": "One of: all, posts, comments. \"posts\" labels only posts, the cheapest way to find leads; comments are still scraped.",
            "default": "all"
          },
          "aiContext": {
            "title": "What you sell or track",
            "type": "string",
            "description": "One or two sentences about your product, brand or competitors. The lead score and its reason are judged against this. Empty = general buying intent."
          },
          "aiFlags": {
            "title": "Yes/no flags",
            "type": "array",
            "description": "Ready-made questions answered for every labelled row, returned in aiLabels (e.g. aiLabels.wantsHelp = true). Each flag is one \"ai-custom-label\" event per row ($0.05 per 1,000). Turns on AI labels.",
            "items": {
              "type": "string",
              "enum": [
                "wantsHelp",
                "isVendor",
                "hasPain",
                "willingToPay",
                "mentionsPrice",
                "featureRequest",
                "isSwitching",
                "alreadySolved",
                "competitor",
                "painPoint"
              ],
              "enumTitles": [
                "wantsHelp: asks for help or recommendations",
                "isVendor: promotes their own product or company",
                "hasPain: describes a problem or frustration",
                "willingToPay: budget or ready to buy",
                "mentionsPrice: mentions a price, cost or budget",
                "featureRequest: asks for a missing feature",
                "isSwitching: wants to leave or replace a product",
                "alreadySolved: problem already solved",
                "competitor: the product they use or compare (text)",
                "painPoint: the main problem in a few words (text)"
              ]
            }
          },
          "aiCustomLabels": {
            "title": "Custom labels",
            "type": "object",
            "description": "Your own questions as {\"name\": \"instruction\"}, up to 10, returned in aiLabels.name. Start an instruction with \"yes/no:\" for a true/false answer; otherwise you get a short text answer (null for none). Same format as harshmaur's customLabels. Each label is one \"ai-custom-label\" event per row ($0.05 per 1,000). Turns on AI labels."
          },
          "aiThreadSummary": {
            "title": "Thread summaries",
            "type": "boolean",
            "description": "For each post with at least 2 comments, reads the post and its top comments (up to 40) and adds aiThreadSummary (what people are saying), aiThreadSentiment, aiThreadTopMentions (products recommended or discussed most) and aiThreadAnswered (did the author get a useful answer) to the post row. Uses the comments you scrape (Max comments per post). One \"ai-thread-summary\" event per summarised thread ($3 per 1,000).",
            "default": false
          },
          "aiApiKey": {
            "title": "Your own LLM API key (optional)",
            "type": "string",
            "description": "Bring your own key and pay no AI fees: the AI events above are not charged and your provider bills you for tokens (about $0.05-0.10 per 1,000 rows). Detected by prefix: OpenRouter (sk-or-...), Anthropic (sk-ant-...), Google Gemini (AIza...), anything else is treated as OpenAI. Stored encrypted."
          },
          "aiModel": {
            "title": "Model",
            "type": "string",
            "description": "Only with your own key: the model name at your provider. Defaults: meta/muse-ember (OpenRouter), gpt-4.1-nano (OpenAI), claude-haiku-5-5 (Anthropic), gemini-2.5-flash-lite (Gemini). Without your own key our tuned models are always used and this field is ignored."
          },
          "aiBaseUrl": {
            "title": "OpenAI-compatible endpoint (advanced)",
            "type": "string",
            "description": "Optional base URL of any OpenAI-compatible chat completions API (Groq, Together, Azure, a self-hosted model). Use with your API key and Model. No AI fees are charged."
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Parallel sessions (1-50, default 10), each on its own residential IP. Higher is faster for big runs. It does not change the price.",
            "default": 10
          },
          "ignoreStartUrls": {
            "title": "Ignore Start URLs",
            "type": "boolean",
            "description": "Compatibility switch for integrations built for trudax/reddit-scraper-lite that always send Start URLs. true = skip Start URLs and run only the Search terms.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}