{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Lead Generation Scraper",
    "description": "Reddit lead generation scraper for buyer intent: find Reddit leads asking for a recommendation or looking to switch tools (recommend a CRM, switching from Salesforce). Set Match to Every word or Exact phrase and a post or comment that doesn't hold your phrase isn't delivered or charged.",
    "version": "2.0",
    "x-build-id": "x8IytbCIcEU0kJPNz"
  },
  "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",
            "minItems": 1,
            "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. For a brand name that is also an everyday word (Linear, Notion, Slack), add a word that gives it context (\"switching from Linear app\") or restrict the subreddits below.",
            "items": {
              "type": "string",
              "pattern": "\\S"
            }
          },
          "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.\n• Most Comments — the busiest threads.\n\nComment search offers New, Relevance and Top; Hot and Most Comments use Relevance there.",
            "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.",
            "items": {
              "type": "string",
              "pattern": "\\S"
            },
            "default": []
          },
          "maxResultsPerKeyword": {
            "title": "Max Results Per Phrase",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of posts, and of comments, to collect per intent phrase (each counted after your Minimum Upvote Score). 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
          },
          "matchMode": {
            "title": "Match",
            "enum": [
              "near",
              "all",
              "phrase",
              "any"
            ],
            "type": "string",
            "description": "How closely a post or comment must match your phrase. Results that don't match aren't delivered and aren't charged.\n\n• Words close together (default) — the phrase's important words (not a, the, for…; plurals and endings like -ing and -ed count) sit within about a sentence of each other, so \"recommend a CRM\" keeps \"can anyone recommend a good CRM?\" and drops a story that mentions a CRM somewhere.\n• Every word — the title and text (or the comment) hold every word of the phrase anywhere, in any order.\n• Exact phrase — the words in a row, as typed (case, punctuation and line breaks don't matter).\n• Reddit's match (broad) — whatever Reddit's search finds for the words, including word stems and other fields. Use it to explore a topic, not to qualify leads: many results only touch the phrase.",
            "default": "near"
          },
          "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 get those summaries as rows, free, in the run's summary dataset (linked as summaryDataset in the run's OUTPUT record, and in Storage). Only mention rows are charged.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Reddit answers Apify's datacenter proxy, so the default works for every plan. If you pick residential, the run still reads through datacenter and keeps residential for retries Reddit refuses there (charged to the run's own proxy traffic only when needed).",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}