{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Intelligence Scraper",
    "description": "Collect public Reddit posts, comments, communities, and user profile data from searches, subreddit pages, Reddit URLs, and usernames. Export clean datasets for monitoring, research, and AI workflows.",
    "version": "0.1",
    "x-build-id": "ZrUQKg4qQQRh3wju9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/qaseemiqbal~reddit-intelligence-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-qaseemiqbal-reddit-intelligence-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/qaseemiqbal~reddit-intelligence-scraper/runs": {
      "post": {
        "operationId": "runs-sync-qaseemiqbal-reddit-intelligence-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/qaseemiqbal~reddit-intelligence-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-qaseemiqbal-reddit-intelligence-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": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords or phrases to search across Reddit.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Direct Reddit URLs",
            "type": "array",
            "description": "Direct Reddit URLs to scrape, such as post URLs, subreddit pages, user pages, all/popular listings, or Reddit search URLs.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "subredditUrls": {
            "title": "Full subreddit scrape inputs",
            "type": "array",
            "description": "Subreddits to traverse. Accepts names, r/name, or full subreddit URLs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "userUrls": {
            "title": "User profile inputs",
            "type": "array",
            "description": "Reddit usernames or user profile URLs to scrape.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "withinCommunity": {
            "title": "Search within subreddit",
            "type": "string",
            "description": "Optional subreddit restriction for search terms.",
            "default": ""
          },
          "searchPosts": {
            "title": "Search posts",
            "type": "boolean",
            "description": "Search for Reddit posts matching the search terms.",
            "default": true
          },
          "searchComments": {
            "title": "Search comments",
            "type": "boolean",
            "description": "Search for Reddit comments matching the search terms.",
            "default": false
          },
          "searchCommunities": {
            "title": "Search communities",
            "type": "boolean",
            "description": "Search for subreddits/communities matching the search terms.",
            "default": false
          },
          "searchUsers": {
            "title": "Search users",
            "type": "boolean",
            "description": "Search for public Reddit users matching the search terms.",
            "default": false
          },
          "searchMedia": {
            "title": "Search media posts",
            "type": "boolean",
            "description": "Keep media-bearing post results from search.",
            "default": false
          },
          "sort": {
            "title": "Search sort",
            "enum": [
              "relevance",
              "hot",
              "top",
              "new",
              "comments"
            ],
            "type": "string",
            "description": "Ranking method for Reddit search results.",
            "default": "new"
          },
          "time": {
            "title": "Search time range",
            "enum": [
              "all",
              "hour",
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Reddit-side time window for search results.",
            "default": "all"
          },
          "strictSearch": {
            "title": "Strict Reddit search",
            "type": "boolean",
            "description": "Use stricter query construction where possible.",
            "default": false
          },
          "strictTokenFilter": {
            "title": "Strict saved-record token filter",
            "type": "boolean",
            "description": "After collection, keep only records whose searchable text matches the important query tokens.",
            "default": false
          },
          "excludeTerms": {
            "title": "Exclude terms",
            "type": "array",
            "description": "Terms that disqualify a record when found in searchable text.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "subredditSort": {
            "title": "Subreddit sort",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "comments"
            ],
            "type": "string",
            "description": "Ranking method for subreddit listing traversal.",
            "default": "new"
          },
          "subredditTime": {
            "title": "Subreddit time range",
            "enum": [
              "all",
              "hour",
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Time range for top-style subreddit traversal.",
            "default": "all"
          },
          "maximizeCoverage": {
            "title": "Maximum coverage mode",
            "type": "boolean",
            "description": "Expand broad queries and subreddits across complementary result views, then deduplicate.",
            "default": false
          },
          "crawlCommentsPerPost": {
            "title": "Crawl comments for each post",
            "type": "boolean",
            "description": "Collect comments for every post discovered from direct URLs, searches, or subreddits.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 0,
            "maximum": 2147483647,
            "type": "integer",
            "description": "Maximum comments to collect for each post.",
            "default": 25
          },
          "maxCommentsCount": {
            "title": "Max searched comments",
            "minimum": 0,
            "maximum": 2147483647,
            "type": "integer",
            "description": "Maximum comments to collect from comment search per search term.",
            "default": 50
          },
          "commentDepthLimit": {
            "title": "Comment depth limit",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum nested comment depth. Use 0 for no depth limit.",
            "default": 0
          },
          "commentSort": {
            "title": "Comment sort",
            "enum": [
              "confidence",
              "top",
              "new",
              "controversial",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "Preferred comment ordering where supported.",
            "default": "confidence"
          },
          "commentDateFrom": {
            "title": "Comment date from",
            "type": "string",
            "description": "Optional lower date bound for comments. Accepts ISO datetime or YYYY-MM-DD.",
            "default": ""
          },
          "commentDateTo": {
            "title": "Comment date to",
            "type": "string",
            "description": "Optional upper date bound for comments. Accepts ISO datetime or YYYY-MM-DD.",
            "default": ""
          },
          "dateFrom": {
            "title": "Post date from",
            "type": "string",
            "description": "Optional lower date bound for posts. Accepts ISO datetime or YYYY-MM-DD.",
            "default": ""
          },
          "dateTo": {
            "title": "Post date to",
            "type": "string",
            "description": "Optional upper date bound for posts. Accepts ISO datetime or YYYY-MM-DD.",
            "default": ""
          },
          "forceSortNewForTimeFilteredRuns": {
            "title": "Force chronological traversal for date filters",
            "type": "boolean",
            "description": "When a post date filter is active, use chronological traversal where possible.",
            "default": true
          },
          "includeNsfw": {
            "title": "Include NSFW content",
            "type": "boolean",
            "description": "Include posts or communities marked as NSFW/18+.",
            "default": false
          },
          "maxItems": {
            "title": "Global max records",
            "minimum": 0,
            "maximum": 2147483647,
            "type": "integer",
            "description": "Maximum dataset records to save across all record types.",
            "default": 100
          },
          "maxPostsPerSearch": {
            "title": "Max posts per search term",
            "minimum": 0,
            "maximum": 2147483647,
            "type": "integer",
            "description": "Maximum post records to collect for each search term.",
            "default": 25
          },
          "maxPostsPerSubreddit": {
            "title": "Max posts per subreddit",
            "minimum": 0,
            "maximum": 2147483647,
            "type": "integer",
            "description": "Maximum post records to collect for each subreddit input.",
            "default": 50
          },
          "maxPostsPerUser": {
            "title": "Max posts per user",
            "minimum": 0,
            "maximum": 2147483647,
            "type": "integer",
            "description": "Maximum public user posts to collect per user input.",
            "default": 25
          },
          "maxCommunitiesCount": {
            "title": "Max communities",
            "minimum": 0,
            "maximum": 2147483647,
            "type": "integer",
            "description": "Maximum community records to collect per community search.",
            "default": 25
          },
          "maxUsersCount": {
            "title": "Max users",
            "minimum": 0,
            "maximum": 2147483647,
            "type": "integer",
            "description": "Maximum user profile records to collect per user search.",
            "default": 25
          },
          "maxRequestsPerRun": {
            "title": "Max requests per run",
            "minimum": 1,
            "maximum": 2147483647,
            "type": "integer",
            "description": "Safety cap for total queued request processing.",
            "default": 500
          },
          "includeMediaLinks": {
            "title": "Include media links",
            "type": "boolean",
            "description": "Extract media URLs, galleries, preview images, videos, and outbound links.",
            "default": false
          },
          "includeAwards": {
            "title": "Include awards",
            "type": "boolean",
            "description": "Extract Reddit award/gilding metadata where available.",
            "default": false
          },
          "includeRawHtml": {
            "title": "Include raw HTML body",
            "type": "boolean",
            "description": "Include HTML-formatted body fields where available.",
            "default": false
          },
          "saveRawData": {
            "title": "Save raw Reddit payloads",
            "type": "boolean",
            "description": "Save raw payloads to the default key-value store for debugging.",
            "default": false
          },
          "skipComments": {
            "title": "Skip comments",
            "type": "boolean",
            "description": "Disable comment extraction even for post URLs unless comment search is enabled.",
            "default": false
          },
          "skipUserPosts": {
            "title": "Skip user posts",
            "type": "boolean",
            "description": "Do not collect public posts when scraping user profiles.",
            "default": true
          },
          "skipCommunityDetails": {
            "title": "Skip community details",
            "type": "boolean",
            "description": "Do not collect separate community metadata records for subreddit inputs.",
            "default": true
          },
          "sentimentAnalysis": {
            "title": "Sentiment analysis",
            "type": "boolean",
            "description": "Add sentiment scores and labels to posts and comments.",
            "default": false
          },
          "contentAnalysis": {
            "title": "Content category analysis",
            "type": "boolean",
            "description": "Classify posts into a stable topic taxonomy.",
            "default": false
          },
          "engagementAnalysis": {
            "title": "Engagement analysis",
            "type": "boolean",
            "description": "Add normalized engagement metrics.",
            "default": true
          },
          "languageDetection": {
            "title": "Language detection",
            "type": "boolean",
            "description": "Detect likely language for post/comment text with a lightweight local heuristic.",
            "default": false
          },
          "fastMode": {
            "title": "Fast mode",
            "enum": [
              "auto",
              "always",
              "never"
            ],
            "type": "string",
            "description": "Use HTTP/direct extraction when possible.",
            "default": "auto"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of parallel tasks.",
            "default": 6
          },
          "maxRequestsPerMinute": {
            "title": "Max requests per minute",
            "minimum": 1,
            "maximum": 6000,
            "type": "integer",
            "description": "Rate limit for outbound requests.",
            "default": 60
          },
          "requestTimeoutSecs": {
            "title": "Request timeout seconds",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Timeout for individual requests.",
            "default": 20
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum retries per request before failure.",
            "default": 0
          },
          "retryHostFallback": {
            "title": "Retry alternate Reddit hosts",
            "type": "boolean",
            "description": "When enabled, retry failed Reddit JSON requests on old.reddit.com and api.reddit.com. Keep disabled for lowest cost because it can multiply failed requests.",
            "default": false
          },
          "scrollTimeoutSecs": {
            "title": "Browser scroll timeout seconds",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Reserved for browser fallback.",
            "default": 30
          },
          "debugMode": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Enable verbose logging and additional diagnostics.",
            "default": false
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "unified",
              "split"
            ],
            "type": "string",
            "description": "Unified stores all records in the default dataset. Split also writes record-type datasets.",
            "default": "unified"
          },
          "deduplicate": {
            "title": "Deduplicate records",
            "type": "boolean",
            "description": "Save each Reddit entity once per run using a stable dedupe key.",
            "default": true
          },
          "aggregateDuplicateSources": {
            "title": "Aggregate duplicate sources",
            "type": "boolean",
            "description": "Track all source contexts when the same entity is rediscovered.",
            "default": true
          },
          "writeRunSummary": {
            "title": "Write run summary",
            "type": "boolean",
            "description": "Write RUN-SUMMARY.json to the key-value store.",
            "default": true
          },
          "writeHtmlReport": {
            "title": "Write HTML report",
            "type": "boolean",
            "description": "Write RUN-MAP.html dashboard to the key-value store.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Apify cloud traffic to Reddit is commonly blocked without Residential proxy. Residential proxy is enabled by default for reliability; disable it only if direct access works for your use case.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}