{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper - Posts, Comments, Search, AI Answers, MCP, AI",
    "description": "The only Reddit scraper with AI Answers + TLS fingerprinting. Scrape posts, comments, search results & subreddits. No API key, no login. AI-ready JSON output. 6 actions in 1   Actor. Browser-grade anti-detection. Parallel comment fetching. $2/1k posts.",
    "version": "2.0",
    "x-build-id": "TXNfgeMEfkCTd8LTn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/openclawai~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-openclawai-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/openclawai~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-openclawai-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/openclawai~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-openclawai-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": "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). 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; posts still cost the same, comments inside a post are free.",
            "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).",
            "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
          },
          "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}