{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Comments Scraper: Full Threads & Replies, $0.49/1K",
    "description": "$0.49/1K comments, no start fee. Whole threads with every \"load more\" expanded. No login or API key. Same engine as the fastest Reddit scraper in our head-to-head tests. Inputs: post URLs, subreddits, search terms, sort, reply depth, date windows. Parent and root IDs.",
    "version": "0.5",
    "x-build-id": "co5dWnM9wwhiTktog"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/laptime~reddit-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-laptime-reddit-comments-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~reddit-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-laptime-reddit-comments-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~reddit-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-laptime-reddit-comments-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": "Post URLs (or subreddits)",
            "type": "array",
            "description": "Reddit links, one per row. A post link (https://www.reddit.com/r/name/comments/abc123/..., https://redd.it/abc123, /s/ share links, comment links; old., new. and m.reddit.com too) returns that post with its comments. A subreddit link (https://www.reddit.com/r/name/top/?t=week) returns the comments of its first posts (Max posts per subreddit). Search and user links work too. Combine with Search comments for: both run.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searches": {
            "title": "Search comments for",
            "type": "array",
            "description": "Optional. Keywords to find in Reddit comments, one per row, across Reddit or inside Search in subreddit: notion, \"exact phrase\", nike OR adidas. Each matching comment comes with postId and postTitle; each term returns up to Max posts per subreddit, or results per search. Turn on Search for posts to also get matching posts with their threads.",
            "items": {
              "type": "string"
            }
          },
          "searchCommunityName": {
            "title": "Search in subreddit",
            "type": "string",
            "description": "Optional. Run every search term inside one subreddit only: webscraping, r/webscraping or the subreddit's link. Empty = all of Reddit. Has no effect on Post URLs."
          },
          "searchComments": {
            "title": "Search for comments",
            "type": "boolean",
            "description": "true (default here) = Search terms return matching comments (dataType \"comment\", with postId and postTitle; depth and rootCommentId are null because the thread isn't loaded). Reddit ignores the time range for comment search, so it is applied by date here.",
            "default": true
          },
          "searchPosts": {
            "title": "Search for posts",
            "type": "boolean",
            "description": "false (default here) = Search terms return only matching comments. true = also return matching posts, each with its comment thread (Max comments per post).",
            "default": false
          },
          "maxComments": {
            "title": "Max comments per post",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum comments per post, in Comment order, counting nested replies (each reply is one comment). Default 100. No upper limit: 5000 gets a whole big thread, with every \"load more\" and \"continue this thread\" expanded. 0 = posts only. $0.49 per 1,000 comments.",
            "default": 100
          },
          "maxPostCount": {
            "title": "Max posts per subreddit, or results per search",
            "minimum": 1,
            "type": "integer",
            "description": "For a subreddit link: how many of its posts to read, each with its comments. For a search term: how many matching comments (and, with Search for posts, posts). A post link always returns its one post. Default 10.",
            "default": 10
          },
          "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."
          },
          "maxItems": {
            "title": "Max items in total",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on posts + comments for the whole run (default 2,000). The run stops as soon as it is reached, so it doubles as a budget cap: 2,000 comments cost at most $0.98.",
            "default": 2000
          },
          "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"
          },
          "commentDateLimit": {
            "title": "Only comments newer than",
            "type": "string",
            "description": "Skip comments created before this (same formats as Only posts newer than). Skipped comments are not charged. Empty = no limit."
          },
          "commentDateTo": {
            "title": "Only comments older than",
            "type": "string",
            "description": "Skip comments created after this (same formats as Only posts newer than). Empty = no limit."
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "hot",
              "top",
              "new",
              "comments",
              "rising",
              "controversial",
              "",
              "best",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "Order of the posts read from subreddit links without a sort in the link (hot, new, top, rising, controversial; relevance and Default mean hot), and of search results (relevance, new or top). With top, Time range picks the period. Comment order inside a thread is set by Comment order. Best, Old and Q&A are comment orders, accepted for inputs from other comment Actors and applied as Comment order.",
            "default": "relevance"
          },
          "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"
          },
          "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."
          },
          "strictSearch": {
            "title": "Strict search (only exact matches)",
            "type": "boolean",
            "description": "true (default here) = keep only comments (and posts) that really contain your search words: every word (plurals and any case are fine), \"quoted phrases\" as written, -word absent, OR for alternatives. Reddit's comment search also returns loosely related comments; those are dropped and not charged. false = keep what Reddit returns.",
            "default": true
          },
          "minUpVotes": {
            "title": "Min post upvotes",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only posts with at least this score (from subreddit links, post links and Search for posts). Skipped posts are not charged and their comments are not loaded. Comments themselves are not filtered by score. Empty or 0 = no minimum."
          },
          "minComments": {
            "title": "Min comments on a post",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only posts that have at least this many comments on Reddit (the numberOfComments field), e.g. to skip quiet threads in a subreddit. Skipped posts are not charged and their comments are not loaded. Empty or 0 = no minimum."
          },
          "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
          },
          "excludeAuthors": {
            "title": "Skip posts by these users",
            "type": "array",
            "description": "Leave out posts by these accounts (ignoring case, \"u/\" optional), with their comment threads. Skipped and not charged. Comments these accounts wrote under other posts are kept. Empty = keep all authors.",
            "items": {
              "type": "string"
            }
          },
          "fillCommentsFromArchive": {
            "title": "Fill comments from archive",
            "type": "boolean",
            "description": "true = after loading a thread from Reddit, also add the comments the Arctic Shift archive has that Reddit no longer shows logged out (mostly removed or deleted since; about 1-5% of big threads). They keep their place in the tree and have dataSource \"archive\". Default false. (When Reddit refuses to load a thread's remaining comments, the archive fills in automatically while Archive fallback is on.)",
            "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
          },
          "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
          },
          "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": "comments"
          },
          "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}