{
  "openapi": "3.0.1",
  "info": {
    "title": "Local Business Lead Finder AI Outreach Engine API",
    "description": "Find local business leads and generate outreach messages that help you get clients,  detect weak profiles like low reviews or missing websites, and generate ready-to-send outreach messages. Score opportunities, identify pain points, and contact high-converting leads faster with AI-powered outreach.",
    "version": "0.4",
    "x-build-id": "zU4DEmhCcG6ki7EyR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/shahabuddin38~Local-Business-Lead-Finder-AI-Outreach-Engine-API/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-shahabuddin38-Local-Business-Lead-Finder-AI-Outreach-Engine-API",
        "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/shahabuddin38~Local-Business-Lead-Finder-AI-Outreach-Engine-API/runs": {
      "post": {
        "operationId": "runs-sync-shahabuddin38-Local-Business-Lead-Finder-AI-Outreach-Engine-API",
        "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/shahabuddin38~Local-Business-Lead-Finder-AI-Outreach-Engine-API/run-sync": {
      "post": {
        "operationId": "run-sync-shahabuddin38-Local-Business-Lead-Finder-AI-Outreach-Engine-API",
        "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": [
          "keyword",
          "location"
        ],
        "properties": {
          "keyword": {
            "title": "Business Keyword",
            "type": "string",
            "description": "Business type or niche to search for in local results."
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "City, metro area, state, or region to search in."
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Country used to expand the local search query and fallback geocoding.",
            "default": "United States"
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "es",
              "fr",
              "de",
              "it",
              "pt",
              "ur",
              "hi",
              "ar"
            ],
            "type": "string",
            "description": "Language hint used when requesting public search results.",
            "default": "en"
          },
          "maxResults": {
            "title": "Maximum Leads",
            "minimum": 5,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum number of billable lead rows to keep after scoring and deduplication.",
            "default": 50
          },
          "minOpportunityScore": {
            "title": "Minimum Opportunity Score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Only keep businesses whose calculated opportunity score meets or exceeds this value.",
            "default": 50
          },
          "includeWebsiteSeoCheck": {
            "title": "Check Website SEO Basics",
            "type": "boolean",
            "description": "Run a lightweight website check for HTTPS, title tag, meta description, schema, response time, and crawlability signals.",
            "default": true
          },
          "includeCompetitorGap": {
            "title": "Include Competitor Gap Snapshot",
            "type": "boolean",
            "description": "Compare each lead with nearby discovered businesses to estimate rating and review gaps.",
            "default": true
          },
          "includeAiOutreach": {
            "title": "Use AI For Outreach Drafts",
            "type": "boolean",
            "description": "If enabled and an AI key is available, the actor will try AI-written outreach before falling back to rule-based templates.",
            "default": true
          },
          "includeEmailDiscovery": {
            "title": "Discover Business Emails",
            "type": "boolean",
            "description": "Scan business websites for publicly visible business emails.",
            "default": true
          },
          "emailScanDepth": {
            "title": "Email Scan Depth",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Number of internal pages to scan from each website.",
            "default": 1
          },
          "maxWebsitesToEnrich": {
            "title": "Max Websites To Enrich",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum websites to scan for emails per run.",
            "default": 25
          },
          "emailMxCheck": {
            "title": "Enable MX Check",
            "type": "boolean",
            "description": "Optional MX/domain validation for extracted emails.",
            "default": false
          },
          "includeSocialLinks": {
            "title": "Extract Social Links",
            "type": "boolean",
            "description": "Extract visible social media profile links.",
            "default": true
          },
          "preferBusinessEmails": {
            "title": "Prefer Business Emails",
            "type": "boolean",
            "description": "Prioritize role/business emails like info@, contact@, sales@, and support@.",
            "default": true
          },
          "outreachService": {
            "title": "Service to Sell",
            "enum": [
              "auto",
              "GBP Optimization",
              "Local SEO",
              "Website Design",
              "Review Growth",
              "Technical SEO",
              "Citation Building"
            ],
            "type": "string",
            "description": "Force the offer you want outreach to pitch, or leave it on auto to match the detected pain points.",
            "default": "auto"
          },
          "tone": {
            "title": "Outreach Tone",
            "enum": [
              "friendly",
              "professional",
              "direct",
              "soft"
            ],
            "type": "string",
            "description": "Tone preference for generated outreach drafts.",
            "default": "friendly"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}