{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Scraper + AI Lead Finder & Sentiment Analysis",
    "description": "Scrape Reddit posts and comments with AI-powered lead discovery. AI scores every post for your business, suggests replies, and analyzes comment sentiment. Search by subreddit, keyword, or URL. No Reddit API key needed. $2/1K posts.",
    "version": "1.0",
    "x-build-id": "3OAn1Shselnlh0Xz1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/buseta~reddit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-buseta-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/buseta~reddit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-buseta-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/buseta~reddit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-buseta-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Scrape mode",
            "enum": [
              "subreddit",
              "search",
              "post_urls"
            ],
            "type": "string",
            "description": "How to find posts.\n\n• Subreddit — Get latest posts from one or more subreddits\n• Search — Search for keywords within specific subreddits or across all of Reddit\n• Post URLs — Scrape specific posts by URL (with comments)",
            "default": "subreddit"
          },
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "List of subreddit names (without r/). Used in 'subreddit' and 'search' modes."
          },
          "search_query": {
            "title": "Search query",
            "type": "string",
            "description": "Keyword to search for. Used in 'search' mode. Searches within the specified subreddits, or across all of Reddit if no subreddit is set."
          },
          "post_urls": {
            "title": "Post URLs",
            "type": "array",
            "description": "List of Reddit post URLs to scrape. Used in 'post_urls' mode. Always fetches comments for these."
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "new",
              "hot",
              "top",
              "rising"
            ],
            "type": "string",
            "description": "How to sort posts.",
            "default": "new"
          },
          "time_filter": {
            "title": "Time filter (for 'top' and 'search' sort)",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Time range for top posts or search results.",
            "default": "week"
          },
          "max_posts": {
            "title": "Max posts",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of posts to scrape per subreddit.",
            "default": 25
          },
          "get_comments": {
            "title": "Scrape comments",
            "type": "boolean",
            "description": "Fetch comments for each post. Charged at $0.10 per 1,000 comments.",
            "default": false
          },
          "max_comments_per_post": {
            "title": "Max comments per post",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of top-level comments to scrape per post.",
            "default": 25
          },
          "ai_lead_finder": {
            "title": "AI Lead Finder",
            "type": "boolean",
            "description": "AI reads every post and scores how relevant it is for your business. Returns a relevance score (0-100), opportunity type, reason, and a suggested reply you can post. Requires 'Business description' below. Charged at $20 per 1,000 posts analyzed.",
            "default": false
          },
          "ai_business_description": {
            "title": "Your business description (for AI Lead Finder)",
            "maxLength": 300,
            "type": "string",
            "description": "Tell the AI what you sell or what you're looking for. Example: 'I sell web design services to local businesses' or 'I'm looking for people who need help with solar panel installation'. Max 300 characters."
          },
          "ai_subreddit_summary": {
            "title": "AI Subreddit Summary",
            "type": "boolean",
            "description": "After scraping, AI summarizes the subreddit: top topics, sentiment, recurring questions, and opportunities. Charged at $1 per 1,000 posts analyzed.",
            "default": false
          },
          "ai_comment_sentiment": {
            "title": "AI Comment Sentiment (per post)",
            "type": "boolean",
            "description": "AI analyzes comments on each post: discussion summary, sentiment split, key takeaways. Requires 'Scrape comments' to be enabled. Charged at $20 per 1,000 posts analyzed.",
            "default": false
          },
          "proxy_config": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Reddit works fine without proxy for small runs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}