{
  "openapi": "3.0.1",
  "info": {
    "title": "Local Lead Finder — Business Emails & Phones API",
    "description": "Find local businesses and no-website leads with available public contacts and website enrichment. Bulk export: JSON, CSV, Excel and API. PPE: from $1.5/1K lead records; start fee, usage extra.",
    "version": "2.10",
    "x-build-id": "f8gszJeTdjCJizYEr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apivault_labs~apify-actor-local-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apivault_labs-apify-actor-local-leads",
        "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/apivault_labs~apify-actor-local-leads/runs": {
      "post": {
        "operationId": "runs-sync-apivault_labs-apify-actor-local-leads",
        "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/apivault_labs~apify-actor-local-leads/run-sync": {
      "post": {
        "operationId": "run-sync-apivault_labs-apify-actor-local-leads",
        "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": {
          "workflow": {
            "title": "What do you want to do?",
            "enum": [
              "auto",
              "findLeads",
              "enrichUrls",
              "combined"
            ],
            "type": "string",
            "description": "Choose one workflow so people and AI agents can route the request correctly. Auto-detect preserves existing API integrations: category + location runs a search, Website URLs runs enrichment, and providing both combines them.",
            "default": "auto"
          },
          "category": {
            "title": "Business Category",
            "type": "string",
            "description": "Type of business to search for. Examples: plumbers, restaurants, dentists, auto-repair, lawyers, hair-salons. Leave empty if you only want to enrich your own list via 'Website URLs'."
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "City and state. Examples: 'New York NY', 'Los Angeles CA', 'Chicago IL', 'Miami FL'. Source search may include nearby towns; review each returned address before outreach. Leave empty if you only want to enrich your own list via 'Website URLs'."
          },
          "startUrls": {
            "title": "Website URLs (direct enrichment mode)",
            "maxItems": 500,
            "type": "array",
            "description": "Optional. Paste your own list of business website URLs (or bare domains) to enrich them directly — skips the YellowPages search entirely. Each URL is crawled for emails, phones, real social profiles, owner name, tech stack, mobile/SEO audit and a lead score. Use this to turn a raw domain list (CSV from your CRM) into a fully-enriched lead list. Works alongside or instead of category+location.",
            "items": {
              "type": "string"
            }
          },
          "pages": {
            "title": "Pages to Scrape (0 = auto)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Number of directory result pages to request. Zero enables pagination up to maxPages, runtime or result limits. Page availability and coverage are not guaranteed. Allowed range: 0..100.",
            "default": 0
          },
          "maxPages": {
            "title": "Max pages (auto-pagination ceiling)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum requested pages in auto-pagination. This is not a guarantee of complete market coverage. Allowed range: 1..100.",
            "default": 50
          },
          "onlyWithoutWebsite": {
            "title": "Only Without Website",
            "type": "boolean",
            "description": "Keep directory cards without an external website listed. Does not prove no website exists elsewhere.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "How many result pages to collect in parallel. ~10 is the sweet spot. Going higher does NOT help — the rendering engine throttles under load, so 20-30 threads actually run slower. Leave at 10 for the fastest runs. Allowed range: 1..15.",
            "default": 10
          },
          "backend": {
            "title": "Data backend",
            "enum": [
              "auto",
              "primary",
              "backup",
              "fallback"
            ],
            "type": "string",
            "description": "Which engine collects the listings. 'auto' (recommended) uses the fast primary engine and automatically falls back to backup engines if it's busy.",
            "default": "auto"
          },
          "firecrawlApiKey": {
            "title": "Backup engine API key (optional)",
            "type": "string",
            "description": "Optional API key for the backup collection engine, used automatically if the primary engine is unavailable. Leave empty to skip it. A free key (no card) is available at firecrawl.dev."
          },
          "readerProxyUrl": {
            "title": "Rotating proxy for the reader (optional)",
            "type": "string",
            "description": "Optional custom rotating proxy URL (http://user:pass@host:port). Overrides the built-in proxy. A '__anon.N' or '{session}' token in the URL is rotated automatically."
          },
          "useApifyProxy": {
            "title": "Use Apify proxy for collection (recommended)",
            "type": "boolean",
            "description": "Route collection requests through Apify's rotating datacenter proxy so each request uses a fresh IP — keeps large runs fast without a paid API key. Turn off to send requests directly.",
            "default": true
          },
          "timeout": {
            "title": "Timeout (seconds)",
            "minimum": 30,
            "maximum": 300,
            "type": "integer",
            "description": "Maximum time to wait for each YellowPages page. Allowed range: 30..300.",
            "default": 120
          },
          "enrichWebsites": {
            "title": "Check websites (alive + tech stack + emails + phones)",
            "type": "boolean",
            "description": "For every lead with a website, detect whether the site is alive and secure, which platform it runs on (Wix, WordPress, Shopify, Squarespace, GoDaddy, Webflow, Weebly, Joomla, Drupal, ClickFunnels, GoHighLevel), and pull real contact emails and phone numbers from the page.",
            "default": true
          },
          "crawlSubpages": {
            "title": "Crawl /contact + /about for more contacts",
            "type": "boolean",
            "description": "When a lead's homepage has no email, also check its common contact pages to dig out the real inbox, owner name and social links. Cost-aware: extra pages are only checked when the homepage came up empty, so most leads still cost a single result.",
            "default": true
          },
          "verifyEmails": {
            "title": "Check observed email quality (MX domain)",
            "type": "boolean",
            "description": "Check observed emails with syntax, static disposable list and MX domain signals. bestEmail never uses guesses. No mailbox/deliverability proof; failed DNS is mx_unknown.",
            "default": true
          },
          "extractOwnerName": {
            "title": "Extract owner / decision-maker name",
            "type": "boolean",
            "description": "Pull the owner, founder or principal's name from the website so you can open outreach with a real first name instead of the business name — something pure directory scrapers can't do.",
            "default": true
          },
          "enrichEmailGuesses": {
            "title": "Generate email guesses",
            "type": "boolean",
            "description": "Generate explicitly unverified guesses only in emailGuesses. Guesses never become bestEmail.",
            "default": true
          },
          "enrichSocialUrls": {
            "title": "Build social search URLs",
            "type": "boolean",
            "description": "Add 1-click search links for Facebook, Instagram, LinkedIn, Google Maps and Google search — useful to verify online presence in seconds.",
            "default": true
          },
          "includeOutreachPitch": {
            "title": "Generate outreach pitch",
            "type": "boolean",
            "description": "Auto-write a personalised cold-outreach opener (~2 sentences) tailored to whether the business has no website / a dead site / a Wix template / etc.",
            "default": true
          },
          "enrichBrandAge": {
            "title": "Detect brand age",
            "type": "boolean",
            "description": "For leads with a website, estimate how long the brand has been online. An established brand (5+ years) with a dead site is a prime replacement target — gets a lead-score bonus.",
            "default": true
          },
          "enrichGeocode": {
            "title": "Geocode addresses (lat/lng)",
            "type": "boolean",
            "description": "Resolve every business address to lat/lng coordinates. Useful for territory routing in CRMs or plotting leads on a map. Off by default because it adds about a second per lead.",
            "default": false
          },
          "excludeChains": {
            "title": "Exclude corporate chains / franchises",
            "type": "boolean",
            "description": "Drop national chains and franchises (Roto-Rooter, Aamco, Subway, Domino's, Great Clips, Anytime Fitness, RE/MAX, Servpro, Verizon, AT&T, ~50 brands matched by name). Most agencies skip these because corporate marketing controls the spend.",
            "default": false
          },
          "minLeadScore": {
            "title": "Minimum lead score (0-100)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Drop leads below this composite score. Score combines: no-website bonus, website-on-DIY-builder, dead-website, review count, rating, years in business. Tiers: cold <35, warm 35-54, hot 55-74, on-fire 75+. Allowed range: 0..100.",
            "default": 0
          },
          "maxResults": {
            "title": "Max results (after enrichment + sorting)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on billable dataset rows, applied after lead-score sorting. The safe default is 25. Set 0 only when you intentionally want every available lead. Allowed range: 0..10000.",
            "default": 25
          },
          "outputPreset": {
            "title": "Output detail",
            "enum": [
              "sales",
              "contacts",
              "full"
            ],
            "type": "string",
            "description": "Controls JSON fields without changing which leads are found. Sales-ready is compact and best for MCP/AI agents. Full preserves the legacy record. CSV export uses its own fixed CRM columns.",
            "default": "full"
          },
          "exportFormat": {
            "title": "Export format",
            "enum": [
              "default",
              "csv",
              "both"
            ],
            "type": "string",
            "description": "Output shape. 'default' = full JSON. 'csv' = flat record with HubSpot/Pipedrive-friendly column names. 'both' = full JSON plus a nested '_csv' field.",
            "default": "default"
          },
          "runBudgetSecs": {
            "title": "Collection and enrichment time budget",
            "minimum": 30,
            "maximum": 600,
            "type": "integer",
            "description": "Shared budget for discovery and enrichment. Default160seconds; source engines share page deadlines instead of starting a fresh budget each. Allow extra run time for writing results. Partial source coverage is reported in SUMMARY/ERRORS.",
            "default": 160
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}