{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper: Posts, Comments, Search & Users",
    "description": "Scrape Reddit posts, comments, subreddits and user profiles by keyword, subreddit, URL or username. No proxy needed, no API key. Buyer-intent tags on every row, monitor mode returns only new items on scheduled runs. Pay only for results.",
    "version": "1.0",
    "x-build-id": "GUZb41o1kWx875aGv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/axlymxp~reddit-posts-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-axlymxp-reddit-posts-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/axlymxp~reddit-posts-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-axlymxp-reddit-posts-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/axlymxp~reddit-posts-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-axlymxp-reddit-posts-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": {
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Keywords or phrases to search for. Reddit search operators work: `title:`, `selftext:`, `author:`, `flair:`, `site:`, `AND`, `OR`, `NOT`, quotes. One search per query (and per subreddit when subreddits are set).",
            "items": {
              "type": "string"
            }
          },
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "Subreddit names such as `webscraping` or `r/webscraping`. With search queries: the searches run inside these subreddits. Without queries: the subreddit feed is scraped (see Listing sort).",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Reddit URLs: a post (`/r/<sub>/comments/<id>/...`) returns the post and, if enabled, its comments; a subreddit URL (`/r/<sub>/` or `/r/<sub>/top/`) returns its feed; a user URL (`/user/<name>/`) returns the profile and content.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "usernames": {
            "title": "Usernames",
            "type": "array",
            "description": "Reddit usernames such as `spez` or `u/spez`: the profile plus their recent posts and comments (see User content).",
            "items": {
              "type": "string"
            }
          },
          "searchSort": {
            "title": "Search sort",
            "enum": [
              "relevance",
              "hot",
              "top",
              "new",
              "comments"
            ],
            "type": "string",
            "description": "Order of search results.",
            "default": "relevance"
          },
          "listingSort": {
            "title": "Listing sort",
            "enum": [
              "new",
              "hot",
              "top",
              "rising",
              "controversial"
            ],
            "type": "string",
            "description": "Order of a subreddit feed (used when subreddits are given without search queries, or for subreddit URLs).",
            "default": "new"
          },
          "timeFilter": {
            "title": "Time filter",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Time window for search and for `top` / `controversial` feeds.",
            "default": "month"
          },
          "postedAfter": {
            "title": "Posted after",
            "type": "string",
            "description": "Keep only posts created on or after this UTC date, e.g. `2026-09-01`. Comments are not date-filtered."
          },
          "postedBefore": {
            "title": "Posted before",
            "type": "string",
            "description": "Keep only posts created on or before this UTC date, e.g. `2026-09-30`."
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Fetch the comment tree of every post. Each comment is its own row (`type: comment`) with `post_id`, `parent_id` and `depth`.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap on comments stored per post (all depths, flattened). Larger values expand collapsed threads with extra API calls.",
            "default": 50
          },
          "commentSort": {
            "title": "Comment sort",
            "enum": [
              "confidence",
              "top",
              "new",
              "controversial",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "Which comments come first when a post has more than the cap.",
            "default": "confidence"
          },
          "intentKeywords": {
            "title": "Intent keywords",
            "type": "array",
            "description": "Phrases that mark a buyer, seeker or complaint. Every post and comment gets an `intent_matches` list of the phrases it contains (case-insensitive, whole words). Clear the list to disable.",
            "default": [
              "looking for",
              "recommend",
              "recommendation",
              "alternative to",
              "alternatives to",
              "best tool",
              "best way to",
              "any suggestions",
              "suggestions?",
              "how do i",
              "how do you",
              "what do you use",
              "is there a",
              "is there any",
              "worth it",
              "pricing",
              "too expensive",
              "switch from",
              "switching from",
              "need help",
              "anyone know",
              "does anyone",
              "hire",
              "hiring",
              "freelancer",
              "for hire",
              "frustrated",
              "hate that",
              "wish there was"
            ],
            "items": {
              "type": "string"
            }
          },
          "enrichAuthors": {
            "title": "Enrich authors",
            "type": "boolean",
            "description": "Add `author_karma`, `author_created_at` and `author_is_verified` to every post and comment (one extra API call per distinct author, up to 300 per run). Useful for ranking leads by account age and activity.",
            "default": false
          },
          "onlyNewSinceLastRun": {
            "title": "Only new since last run (monitor mode)",
            "type": "boolean",
            "description": "Remember the ids emitted by earlier runs with the same input and skip them, so a scheduled run returns only new posts and comments. Changing the input starts a fresh memory.",
            "default": false
          },
          "includeNsfw": {
            "title": "Include NSFW",
            "type": "boolean",
            "description": "Keep posts marked over-18.",
            "default": false
          },
          "userContent": {
            "title": "User content",
            "enum": [
              "overview",
              "submitted",
              "comments",
              "profile"
            ],
            "type": "string",
            "description": "What to fetch for each username: profile only, or the profile plus recent posts and/or comments.",
            "default": "overview"
          },
          "maxPostsPerSource": {
            "title": "Max posts per source",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Posts taken from each search, subreddit feed or user. Reddit serves at most about 1,000 per listing.",
            "default": 100
          },
          "maxItems": {
            "title": "Max items (total rows)",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on dataset rows for the run: posts, comments, users and subreddits together. You pay per row stored.",
            "default": 500
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. The actor works without a proxy at Reddit's limit of 100 API calls per 10 minutes per IP (it waits when the limit is hit). Enable Apify Proxy for large runs: the actor rotates to a fresh IP instead of waiting."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}