{
  "openapi": "3.0.1",
  "info": {
    "title": "Local SEO Lead Generation — Google Maps Scraper",
    "description": "Scan Google Maps by city and niche to find local businesses with the weakest Google Business Profiles — the prospects most likely to need help. Each lead is scored 0–90 with top weaknesses, phone and Maps link. Never bills the same lead twice.",
    "version": "0.1",
    "x-build-id": "TjpHqscQUe5lccsOY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/acebuilds~local-seo-lead-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-acebuilds-local-seo-lead-finder",
        "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/acebuilds~local-seo-lead-finder/runs": {
      "post": {
        "operationId": "runs-sync-acebuilds-local-seo-lead-finder",
        "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/acebuilds~local-seo-lead-finder/run-sync": {
      "post": {
        "operationId": "run-sync-acebuilds-local-seo-lead-finder",
        "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": [
          "niche",
          "city"
        ],
        "properties": {
          "niche": {
            "title": "Business Niche / Category",
            "type": "string",
            "description": "The type of business to scan for, as you'd type it into Google Maps (e.g. \"house cleaning\", \"handyman\", \"HVAC contractors\")."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City to search within. Small and mid-sized cities yield far more weak profiles than major metros."
          },
          "state": {
            "title": "State (optional)",
            "type": "string",
            "description": "US state abbreviation to narrow results."
          },
          "maxResults": {
            "title": "Max Businesses to Scan",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many businesses to scan and score (1–200). Scan deep (100+): the strongest prospects — businesses with weak profiles — are usually further down the results, not in the top 10.",
            "default": 100
          },
          "skipPreviouslySeen": {
            "title": "🔁 Never deliver the same lead twice",
            "type": "boolean",
            "description": "ON (recommended): remembers every lead already delivered for this list and skips it on later runs — so a weekly scan returns only NEW businesses and you are never charged for a duplicate. OFF: returns everything matching, including leads you already have.",
            "default": true
          },
          "leadListId": {
            "title": "Lead list name",
            "type": "string",
            "description": "Which memory this run belongs to. Leave empty to keep one list per niche + city + state. Set it explicitly to share one memory across several searches (e.g. \"texas-cleaning-campaign\")."
          },
          "onlyGrades": {
            "title": "Only these grades",
            "type": "array",
            "description": "Return only businesses with these profile grades. C and D are the weakest profiles — the best prospects. Leave empty for all grades.",
            "items": {
              "type": "string",
              "enum": [
                "A",
                "B",
                "C",
                "D"
              ],
              "enumTitles": [
                "A — strong profile",
                "B — decent profile",
                "C — weak profile",
                "D — very weak profile"
              ]
            },
            "default": []
          },
          "requireNoWebsite": {
            "title": "Only businesses with no website",
            "type": "boolean",
            "description": "Classic web-design/SEO opening: the business has a Google listing but no site.",
            "default": false
          },
          "requirePhone": {
            "title": "Only businesses with a phone number",
            "type": "boolean",
            "description": "Useful if you cold-call. Skips listings you could not action.",
            "default": false
          },
          "maxRating": {
            "title": "Maximum star rating",
            "type": "string",
            "description": "Only return businesses rated at or below this (e.g. 4.2). Leave empty for any rating."
          },
          "minReviewCount": {
            "title": "Minimum review count",
            "minimum": 0,
            "type": "integer",
            "description": "Skip businesses with fewer reviews than this — useful to avoid brand-new or inactive listings."
          },
          "maxReviewCount": {
            "title": "Maximum review count",
            "minimum": 0,
            "type": "integer",
            "description": "Skip businesses with more reviews than this — established businesses are usually harder to sell to."
          },
          "excludeClosed": {
            "title": "Exclude closed businesses",
            "type": "boolean",
            "description": "Skip listings Google marks permanently or temporarily closed. On by default — a closed business is not a lead, so you should never be charged for one.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}