{
  "openapi": "3.0.1",
  "info": {
    "title": "Brand Store Locator & Stockist Email Scraper",
    "description": "Find every boutique & retail stockist carrying competitor brands — plus buyer/wholesale emails, Instagram, LinkedIn, independent-shop filter & readiness score in 1 click ($5/1K, $0 when empty).",
    "version": "0.1",
    "x-build-id": "2fiwjncsLcpF6DEtv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maitreya_buddha~brand-store-locator-stockist-email-enricher/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maitreya_buddha-brand-store-locator-stockist-email-enricher",
        "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/maitreya_buddha~brand-store-locator-stockist-email-enricher/runs": {
      "post": {
        "operationId": "runs-sync-maitreya_buddha-brand-store-locator-stockist-email-enricher",
        "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/maitreya_buddha~brand-store-locator-stockist-email-enricher/run-sync": {
      "post": {
        "operationId": "run-sync-maitreya_buddha-brand-store-locator-stockist-email-enricher",
        "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": {
          "urls": {
            "title": "Brand Homepage or Store Locator URLs",
            "type": "array",
            "description": "One or more brand homepages (e.g. 'https://brooklynhotdogcompany.com') or direct store locator pages (e.g. 'https://www.fellowproducts.com/pages/store-locator'). Homepages automatically discover /stockists, /store-locator, /locations, and /where-to-buy pages.",
            "items": {
              "type": "string"
            }
          },
          "rawCsvOrUrls": {
            "title": "Paste Raw CSV, TSV, or Brand URL List (Optional)",
            "type": "string",
            "description": "Paste a multiline CSV/TSV spreadsheet (with or without headers) or 1 brand/locator URL per line. Automatically strips UTF-8 BOM."
          },
          "datasetId": {
            "title": "Upstream Apify Dataset ID (Optional Chaining)",
            "type": "string",
            "description": "Optional Apify Dataset ID or URL from an upstream scraper ({{resource.defaultDatasetId}}). Paginates 250 items/page and reads brandUrl, storeLocatorUrl, website, domain, or url fields."
          },
          "sourceRunId": {
            "title": "Upstream Apify Run ID (Optional Chaining)",
            "type": "string",
            "description": "Optional Apify Run ID or Run URL. Automatically resolves its defaultDatasetId and paginates brand URLs."
          },
          "enrichEmails": {
            "title": "Enrich Stockist Buyer Emails & Socials",
            "type": "boolean",
            "description": "Automatically visit each unique store website (plus /contact and /wholesale pages) to extract prioritized buyer/wholesale emails, Instagram, LinkedIn, Facebook, and Contact Form URLs. Even if a store website fails, all Part A store details are preserved.",
            "default": true
          },
          "enableDnsEmailCheck": {
            "title": "11-Query DNS Deliverability X-Ray ($0)",
            "type": "boolean",
            "description": "Run out-of-band DNS checks (MX, SPF, DMARC, BIMI, DKIM/ESP CNAMEs) per unique store domain to output deliverabilityGrade (A-F), emailProvider, and dnsDetectedToolsCsv.",
            "default": true
          },
          "onlyWithEmail": {
            "title": "Only Save & Bill Stores With Email ($0 Otherwise)",
            "type": "boolean",
            "description": "When enabled, only retail stockists with at least 1 verified email address are saved to the Dataset and billed. Stores without email are skipped at $0.",
            "default": false
          },
          "onlyIndependentStores": {
            "title": "Only Independent Boutiques & Local Retailers ($0 for National Chains)",
            "type": "boolean",
            "description": "Skip national retail chains (e.g. Target, Walmart, Sephora, Whole Foods, CVS) and keep independent boutiques & regional specialty shops that respond to direct wholesale outreach. Filtered chains cost $0.",
            "default": false
          },
          "maxStoresPerBrand": {
            "title": "Max Stores Per Brand",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of stockist locations to output per brand URL (1-5,000, streamed in 50-store chunks).",
            "default": 100
          },
          "countryFilter": {
            "title": "Country Filter (Optional)",
            "type": "string",
            "description": "Filter extracted stores by country code or name (e.g. 'US', 'USA', 'UK', 'GB', 'CA', 'AU', 'DE', 'KR'). Leave blank to keep all countries."
          },
          "minReadinessScore": {
            "title": "Minimum Outreach Readiness Score (0-100)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Only save and charge stores whose Outreach Readiness Score is >= this value (0-100). Filtered stores cost $0.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Concurrent store website visits for email enrichment (1-10). Automatically capped at <=2 on 128MB and <=3 on 256MB containers.",
            "default": 5
          },
          "crmExportPreset": {
            "title": "CRM Export Preset (Flat Columns)",
            "enum": [
              "default",
              "instantly",
              "smartlead",
              "hubspot",
              "lemlist"
            ],
            "type": "string",
            "description": "Optionally append flat CRM import columns for Instantly, Smartlead, HubSpot, or Lemlist while preserving all default fields.",
            "default": "default"
          },
          "webhookUrl": {
            "title": "Run Summary Webhook URL (Optional, SSRF-Protected)",
            "type": "string",
            "description": "Optional HTTPS endpoint to receive run metrics and top stockists upon completion (executed before KV summary save, blocks private/internal IPs)."
          },
          "webhookHeaders": {
            "title": "Webhook Custom Headers (Optional Secret JSON)",
            "type": "object",
            "description": "Optional secret HTTP headers sent ONLY to the initial webhook origin and stripped on cross-origin redirects."
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration (Optional — $0 Default)",
            "type": "object",
            "description": "Optional Apify Proxy settings. Pure-HTTP direct mode works at $0 proxy cost for most locators; enable only if needed.",
            "default": {
              "useApifyProxy": false
            }
          },
          "enableByokEnrichment": {
            "title": "Enable Opt-In BYOK Buyer Waterfall (Default OFF)",
            "type": "boolean",
            "description": "Bring Your Own Keys to enrich missing retailer buyer contacts via Apollo -> Hunter and validate deliverability via ZeroBounce (quarantines spamtrap/invalid addresses).",
            "default": false
          },
          "apolloApiKey": {
            "title": "Apollo API Key (Optional BYOK Secret)",
            "type": "string",
            "description": "Your own Apollo API key used only when enableByokEnrichment is true. Never logged."
          },
          "hunterApiKey": {
            "title": "Hunter API Key (Optional BYOK Secret)",
            "type": "string",
            "description": "Your own Hunter API key used as fallback when enableByokEnrichment is true. Never logged."
          },
          "zeroBounceApiKey": {
            "title": "ZeroBounce API Key (Optional BYOK Secret)",
            "type": "string",
            "description": "Your own ZeroBounce API key used to verify primaryEmail and quarantine spamtrap/invalid addresses when enableByokEnrichment is 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}