{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Real-Time Data Scraper – Fast Reddit API Alternative",
    "description": "Scrape Reddit posts, comments, users, subreddits, search & trending in real time. Fast, lightweight, no API key, no browser. Export clean JSON/CSV with rich data points — 8 tools in one. Built-in proxy, MCP-ready, schedule for live monitoring & alerts.",
    "version": "0.0",
    "x-build-id": "kFX0PXTHU6nc2GNce"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/b2b_leads~reddit-real-time-data-scraper-fast-reddit-api-alternative/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-b2b_leads-reddit-real-time-data-scraper-fast-reddit-api-alternative",
        "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/b2b_leads~reddit-real-time-data-scraper-fast-reddit-api-alternative/runs": {
      "post": {
        "operationId": "runs-sync-b2b_leads-reddit-real-time-data-scraper-fast-reddit-api-alternative",
        "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/b2b_leads~reddit-real-time-data-scraper-fast-reddit-api-alternative/run-sync": {
      "post": {
        "operationId": "run-sync-b2b_leads-reddit-real-time-data-scraper-fast-reddit-api-alternative",
        "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": {
          "enableSubredditPosts": {
            "title": "Subreddit Posts",
            "type": "boolean",
            "description": "Fetch posts from one or more subreddits (hot, new, top, rising, controversial). Enabled by default.",
            "default": true
          },
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "Subreddit names or URLs (without r/ prefix is fine). Required when Subreddit Posts is enabled.",
            "default": [
              "technology"
            ],
            "items": {
              "type": "string"
            }
          },
          "postSort": {
            "title": "Post sort",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "controversial"
            ],
            "type": "string",
            "description": "How to sort subreddit post listings.",
            "default": "hot"
          },
          "postTime": {
            "title": "Time filter",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Time window for top/controversial sorts.",
            "default": "day"
          },
          "postsPerSubreddit": {
            "title": "Posts per subreddit",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum posts to return per subreddit (1–1000).",
            "default": 25
          },
          "enablePostComments": {
            "title": "Post & Comments",
            "type": "boolean",
            "description": "Fetch a post plus its full comment thread.",
            "default": false
          },
          "postUrls": {
            "title": "Post URLs or IDs",
            "type": "array",
            "description": "Reddit post URLs or post IDs to scrape with comments.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "commentSort": {
            "title": "Comment sort",
            "enum": [
              "confidence",
              "best",
              "top",
              "new",
              "controversial",
              "old",
              "qa"
            ],
            "type": "string",
            "description": "Sort order for comments on each post.",
            "default": "confidence"
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum comments to collect per post (1–5000).",
            "default": 100
          },
          "maxCommentDepth": {
            "title": "Max comment depth",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum nesting depth for comment threads.",
            "default": 10
          },
          "expandMoreComments": {
            "title": "Expand \"load more\" comments",
            "type": "boolean",
            "description": "Follow Reddit \"load more comments\" placeholders for deeper threads.",
            "default": true
          },
          "commentTreeFormat": {
            "title": "Comment output format",
            "enum": [
              "flat",
              "nested"
            ],
            "type": "string",
            "description": "flat = one row per comment; nested = nested replies on parent rows.",
            "default": "flat"
          },
          "enableSearch": {
            "title": "Search",
            "type": "boolean",
            "description": "Search Reddit by keyword site-wide or within subreddits.",
            "default": false
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Keywords to search (1–20). Required when Search is enabled.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchSubreddits": {
            "title": "Restrict search to subreddits",
            "type": "array",
            "description": "Leave empty for site-wide search, or list subreddits to scope each query.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchSort": {
            "title": "Search sort",
            "enum": [
              "relevance",
              "hot",
              "top",
              "new",
              "comments"
            ],
            "type": "string",
            "description": "How to sort Reddit search results.",
            "default": "relevance"
          },
          "searchTime": {
            "title": "Search time filter",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Time window for search results (applies to top and relevance sorts).",
            "default": "all"
          },
          "searchType": {
            "title": "Search result type",
            "enum": [
              "link",
              "sr",
              "user"
            ],
            "type": "string",
            "description": "Whether to return posts, subreddits, or users from search.",
            "default": "link"
          },
          "resultsPerQuery": {
            "title": "Results per query",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum results to return per search query (1–1000).",
            "default": 25
          },
          "enableUserProfile": {
            "title": "User Profile",
            "type": "boolean",
            "description": "Fetch Reddit user about info, submitted posts, and comments.",
            "default": false
          },
          "usernames": {
            "title": "Usernames",
            "type": "array",
            "description": "Reddit usernames or profile URLs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "userContent": {
            "title": "User content to fetch",
            "enum": [
              "about",
              "posts",
              "comments",
              "all"
            ],
            "type": "string",
            "description": "Which user data to collect: profile about page, posts, comments, or all.",
            "default": "all"
          },
          "userSort": {
            "title": "User listing sort",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "controversial"
            ],
            "type": "string",
            "description": "Sort order for a user's submitted posts and comments.",
            "default": "new"
          },
          "itemsPerUser": {
            "title": "Items per user",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum posts or comments to return per user (1–1000).",
            "default": 25
          },
          "enableSubredditInfo": {
            "title": "Subreddit Info",
            "type": "boolean",
            "description": "Fetch subreddit about page, rules, and optional moderators.",
            "default": false
          },
          "infoSubreddits": {
            "title": "Subreddits to inspect",
            "type": "array",
            "description": "Subreddit names for metadata scraping.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeRules": {
            "title": "Include subreddit rules",
            "type": "boolean",
            "description": "Fetch and include the subreddit's posted rules.",
            "default": true
          },
          "includeModerators": {
            "title": "Include moderators",
            "type": "boolean",
            "description": "Fetch and include the subreddit's moderator list.",
            "default": false
          },
          "enableTrending": {
            "title": "Trending / Popular",
            "type": "boolean",
            "description": "Fetch r/popular, r/all, or trending subreddits.",
            "default": false
          },
          "trendingSource": {
            "title": "Trending source",
            "enum": [
              "popular",
              "all",
              "trending_subreddits"
            ],
            "type": "string",
            "description": "Which Reddit trending feed to scrape: r/popular, r/all, or trending subreddits.",
            "default": "popular"
          },
          "trendingSort": {
            "title": "Trending post sort",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "controversial"
            ],
            "type": "string",
            "description": "Sort order for r/popular or r/all post listings.",
            "default": "hot"
          },
          "trendingLimit": {
            "title": "Trending limit",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum posts or trending subreddits to return (1–1000).",
            "default": 50
          },
          "enableScrapeByUrl": {
            "title": "Scrape By URL",
            "type": "boolean",
            "description": "Paste any Reddit URL — auto-detect post, subreddit, user, or search page.",
            "default": false
          },
          "scrapeUrls": {
            "title": "Reddit URLs",
            "type": "array",
            "description": "Reddit URLs to scrape.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "scrapeMaxItems": {
            "title": "Max items per URL",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum items to extract when scraping listing-type Reddit URLs.",
            "default": 50
          },
          "enableCommentMonitor": {
            "title": "Comment / Keyword Monitor",
            "type": "boolean",
            "description": "Scan recent posts or comments in subreddits for keyword matches — ideal for scheduled real-time monitoring.",
            "default": false
          },
          "monitorSubreddits": {
            "title": "Monitor subreddits",
            "type": "array",
            "description": "Subreddits to watch for keyword matches.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "monitorKeywords": {
            "title": "Monitor keywords",
            "type": "array",
            "description": "Case-insensitive keywords to match in titles, bodies, or comments.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "monitorStream": {
            "title": "Monitor stream",
            "enum": [
              "comments",
              "posts",
              "both"
            ],
            "type": "string",
            "description": "Whether to scan recent comments, posts, or both for keyword matches.",
            "default": "comments"
          },
          "monitorLookback": {
            "title": "Lookback items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Number of newest posts/comments to scan per subreddit.",
            "default": 200
          },
          "sinceId": {
            "title": "Since fullname (incremental)",
            "type": "string",
            "description": "Optional Reddit fullname (e.g. t1_abc123) — only return items newer than this ID for incremental scheduled runs.",
            "default": ""
          },
          "maxItems": {
            "title": "Default max items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Fallback cap used by features that do not define their own max.",
            "default": 50
          },
          "includeNsfw": {
            "title": "Include NSFW content",
            "type": "boolean",
            "description": "Include posts and comments marked as over_18 (NSFW).",
            "default": true
          },
          "includeRaw": {
            "title": "Include raw Reddit JSON",
            "type": "boolean",
            "description": "Attach the full raw data object under the raw field (larger output).",
            "default": false
          },
          "redditClientId": {
            "title": "Reddit client ID (advanced)",
            "type": "string",
            "description": "Optional. Leave empty for zero-config access. Provide your own Reddit app client ID for dedicated quota.",
            "default": ""
          },
          "redditClientSecret": {
            "title": "Reddit client secret (advanced)",
            "type": "string",
            "description": "Optional companion secret for redditClientId.",
            "default": ""
          },
          "proxyConfiguration": {
            "title": "Proxy settings",
            "type": "object",
            "description": "Use Apify Proxy with US Residential for best results. Leave the default unless you know you need something else.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}