{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Business Leads Scraper - Local Lead Generation",
    "description": "Search Google Maps and export normalised business name, category, address, phone, website, rating, review count, opening hours, plus code, coordinates and place URL. A local business scraper for lead generation, territory research and CRM enrichment, exporting to JSON, CSV or Excel.",
    "version": "1.0",
    "x-build-id": "SzsFArMaaMBKgTnUi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/captainhandsome~google-maps-business-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-captainhandsome-google-maps-business-search",
        "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/captainhandsome~google-maps-business-search/runs": {
      "post": {
        "operationId": "runs-sync-captainhandsome-google-maps-business-search",
        "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/captainhandsome~google-maps-business-search/run-sync": {
      "post": {
        "operationId": "run-sync-captainhandsome-google-maps-business-search",
        "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": [
          "location"
        ],
        "properties": {
          "search_query": {
            "title": "Business search query",
            "minLength": 2,
            "type": "string",
            "description": "Business category, service, product, or business name to find.",
            "default": "dentists"
          },
          "search_queries": {
            "title": "Batch search queries",
            "maxItems": 25,
            "type": "array",
            "description": "Optional list of business queries. When supplied, these are run instead of search_query.",
            "items": {
              "type": "string"
            }
          },
          "place_urls": {
            "title": "Direct place URLs",
            "maxItems": 1000,
            "type": "array",
            "description": "Google Maps place URLs to fetch directly (e.g. copied from a listing's Share link), instead of running a keyword search. When set, each URL is opened as a place page; search_query, search_queries, and location are ignored.",
            "items": {
              "type": "string"
            }
          },
          "place_ids": {
            "title": "Direct place IDs",
            "maxItems": 1000,
            "type": "array",
            "description": "Google place identifiers (e.g. ChIJ...) to fetch directly, instead of running a keyword search. Resolved through Google's own place_id deep link. Combine freely with place_urls; either one bypasses keyword search.",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Search location",
            "type": "string",
            "description": "City, state, postal code, region, or country in which to search.",
            "default": "New York, NY"
          },
          "max_items": {
            "title": "Maximum businesses",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard maximum number of unique business records returned and billed across all queries, applied after any filters below so filtered-out rows are never billed. Defaults to 10: Apify's automated daily Store test runs this Actor with its default input and requires success within 5 minutes, and 25 results with include_details took 150s median / 303s peak - one test run has already timed out. Raise it freely for real jobs.",
            "default": 10
          },
          "include_details": {
            "title": "Enrich business details",
            "type": "boolean",
            "description": "Open each business page to extract address, phone, website, hours, review count, plus code, and coordinates.",
            "default": true
          },
          "min_rating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Free filter. Only return businesses with a rating at or above this value. Applied before max_items, so filtered-out rows are never billed. A business with no rating shown does not pass this filter. Example: 4."
          },
          "require_website": {
            "title": "Require a website",
            "type": "boolean",
            "description": "Free filter. Only return businesses with a public website. Automatically enables Enrich business details, since a website is only known after opening the business page.",
            "default": false
          },
          "exclude_closed": {
            "title": "Exclude closed businesses",
            "type": "boolean",
            "description": "Free filter. Drop businesses currently shown as closed or permanently closed. Businesses with no open/closed status shown are kept.",
            "default": false
          },
          "category_exact": {
            "title": "Exact category match",
            "maxItems": 25,
            "type": "array",
            "description": "Free filter. Only return businesses whose category exactly matches one of these values (e.g. \"Dentist\"), case-insensitive. A business with no category shown does not pass this filter.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}