{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper - Posts, Comments, Subreddits, Users & Search",
    "description": "For brand monitoring, market research, lead discovery and AI datasets: Reddit posts, comments, subreddits, user profiles and keyword search as table rows with text, author, score, date, flair and media links. No login or API key. Long runs finish with every row kept. Export to JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "SQpOxhI8fUpap9bFp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neverempty~reddit-thread-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neverempty-reddit-thread-extractor",
        "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/neverempty~reddit-thread-extractor/runs": {
      "post": {
        "operationId": "runs-sync-neverempty-reddit-thread-extractor",
        "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/neverempty~reddit-thread-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-neverempty-reddit-thread-extractor",
        "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": "Subreddit, post, user or search pages on reddit.com, for example https://www.reddit.com/r/technology/top/?t=week, https://www.reddit.com/r/AskReddit/comments/abc123/, https://www.reddit.com/user/spez/ or https://www.reddit.com/search/?q=coffee. Leave empty if you use the fields below.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "Subreddit names without r/, in any letter case, for example technology, askreddit or popular. Each one returns its posts in the order set in Sort. Leave empty if not needed.",
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "Users",
            "type": "array",
            "description": "Reddit user names without u/, in any letter case, for example spez. Each one returns the profile (karma, account date) and the user's posts and comments. Leave empty if not needed.",
            "items": {
              "type": "string"
            }
          },
          "searches": {
            "title": "Search terms",
            "type": "array",
            "description": "Words to search on Reddit, one per line, for example \"best crm for startups\". Choose below whether to search posts, comments, communities, users or media. Leave empty if not needed.",
            "items": {
              "type": "string"
            }
          },
          "searchPosts": {
            "title": "Search for posts",
            "type": "boolean",
            "description": "Return posts that match the search terms. On by default.",
            "default": true
          },
          "searchComments": {
            "title": "Search for comments",
            "type": "boolean",
            "description": "Also return comments that match the search terms, with the post they belong to. Off by default.",
            "default": false
          },
          "searchCommunities": {
            "title": "Search for communities",
            "type": "boolean",
            "description": "Also return subreddits that match the search terms, with description and weekly visitors. Off by default.",
            "default": false
          },
          "searchUsers": {
            "title": "Search for users",
            "type": "boolean",
            "description": "Also return Reddit users whose name or profile matches the search terms, with profile link, karma, description and avatar. Always searches all of Reddit. Off by default.",
            "default": false
          },
          "searchMedia": {
            "title": "Search for media (images and videos)",
            "type": "boolean",
            "description": "Also return image and video posts that match the search terms, with their image and video links. Off by default.",
            "default": false
          },
          "searchCommunityName": {
            "title": "Search inside one subreddit",
            "type": "string",
            "description": "Limit the search terms to one subreddit, for example technology. Leave empty to search all of Reddit."
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "relevance",
              "comments"
            ],
            "type": "string",
            "description": "Order of posts. For subreddits: hot, new, top or rising. For searches: relevance, hot, top, new or comments. Leave empty for Reddit's default (hot for subreddits, relevance for search). A sort written in a start URL wins over this field. A sort that does not apply (rising for a search, relevance or comments for a subreddit) stops the run with a free row."
          },
          "time": {
            "title": "Time range",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "For Top and for searches: hour, day, week, month, year or all. Leave empty for Reddit's default. With only subreddits that are not sorted by top, a time range stops the run with a free row (it would have no effect)."
          },
          "maxItems": {
            "title": "Maximum results in total",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many result rows (posts, comments, communities and users together) across all sources. Default 100.",
            "default": 100
          },
          "maxPostsPerSource": {
            "title": "Maximum posts per source",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Most posts (or search results) to return from each URL, subreddit, user or search term. Default 25.",
            "default": 25
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Open each post and return its full text and its top comments. Turn off for a faster, cheaper list of posts only (search results then come without the post text). On by default.",
            "default": true
          },
          "maxCommentsPerPost": {
            "title": "Maximum comments per post",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Most comments to return for each post when comments are included, in the order Reddit shows them. Default 10.",
            "default": 10
          },
          "includeCommunityInfo": {
            "title": "Include subreddit info",
            "type": "boolean",
            "description": "Return one row per subreddit with its title, description, weekly visitors and weekly contributions. On by default.",
            "default": true
          },
          "includeUserPosts": {
            "title": "Include the user's posts",
            "type": "boolean",
            "description": "For user pages, return the posts the user submitted. On by default.",
            "default": true
          },
          "includeUserComments": {
            "title": "Include the user's comments",
            "type": "boolean",
            "description": "For user pages, return the comments the user wrote. On by default.",
            "default": true
          },
          "postDateLimit": {
            "title": "Only posts since",
            "type": "string",
            "description": "Return only posts created on or after this date (YYYY-MM-DD). With Sort set to New, reading stops at the first page older than this date. Combine with \"Only posts until\" for a date range. Leave empty for no date limit."
          },
          "commentDateLimit": {
            "title": "Only comments since",
            "type": "string",
            "description": "Return only comments created on or after this date (YYYY-MM-DD). Leave empty for no date limit."
          },
          "postedBefore": {
            "title": "Only posts until",
            "type": "string",
            "description": "Return only posts created on or before this date (YYYY-MM-DD, the whole day in UTC) or time (for example 2026-01-31T12:00:00Z). Combine with \"Only posts since\" for a date range. Leave empty for no upper limit."
          },
          "commentedBefore": {
            "title": "Only comments until",
            "type": "string",
            "description": "Return only comments created on or before this date (YYYY-MM-DD, the whole day in UTC) or time. Combine with \"Only comments since\" for a date range. Leave empty for no upper limit."
          },
          "onlyWithFlair": {
            "title": "Only posts with a flair",
            "type": "boolean",
            "description": "Return only posts that have a post flair (the tag such as Discussion or Question). For search results the Actor opens each post to read its flair. Off by default.",
            "default": false
          },
          "includeNSFW": {
            "title": "Include NSFW posts",
            "type": "boolean",
            "description": "Keep posts and communities that Reddit marks as NSFW (18+) when Reddit shows them without logging in. Turn off to drop them. On by default.",
            "default": true
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}