{
  "openapi": "3.0.1",
  "info": {
    "title": "Product Hunt Scraper (with Email Enrichment)",
    "description": "Extract product names, upvotes, makers, taglines, and website URLs from ProductHunt. Optionally crawl each product's website to find emails, LinkedIn, Twitter, and phone numbers. Supports daily/weekly/monthly leaderboard, keyword search, and topic scraping.",
    "version": "1.0",
    "x-build-id": "ukSvAHe3LhiSgHSVa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~producthunt-scraper-pro/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-producthunt-scraper-pro",
        "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/khadinakbar~producthunt-scraper-pro/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-producthunt-scraper-pro",
        "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/khadinakbar~producthunt-scraper-pro/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-producthunt-scraper-pro",
        "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": {
          "mode": {
            "title": "Scraping Mode",
            "enum": [
              "leaderboard",
              "search",
              "topic",
              "urls"
            ],
            "type": "string",
            "description": "How to find products. Use 'leaderboard' for top-ranked products by time period. Use 'search' for a keyword. Use 'topic' for a topic slug. Use 'urls' for specific ProductHunt URLs.",
            "default": "leaderboard"
          },
          "leaderboardPeriod": {
            "title": "Leaderboard Period",
            "enum": [
              "daily",
              "weekly",
              "monthly",
              "yearly"
            ],
            "type": "string",
            "description": "Only used when mode='leaderboard'. daily/weekly/monthly/yearly.",
            "default": "daily"
          },
          "searchQuery": {
            "title": "Search Query",
            "type": "string",
            "description": "Used when mode='search'. Keyword or niche to search (e.g. 'AI writing tools')."
          },
          "topic": {
            "title": "Topic Slug",
            "type": "string",
            "description": "Used when mode='topic'. ProductHunt topic slug (e.g. 'artificial-intelligence', 'developer-tools')."
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Used when mode='urls'. List of specific ProductHunt URLs to scrape.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum number of products to return. Default is 100.",
            "default": 100
          },
          "allProducts": {
            "title": "Include All Products (not just featured)",
            "type": "boolean",
            "description": "Used when mode='leaderboard'. When false (default), scrapes only the featured/highlighted products for that period — the curated PH front page view. When true, appends /all to the URL and scrapes every product launched in that period, including non-featured ones. Use true when the user wants the full launch archive, all submissions, or non-featured products.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of pages to scrape simultaneously. Default is 5.",
            "default": 5
          },
          "enrichEmails": {
            "title": "Find Email Addresses",
            "type": "boolean",
            "description": "When enabled, discovers emails for each product's website using a 3-layer waterfall: Hunter.io API → Snov.io API → page scraping fallback. Default is true.",
            "default": true
          },
          "hunterApiKey": {
            "title": "Hunter.io API Key (recommended)",
            "type": "string",
            "description": "Hunter.io is the industry-standard email enrichment API with ~65-80% hit rate on SaaS/startup domains. Get a free key at https://hunter.io (25 domain searches/month free). Without this key the actor falls back to basic page scraping which has much lower success on modern JS-rendered sites."
          },
          "snovClientId": {
            "title": "Snov.io Client ID (optional fallback)",
            "type": "string",
            "description": "Snov.io client ID for email enrichment — used if Hunter.io finds nothing. Get credentials at https://snov.io → Settings → API (50 searches/month free)."
          },
          "snovClientSecret": {
            "title": "Snov.io Client Secret (optional fallback)",
            "type": "string",
            "description": "Snov.io client secret. Required alongside snovClientId."
          },
          "phApiToken": {
            "title": "ProductHunt API Token (optional — works out of the box)",
            "type": "string",
            "description": "Optional. A default token is built in so the actor works immediately with no setup. To use your own free token: go to https://www.producthunt.com/v2/oauth/applications, create an app, and paste the Developer Token here."
          },
          "startDate": {
            "title": "Start Date (YYYY-MM-DD)",
            "type": "string",
            "description": "For daily leaderboard: specific date to scrape. Leave blank for today. Use with endDate for multi-day ranges."
          },
          "endDate": {
            "title": "End Date (YYYY-MM-DD)",
            "type": "string",
            "description": "Optional end date for multi-day scraping in one run (daily mode only). Example: startDate=2026-03-01 + endDate=2026-03-07 pulls an entire week."
          },
          "lookbackDays": {
            "title": "Lookback Days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Scrape the last N days from today. Alternative to startDate. Ignored when startDate is set.",
            "default": 1
          },
          "outputMode": {
            "title": "Output Mode",
            "enum": [
              "full",
              "lean",
              "leads"
            ],
            "type": "string",
            "description": "Controls output fields. 'full' = all fields (default). 'lean' = minimal fields for LLM/AI agents (name, tagline, website, upvotes, rank, emails, topics). 'leads' = full fields but ONLY products with emails found.",
            "default": "full"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}