{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Lead Gen Scraper",
    "description": "Find Reddit leads by keyword — scrape posts & comments mentioning your product, niche, or pain points. Filter by subreddit, score & time. Export structured data for outreach, sales prospecting & competitor research.",
    "version": "1.0",
    "x-build-id": "Zj1ViyCX4ubCFbgLt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deepmine~reddit-lead-gen-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deepmine-reddit-lead-gen-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/deepmine~reddit-lead-gen-scraper/runs": {
      "post": {
        "operationId": "runs-sync-deepmine-reddit-lead-gen-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/deepmine~reddit-lead-gen-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-deepmine-reddit-lead-gen-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": [
          "keywords"
        ],
        "properties": {
          "keywords": {
            "title": "Buying Intent Phrases",
            "type": "array",
            "description": "Phrases people use when they're actively looking to buy, switch, or get a recommendation. Each phrase is searched independently across all of Reddit.\n\nExamples of high-intent phrases:\n• \"recommend a CRM\"\n• \"switching from Salesforce\"\n• \"looking for project management tool\"\n• \"best email marketing software\"\n• \"anyone use X for Y\"\n\nTip: include your competitor's name to catch people looking to switch away from them.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort Results By",
            "enum": [
              "new",
              "relevance",
              "top",
              "hot",
              "comments"
            ],
            "type": "string",
            "description": "How Reddit ranks the results returned for each phrase.\n\n• New — most recent posts first. Best for finding fresh leads before competitors see them.\n• Relevance — Reddit's own relevance ranking.\n• Top — highest-scored posts. Good for finding high-visibility buying discussions.\n• Hot — currently active threads.",
            "default": "new"
          },
          "timeFilter": {
            "title": "Time Window",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Only return posts and comments from within this time window. 'Past week' catches fresh intent signals without missing recent discussions. Use 'Past month' for broader coverage of slower-moving buying cycles.",
            "default": "week"
          },
          "searchPosts": {
            "title": "Search Posts",
            "type": "boolean",
            "description": "Search Reddit posts (threads, discussions, links) for buying intent phrases. Most high-intent ask posts are top-level posts.",
            "default": true
          },
          "searchComments": {
            "title": "Search Comments",
            "type": "boolean",
            "description": "Also search individual comments for buying intent phrases. Recommended — many of the best leads are comments like 'anyone know a good X?' buried inside existing threads.",
            "default": true
          },
          "subredditFilter": {
            "title": "Restrict to Subreddits (optional)",
            "type": "array",
            "description": "Limit results to specific subreddits for more targeted lead gen. Leave empty to search all of Reddit. Examples for B2B SaaS: entrepreneur, startups, smallbusiness, sales. Accepts any format: sales, r/sales, or full URL.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerKeyword": {
            "title": "Max Results Per Phrase",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of results to collect per intent phrase. 50 is a good starting point — enough to find real leads without overwhelming your workflow.",
            "default": 50
          },
          "minScore": {
            "title": "Minimum Upvote Score",
            "minimum": 0,
            "type": "integer",
            "description": "Ignore results with fewer upvotes than this. Keep at 0 to catch brand-new posts before anyone else — the freshest leads have no votes yet.",
            "default": 0
          },
          "trackChanges": {
            "title": "Track Changes Between Runs",
            "type": "boolean",
            "description": "Saves a snapshot after each run. On the next run, adds a scoreDelta field showing how much traction each thread has gained. Useful when running weekly — rising upvotes on an intent thread means the conversation is still active and worth engaging.",
            "default": false
          },
          "includeSummaryRows": {
            "title": "Add summary rows to the dataset",
            "type": "boolean",
            "description": "Every run saves one summary per phrase (total results, top subreddits, top post, buzz breakdown) in the SUMMARY record of the run's key-value store, free. Turn this on to also add those summaries to the dataset as rows after the mentions, as older versions did. Summary rows in the dataset are charged like mention rows.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings for routing requests. Residential proxies are strongly recommended for reliable results.",
            "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}