{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Business Scraper — Country-Scale",
    "description": "Extracts every business Google Maps publishes inside a bounding box, by recursive geographic tiling. No login, no browser, no cookies.",
    "version": "0.1",
    "x-build-id": "Pzun8ijbCNBVch7gr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/oswaldocarabano~google-maps-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-oswaldocarabano-google-maps-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/oswaldocarabano~google-maps-scraper/runs": {
      "post": {
        "operationId": "runs-sync-oswaldocarabano-google-maps-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/oswaldocarabano~google-maps-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-oswaldocarabano-google-maps-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": [
          "country",
          "categories"
        ],
        "properties": {
          "country": {
            "title": "Country",
            "enum": [
              "VE",
              "CO",
              "PE",
              "EC",
              "CL",
              "AR",
              "UY",
              "PY",
              "BO",
              "MX",
              "GT",
              "CR",
              "PA",
              "DO",
              "US",
              "CA"
            ],
            "type": "string",
            "description": "Supplies the bounding box, the country bias and the language. Countries under GDPR, UK GDPR and LGPD are refused by design — see the README section \"Country scope\".",
            "default": "US"
          },
          "categories": {
            "title": "Search terms",
            "type": "array",
            "description": "One term per category, in the country's language. Terms barely overlap — measured at 5.5% across 30 of them — so each one you add is close to a full extra pass, in both time and cost.",
            "default": [
              "restaurant"
            ],
            "items": {
              "type": "string"
            }
          },
          "bbox": {
            "title": "Custom area (bounding box)",
            "type": "object",
            "description": "Overrides the country's own box, so you can scrape a single city or run one batch of a large country. Four decimal degrees, south-west corner first — for Miami: {\"lat_min\": 25.70, \"lng_min\": -80.32, \"lat_max\": 25.85, \"lng_max\": -80.13}. Leave it empty to sweep the whole country."
          },
          "maxPlaces": {
            "title": "Maximum places",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many unique businesses. 0 means no limit. This is the safest way to cap what a run costs.",
            "default": 0
          },
          "requestBudget": {
            "title": "Request budget",
            "minimum": 10,
            "maximum": 200000,
            "type": "integer",
            "description": "Maximum requests for this run. A whole country does not fit in one run — split it into batches. Tiles already visited are skipped for free, so re-running continues where the last one stopped instead of starting over.",
            "default": 5000
          },
          "censusOnly": {
            "title": "Census only — classify, do not extract",
            "type": "boolean",
            "description": "Runs only the cheap first pass: one request per 1-degree cell. It tells you which areas are dense, which belong to a neighbouring country and which are empty — so you know what a country costs before spending it. Venezuela is 180 cells and classifies in about 20 seconds.",
            "default": false
          },
          "useCache": {
            "title": "Use the shared cache",
            "type": "boolean",
            "description": "Skip tiles that an earlier run already exhausted. Their businesses are still delivered, flagged with from_cache and data_age_hours so a cached row never passes as a fresh one.",
            "default": true
          },
          "maxDepth": {
            "title": "Maximum tile depth",
            "minimum": 1,
            "maximum": 14,
            "type": "integer",
            "description": "A safety guard, NOT the stopping rule — the stopping rule is saturation. If a run reaches this depth its census is truncated, and both the log and the run summary say so. A dense 1-degree cell over a capital was still splitting at depth 8.",
            "default": 8
          },
          "saturationThreshold": {
            "title": "Saturation threshold",
            "minimum": 50,
            "maximum": 200,
            "type": "integer",
            "description": "A tile counts as full at this many results and gets split into four. 190 leaves margin under Google's hard ceiling of about 200, because the same query does not return the same count twice.",
            "default": 190
          },
          "gridStep": {
            "title": "Census cell size",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Size in degrees of the first-pass cells. 1 degree is the measured default; larger cells classify faster but hide more inside each one.",
            "default": 1
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Parallel requests. 10 is the measured default; 617 requests at 12 ran without a single block.",
            "default": 10
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}