{
  "openapi": "3.0.1",
  "info": {
    "title": "Local Business Lead Auditor",
    "description": "Find Google Maps local businesses, enrich contact and website data, audit SEO issues, and score high-intent sales leads for agencies and outbound teams.",
    "version": "0.2",
    "x-build-id": "ooXXck0GwiepKghfX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/meilimiao~local-business-lead-auditor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-meilimiao-local-business-lead-auditor",
        "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/meilimiao~local-business-lead-auditor/runs": {
      "post": {
        "operationId": "runs-sync-meilimiao-local-business-lead-auditor",
        "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/meilimiao~local-business-lead-auditor/run-sync": {
      "post": {
        "operationId": "run-sync-meilimiao-local-business-lead-auditor",
        "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": {
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "Business categories and locations to search. Example: dentists in Austin.",
            "items": {
              "type": "object",
              "required": [
                "businessType",
                "location"
              ],
              "properties": {
                "businessType": {
                  "type": "string",
                  "title": "Business type",
                  "description": "Examples: dentist, lawyer, plumber, roofer, restaurant, real estate"
                },
                "location": {
                  "type": "string",
                  "title": "Location",
                  "description": "City, state/country, or neighborhood"
                }
              }
            }
          },
          "dataSource": {
            "title": "Business data source",
            "enum": [
              "googleMaps",
              "googleMapsThenOsm",
              "openStreetMap",
              "manualOnly"
            ],
            "type": "string",
            "description": "Choose where business listings come from. Google Maps uses the Apify Google Maps Scraper Actor, then this Actor enriches and scores the leads.",
            "default": "googleMaps"
          },
          "googleMapsActorId": {
            "title": "Google Maps Actor ID",
            "type": "string",
            "description": "Apify Actor ID used as the upstream Google Maps source. Default is compass/crawler-google-places.",
            "default": "compass/crawler-google-places"
          },
          "googleMapsLanguage": {
            "title": "Google Maps language",
            "type": "string",
            "description": "Language code used by the upstream Google Maps Actor.",
            "default": "en"
          },
          "googleMapsCountryCode": {
            "title": "Google Maps country code",
            "type": "string",
            "description": "Optional country code for Google Maps results, such as us, gb, ca, au.",
            "default": "us"
          },
          "skipClosedPlaces": {
            "title": "Skip closed places",
            "type": "boolean",
            "description": "Exclude permanently or temporarily closed Google Maps places when supported by the upstream Actor.",
            "default": true
          },
          "manualBusinesses": {
            "title": "Manual businesses",
            "type": "array",
            "description": "Optional list of businesses to audit directly, useful if you already have Google Maps/CSV leads.",
            "items": {
              "type": "object",
              "properties": {
                "businessName": {
                  "type": "string",
                  "title": "Business name",
                  "description": "Business name to audit."
                },
                "websiteUrl": {
                  "type": "string",
                  "title": "Website URL",
                  "description": "Business website URL."
                },
                "phone": {
                  "type": "string",
                  "title": "Phone",
                  "description": "Known business phone number."
                },
                "address": {
                  "type": "string",
                  "title": "Address",
                  "description": "Known business address."
                },
                "category": {
                  "type": "string",
                  "title": "Category",
                  "description": "Known business category or niche."
                },
                "sourceUrl": {
                  "type": "string",
                  "title": "Source URL",
                  "description": "Original source URL for this lead."
                },
                "googleRating": {
                  "type": "number",
                  "title": "Google rating",
                  "description": "Known Google Maps rating, if available."
                },
                "reviewCount": {
                  "type": "integer",
                  "title": "Review count",
                  "description": "Known Google review count, if available."
                },
                "googleMapsUrl": {
                  "type": "string",
                  "title": "Google Maps URL",
                  "description": "Google Maps place URL, if available."
                },
                "googlePlaceId": {
                  "type": "string",
                  "title": "Google Place ID",
                  "description": "Google Place ID, if available."
                },
                "isClaimableGoogleBusiness": {
                  "type": "boolean",
                  "title": "Claimable Google Business",
                  "description": "Set true if the Google Business Profile appears unclaimed."
                }
              }
            }
          },
          "maxBusinessesPerQuery": {
            "title": "Max businesses per query",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Maximum businesses to return per query.",
            "default": 50
          },
          "auditWebsites": {
            "title": "Audit websites",
            "type": "boolean",
            "description": "Fetch each business website and extract SEO/contact/sales signals.",
            "default": true
          },
          "minLeadScore": {
            "title": "Minimum lead score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Only output leads with this score or higher. Higher score means stronger sales opportunity.",
            "default": 0
          },
          "includeColdEmailOpening": {
            "title": "Include cold email opener",
            "type": "boolean",
            "description": "Generate a short personalized outreach opener for each lead.",
            "default": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}