{
  "openapi": "3.0.1",
  "info": {
    "title": "🚀 Reddit Scraper - Posts, Comments, Communities & Users",
    "description": "Extract Reddit posts, comments, communities & user profiles without API keys. 100% success rate with advanced anti-bot bypass. Get enriched data: vote ratios, flair, media URLs, awards, account age & more. Perfect for market research, sentiment analysis & competitor tracking.",
    "version": "0.1",
    "x-build-id": "pnFXc2CRX3ISdO8BR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/breezy_keypress~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-breezy_keypress-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/breezy_keypress~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-breezy_keypress-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/breezy_keypress~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-breezy_keypress-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": "📍 Start URLs",
            "type": "array",
            "description": "Reddit URLs to scrape directly (posts, subreddits, user profiles). Supports posts (comments included), subreddit pages (hot/top/new posts), and user profiles. Leave empty if you want to use keyword searches instead. Example: https://reddit.com/r/Python/, https://reddit.com/user/spez",
            "default": [
              {
                "url": "https://www.reddit.com/r/Python/"
              },
              {
                "url": "https://www.reddit.com/r/datascience/"
              },
              {
                "url": "https://www.reddit.com/user/spez"
              }
            ],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searches": {
            "title": "🔍 Search Keywords",
            "type": "array",
            "description": "List of keywords to search across Reddit. Each search will find posts, comments, communities, or users matching your terms (based on what search types you enable below). Great for brand monitoring, trend analysis, or finding discussions on specific topics.",
            "items": {
              "type": "string"
            }
          },
          "searchCommunityName": {
            "title": "🎯 Restrict to Subreddit",
            "type": "string",
            "description": "Optional: Limit your searches to a specific subreddit. Enter just the subreddit name without 'r/' (e.g., 'Python' not 'r/Python'). Leave empty to search all of Reddit. Useful for focused analysis of a single community."
          },
          "searchPosts": {
            "title": "📌 Search for Posts",
            "type": "boolean",
            "description": "Enable to find posts (submissions) matching your search keywords. Posts include title, text content, author, votes, and comments. This is the most common search type.",
            "default": true
          },
          "searchComments": {
            "title": "💬 Search for Comments",
            "type": "boolean",
            "description": "Enable to find individual comments matching your keywords. Useful for finding specific discussions or replies. Returns comment text, author, votes, and parent post information.",
            "default": false
          },
          "searchCommunities": {
            "title": "🌐 Search for Communities",
            "type": "boolean",
            "description": "Enable to find subreddits (communities) related to your keywords. Returns community name, description, member count, and category. Great for discovering relevant subreddits.",
            "default": false
          },
          "searchUsers": {
            "title": "👤 Search for Users",
            "type": "boolean",
            "description": "Enable to find user profiles matching your keywords. Returns username, karma, account age, and recent activity. Useful for finding influencers or active community members.",
            "default": false
          },
          "maxItems": {
            "title": "🎯 Max Items (Global Limit)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "GLOBAL LIMIT: Maximum total number of items to scrape across ALL sources and searches. The Actor stops immediately when this limit is reached. Set this based on your credit budget. Lower values = lower costs. Recommended: 100 for testing, 1000+ for production.",
            "default": 100
          },
          "maxPostCount": {
            "title": "📄 Max Posts Per Source",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum posts to scrape from each subreddit or search term. Controls depth of scraping per source. Example: If you search 5 keywords with maxPostCount=20, you could get up to 100 posts (but limited by global maxItems).",
            "default": 50
          },
          "maxComments": {
            "title": "💬 Max Comments Per Post",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum comments to extract from each post. Higher values give deeper discussion context but increase runtime. Set to 0 to skip comments entirely (fastest). Recommended: 20 for quick scraping, 100+ for deep analysis.",
            "default": 20
          },
          "maxCommunitiesCount": {
            "title": "🌐 Max Communities to Find",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of communities (subreddits) to find when 'Search for Communities' is enabled. Only applies to community searches.",
            "default": 10
          },
          "maxUserCount": {
            "title": "👤 Max Users to Find",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of user profiles to find when 'Search for Users' is enabled. Only applies to user searches.",
            "default": 10
          },
          "skipComments": {
            "title": "⚡ Skip Comments (Fast Mode)",
            "type": "boolean",
            "description": "Skip extracting comments from posts. Enables 10x faster scraping and significantly reduces credit usage. Enable this if you only need post data (titles, authors, votes) without discussions. Great for bulk post collection.",
            "default": false
          },
          "skipUserPosts": {
            "title": "👤 Skip User Posts (Profile Only)",
            "type": "boolean",
            "description": "When scraping user profiles, only get their account information (karma, join date) without their post/comment history. Faster and uses fewer credits. Only relevant when scraping user URLs.",
            "default": false
          },
          "sort": {
            "title": "📊 Sort Method",
            "enum": [
              "relevance",
              "hot",
              "top",
              "new",
              "comments"
            ],
            "type": "string",
            "description": "How to sort results when scraping subreddits or searches. 'relevance' = best matches for searches, 'top' = h ighest voted (use with time filter), 'hot' = trending now, 'new' = most recent, 'comments' = most discussed.",
            "default": "relevance"
          },
          "time": {
            "title": "⏰ Time Filter",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Filter posts by time range. Most useful with 'top' sort to find highest-voted content from a specific period. 'week' and 'month' are recommended for current trends. 'all' gives all-time results but may include very old content.",
            "default": "all"
          },
          "includeNSFW": {
            "title": "🔞 Include NSFW Content",
            "type": "boolean",
            "description": "Include Not Safe For Work (adult/sensitive) content in results. When disabled (recommended), NSFW posts are filtered out. Enable only if you specifically need adult content for your research.",
            "default": false
          },
          "debugMode": {
            "title": "🐛 Debug Mode",
            "type": "boolean",
            "description": "Enable detailed logging for troubleshooting. Shows request headers, proxy information, cookie details, and response statuses. Useful when debugging issues or verifying the scraper is working correctly. Increases log verbosity.",
            "default": false
          },
          "proxy": {
            "title": "🔒 Proxy Configuration",
            "type": "object",
            "description": "Proxy settings for the Actor. IMPORTANT: Use Apify Proxy with RESIDENTIAL group for best results (100% success rate). Datacenter proxies may get blocked by Reddit. The default configuration is optimal - only change if you know what you're doing."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}