{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper",
    "description": "Reddit scraper, no login or session token: Reddit posts, comments, search results, subreddits and users. Inputs and field names from other Reddit scrapers work as they are, so saved inputs and automations switch without edits. $2 per 1,000 posts, $0.50 per 1,000 comments.",
    "version": "1.0",
    "x-build-id": "73wvqTxLNItV121b7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/openclawai~reddit-scraper-no-login/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-openclawai-reddit-scraper-no-login",
        "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/openclawai~reddit-scraper-no-login/runs": {
      "post": {
        "operationId": "runs-sync-openclawai-reddit-scraper-no-login",
        "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/openclawai~reddit-scraper-no-login/run-sync": {
      "post": {
        "operationId": "run-sync-openclawai-reddit-scraper-no-login",
        "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": "Any reddit.com links, one per line: a subreddit (https://www.reddit.com/r/Python/top/?t=week), a post (…/comments/abc123/…), a user (https://www.reddit.com/user/spez) or a search page (https://www.reddit.com/search/?q=laptop). Sort and time in the URL are respected.",
            "items": {
              "type": "string"
            }
          },
          "subreddits": {
            "title": "📝 Subreddits",
            "type": "array",
            "description": "Subreddit names to crawl, without r/ — e.g. 'MachineLearning'. Uses the Sort and Time settings below.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searches": {
            "title": "🔍 Search keywords",
            "type": "array",
            "description": "Keywords or phrases to search across Reddit (or inside one subreddit, see below). Each keyword is its own search.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "🎯 What to search for",
            "enum": [
              "posts",
              "communities",
              "users"
            ],
            "type": "string",
            "description": "Posts (default), communities (subreddits) or users matching the keywords.",
            "default": "posts"
          },
          "searchSubreddit": {
            "title": "📍 Limit search to one subreddit (optional)",
            "type": "string",
            "description": "Restrict keyword searches to a single subreddit, e.g. 'programming'. Leave empty to search all of Reddit."
          },
          "users": {
            "title": "👤 Users",
            "type": "array",
            "description": "Usernames to scrape (profile, their posts and their comments), without u/.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "📊 Sort",
            "enum": [
              "",
              "hot",
              "new",
              "top",
              "rising",
              "controversial",
              "relevance",
              "comments"
            ],
            "type": "string",
            "description": "Subreddits: hot, new, top, rising, controversial. Searches: relevance, hot, top, new, comments. Leave empty for the platform default (hot / relevance). With a search sorted by hot, top, new or comments, the keyword must be in the post title; relevance also matches the post text. Ignored when the URL already contains a sort.",
            "default": ""
          },
          "time": {
            "title": "⏰ Time range",
            "enum": [
              "all",
              "hour",
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Applies to Top / Controversial sorts and to searches.",
            "default": "all"
          },
          "maxItems": {
            "title": "🔢 Max items per input",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Posts per subreddit / search / user, or comments / communities / users per search (1–10,000). Reddit itself stops any single listing at about 1,000.",
            "default": 50
          },
          "includeComments": {
            "title": "💬 Include comments on every post",
            "type": "boolean",
            "description": "Fetch the comment tree for each post (nested replies flattened with depth and parent). Slower. Comments attached to posts are free until Nov 20, 2026, then $0.0005 each ($0.50 per 1,000) from Nov 21, 2026.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "💬 Max comments per post",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on comments collected per post when Include comments is on (1–500). The Actor keeps reading Reddit's comment pages until it reaches your cap or the thread has no more comments to show (up to about 100 pages per post), so big threads fill caps up to 500. Reddit's comment count on a post can be higher than the comments its pages show, so some threads return fewer.",
            "default": 50
          },
          "commentSort": {
            "title": "💬 Comment order",
            "enum": [
              "top",
              "new",
              "controversial",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "How comments are ordered before the cap is applied.",
            "default": "top"
          },
          "postedAfter": {
            "title": "📅 Posts on or after (YYYY-MM-DD)",
            "type": "string",
            "description": "Keep only posts created on or after this date (UTC). Combine with Sort = new for date-window crawls."
          },
          "postedBefore": {
            "title": "📅 Posts on or before (YYYY-MM-DD)",
            "type": "string",
            "description": "Keep only posts created on or before this date (UTC)."
          },
          "includeNSFW": {
            "title": "🔞 Include NSFW content",
            "type": "boolean",
            "description": "Off drops posts and communities marked 18+.",
            "default": true
          },
          "onlyNew": {
            "title": "🆕 Only new since last run",
            "type": "boolean",
            "description": "For scheduled runs and monitoring: skip posts and comments this actor already returned to you in earlier runs with the same input, so each run returns and bills only new items. Remembers the last 20,000 items per input. Changing the limits keeps the memory; changing subreddits, searches or URLs starts a new one.",
            "default": false
          },
          "answerQueries": {
            "title": "🤖 Reddit AI Answers questions (optional)",
            "type": "array",
            "description": "Questions to ask Reddit's built-in AI Answers engine. Each answer is one row with sources.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "threads": {
            "title": "⚡ Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many inputs run in parallel (1–20).",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "🛡️ Proxy",
            "type": "object",
            "description": "Residential proxy (default) keeps runs reliable; Reddit throttles datacenter IPs.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "action": {
            "title": "Legacy: action (older saved inputs)",
            "enum": [
              "scrape_subreddit",
              "search_posts",
              "search_comments",
              "search_subreddits",
              "fetch_post",
              "reddit_answers"
            ],
            "type": "string",
            "description": "Older saved inputs only. Prefer the fields above."
          },
          "subreddit": {
            "title": "Legacy: subreddit",
            "type": "string",
            "description": "Older saved inputs only."
          },
          "query": {
            "title": "Legacy: query",
            "type": "string",
            "description": "Older saved inputs only."
          },
          "postUrl": {
            "title": "Legacy: post URL",
            "type": "string",
            "description": "Older saved inputs only."
          },
          "limit": {
            "title": "Legacy: limit",
            "type": "integer",
            "description": "Older saved inputs only."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}