{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps B2B Leads Scraper",
    "description": "Find businesses by category and city on the first Google Maps results page. Get addresses, phones, websites and optional published company emails. Supports US/en and GB/en; pass known lead IDs to skip them without another charge.",
    "version": "0.1",
    "x-build-id": "RQ7QiCaEJT69Rh6t8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automa-flow~google-maps-b2b-leads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automa-flow-google-maps-b2b-leads-scraper",
        "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/automa-flow~google-maps-b2b-leads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automa-flow-google-maps-b2b-leads-scraper",
        "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/automa-flow~google-maps-b2b-leads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automa-flow-google-maps-b2b-leads-scraper",
        "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": [
          "searches"
        ],
        "properties": {
          "searches": {
            "title": "Searches",
            "minItems": 1,
            "maxItems": 25,
            "type": "array",
            "description": "One category plus territory per row. Duplicates are dropped; cities and categories are not expanded into a cartesian product. US/en and GB/en only in this version; both were checked against the live first page (Austin, Manchester).",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "query",
                "location",
                "countryCode"
              ],
              "properties": {
                "query": {
                  "title": "Category or query",
                  "type": "string",
                  "editor": "textfield",
                  "minLength": 1,
                  "maxLength": 150,
                  "pattern": "\\S",
                  "description": "Business category or search phrase, for example plumbers or accounting firms. Must contain a non-space character."
                },
                "location": {
                  "title": "Territory",
                  "type": "string",
                  "editor": "textfield",
                  "minLength": 1,
                  "maxLength": 200,
                  "pattern": "\\S",
                  "description": "Named place passed to the source as-is, for example Austin, Texas, United States. Not geocoded by a second service. Must contain a non-space character."
                },
                "countryCode": {
                  "title": "Country",
                  "type": "string",
                  "editor": "select",
                  "enum": [
                    "US",
                    "GB"
                  ],
                  "enumTitles": [
                    "United States",
                    "United Kingdom"
                  ],
                  "description": "ISO 3166-1 alpha-2 country for this search. Unsupported codes are rejected before start."
                },
                "language": {
                  "title": "Language",
                  "type": "string",
                  "editor": "select",
                  "enum": [
                    "en"
                  ],
                  "enumTitles": [
                    "English"
                  ],
                  "default": "en",
                  "description": "Language code for this search. Only English is implemented."
                }
              }
            }
          },
          "maxPlacesPerSearch": {
            "title": "Max places per search (first page, up to 20)",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Unique candidates taken from the first Maps listing page of one search, before excludeLeadIds. The source shows about 20 listings per page and this Actor does not fetch page two, so 20 is the ceiling. A full page is reported as FIRST_PAGE_CAP in RUN_SUMMARY. Service-area listings without a street address are counted as skipped_no_address and not emitted.",
            "default": 20
          },
          "maxResults": {
            "title": "Max new rows",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum unique business rows written on this run after exclusions.",
            "default": 100
          },
          "contactMode": {
            "title": "Website emails",
            "enum": [
              "none",
              "website"
            ],
            "type": "string",
            "description": "none (default) keeps the run to Maps HTTP only. website also visits a few public pages on the listed company site and copies published organisation emails; free-mailbox addresses (gmail.com, outlook.com and similar) are reported as unconfirmed and not billed. Emails are not verified mailboxes.",
            "default": "none"
          },
          "maxPagesPerWebsite": {
            "title": "Pages per website",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Homepage plus a small number of contact/about/imprint pages. Does not crawl the whole site.",
            "default": 3
          },
          "excludeLeadIds": {
            "title": "Skip known lead IDs",
            "maxItems": 5000,
            "type": "array",
            "description": "Exact lead_id values from a previous Dataset. Those locations are skipped before website checks and are not charged again on this run. There is no automatic history store.",
            "items": {
              "type": "string",
              "minLength": 10,
              "maxLength": 200,
              "pattern": "^gm:(place|cid):.+$"
            },
            "default": []
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}