{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper: Posts, Comments, Search & Users",
    "description": "Scrape Reddit posts and comments from subreddits, keyword searches, user profiles and post URLs. No login, no API key. Titles, full text, scores, flair, images, video and full comment threads as JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "5v2DcwffpLp6aSSFl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrape-lads~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrape-lads-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/scrape-lads~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrape-lads-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/scrape-lads~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrape-lads-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": {
          "startUrls": {
            "title": "Reddit URLs",
            "type": "array",
            "description": "Subreddits, user profiles, single posts or search pages, one per line. Full URLs (reddit.com/r/python/top/?t=week, reddit.com/user/spez, reddit.com/r/x/comments/abc123/..., reddit.com/search/?q=...) and short forms (r/python, u/spez) both work.",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Search keywords",
            "type": "array",
            "description": "Search all of Reddit for these words or phrases, one per line. Each keyword is its own search.",
            "items": {
              "type": "string"
            }
          },
          "searchSubreddit": {
            "title": "Search inside one subreddit",
            "type": "string",
            "description": "Limit the keyword searches to one subreddit, for example \"startups\". Leave empty to search all of Reddit."
          },
          "searchPosts": {
            "title": "Search posts",
            "type": "boolean",
            "description": "Keyword searches return matching posts.",
            "default": true
          },
          "searchComments": {
            "title": "Search comments",
            "type": "boolean",
            "description": "Keyword searches also return matching comments, with their full text and the post they are on. Charged as comments.",
            "default": false
          },
          "searchCommunities": {
            "title": "Search communities",
            "type": "boolean",
            "description": "Keyword searches also return matching subreddits with their description and weekly activity.",
            "default": false
          },
          "searchUsers": {
            "title": "Search users",
            "type": "boolean",
            "description": "Keyword searches also return matching user profiles with their karma and bio.",
            "default": false
          },
          "sort": {
            "title": "Subreddit and user sort",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "controversial"
            ],
            "type": "string",
            "description": "Order of subreddit and user posts. A sort in the URL itself (reddit.com/r/x/new/) wins over this setting. User profiles read New unless you pick Top.",
            "default": "hot"
          },
          "searchSort": {
            "title": "Search sort",
            "enum": [
              "relevance",
              "hot",
              "top",
              "new",
              "comments"
            ],
            "type": "string",
            "description": "Order of keyword search results.",
            "default": "relevance"
          },
          "time": {
            "title": "Time range",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Time window for Top and Controversial sorts and for searches.",
            "default": "week"
          },
          "maxPostsPerSource": {
            "title": "Max results per URL or keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Stop each subreddit, user or search once this many results pass your filters (posts, or comments, communities or users for those searches). Reddit lists at most about 1,000 posts per feed.",
            "default": 50
          },
          "maxPosts": {
            "title": "Max posts per run",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Total cap on posts across all URLs and keywords. The run stops reading posts when it is reached. Comment, community and user searches are capped per keyword only.",
            "default": 1000
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Also save up to this many comments for every post. 0 saves posts only. Comments are charged separately (see Pricing).",
            "default": 0
          },
          "commentSort": {
            "title": "Comment sort",
            "enum": [
              "best",
              "top",
              "new",
              "controversial",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "Which comments come first when a post has more than you ask for.",
            "default": "best"
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Save replies to comments too (each row has its depth and parent). Turn off to keep only top-level comments.",
            "default": true
          },
          "searchFullPosts": {
            "title": "Full text for search results",
            "type": "boolean",
            "description": "Reddit's search page shows only an excerpt of each post. Turn this on to open every result for its full text, media, flair and upvote ratio. Slower, and each opened result costs an extra $0.001.",
            "default": false
          },
          "postedAfter": {
            "title": "Posted after",
            "type": "string",
            "description": "Keep only posts published on or after this date. YYYY-MM-DD (UTC), an ISO timestamp, or a relative value such as \"7 days\" or \"12 hours\". Posts outside the range are not charged."
          },
          "postedBefore": {
            "title": "Posted before",
            "type": "string",
            "description": "Keep only posts published on or before this date (a bare date includes that whole day). Same formats as Posted after."
          },
          "commentsPostedAfter": {
            "title": "Comments posted after",
            "type": "string",
            "description": "Keep only comments published on or after this date. Same formats as Posted after. Applies to post comments and comment search results. Comments outside the range are not charged."
          },
          "commentsPostedBefore": {
            "title": "Comments posted before",
            "type": "string",
            "description": "Keep only comments published on or before this date (a bare date includes that whole day)."
          },
          "includeKeywords": {
            "title": "Must contain keywords",
            "type": "array",
            "description": "Keep only rows whose text contains these words or phrases (case-insensitive, whole words; end a word with * to match any ending, e.g. automat*). Posts are matched on title + text, comments on their text, communities and users on name + description. Filtered rows are not charged.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop rows that contain any of these words or phrases. Same matching as above.",
            "items": {
              "type": "string"
            }
          },
          "keywordMatch": {
            "title": "Keyword match",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "Keep a row when it contains any of the \"must contain\" keywords, or only when it contains all of them.",
            "default": "any"
          },
          "keywordFilterComments": {
            "title": "Filter post comments by keywords too",
            "type": "boolean",
            "description": "Off: every comment of a kept post is saved. On: comments under posts must match the keywords too. Comment search results are always filtered.",
            "default": false
          },
          "minScore": {
            "title": "Minimum score",
            "minimum": 0,
            "type": "integer",
            "description": "Skip posts with fewer upvotes (net score) than this."
          },
          "skipStickied": {
            "title": "Skip pinned posts",
            "type": "boolean",
            "description": "Skip posts pinned to the top of a subreddit or profile.",
            "default": false
          },
          "skipNsfw": {
            "title": "Skip NSFW posts",
            "type": "boolean",
            "description": "Skip posts marked NSFW (18+).",
            "default": false
          },
          "aiTagging": {
            "title": "AI tags for demand research",
            "type": "boolean",
            "description": "Add an aiTags field to every post and comment: the pain point, whether the writer asks for a tool or recommendation, is willing to pay or mentions a price, a feature request, the products named, and the sentiment. Each tagged row costs extra (see Pricing).",
            "default": false
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many pages load at the same time.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "The Actor brings its own residential proxy pool. This setting is only a fallback.",
            "default": {
              "useApifyProxy": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}