{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Business Scraper",
    "description": "Finds businesses Google's English-only search misses -- term expansion into Malay, Chinese, Japanese, German, Spanish, Portuguese, French, verified with real sweeps in five markets. Also fast, cheap, reliable: plain HTTP, no browser, resumable sweeps, proxy rotation, degraded-session detection.",
    "version": "0.1",
    "x-build-id": "aqQfsHtgrOD4UaXnu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/savefy~gmaps-business-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-savefy-gmaps-business-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/savefy~gmaps-business-scraper/runs": {
      "post": {
        "operationId": "runs-sync-savefy-gmaps-business-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/savefy~gmaps-business-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-savefy-gmaps-business-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": [
          "searchTerms"
        ],
        "properties": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Every term is swept independently across the whole tile grid. Overlap between terms is expected and fine — results are deduped by place_id within the run. Multiple languages/phrasings of the same thing are the main coverage lever (more so than tile spacing), so include synonyms and local-language variants here.",
            "default": [
              "restaurant"
            ],
            "items": {
              "type": "string"
            }
          },
          "boundingBox": {
            "title": "Bounding box (advanced)",
            "type": "object",
            "description": "Explicit area as {\"north\":.., \"south\":.., \"east\":.., \"west\":..} in decimal degrees. Takes precedence over Center point + radius below if both are set. Leave empty to use the center point instead."
          },
          "centerLat": {
            "title": "Center latitude",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Used with Center longitude + Radius to build the search area, if Bounding box is not set.",
            "default": 40.758
          },
          "centerLng": {
            "title": "Center longitude",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "Used with Center latitude + Radius to build the search area, if Bounding box is not set.",
            "default": -73.9855
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 1,
            "type": "integer",
            "description": "Distance from the center point to each edge of the search area (a square, not a circle — tiling is grid-based). Only used when Bounding box is not set.",
            "default": 2
          },
          "tileSpacingKm": {
            "title": "Tile spacing (km)",
            "minimum": 1,
            "type": "integer",
            "description": "Distance between tile centers. Smaller spacing = more, narrower tiles = more requests but finer coverage in dense areas. Start coarse (e.g. 40km) to gauge a term's yield, then narrow on the terms that saturate.",
            "default": 20
          },
          "maxTileDepth": {
            "title": "Max subdivision depth",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "How many times a saturated tile (full page of results AND several genuinely new businesses) can be split into 4 half-spacing tiles. 0 disables subdividing — useful for a first calibration pass.",
            "default": 0
          },
          "minNewToSplit": {
            "title": "Min new businesses to trigger a split (advanced)",
            "minimum": 1,
            "type": "integer",
            "description": "A full-page tile only gets subdivided if it also yielded at least this many businesses not already seen this run. Prevents wasting requests re-splitting sparse areas that Google just padded with distant results.",
            "default": 5
          },
          "maxPagesPerTile": {
            "title": "Max pages per tile",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Page cap per (term, tile) before moving on, at 20 results/page.",
            "default": 1
          },
          "requestDelaySecs": {
            "title": "Delay between requests (seconds)",
            "minimum": 0,
            "type": "number",
            "description": "Politeness delay between page/tile fetches.",
            "default": 2
          },
          "countryCode": {
            "title": "Country (gl parameter)",
            "type": "string",
            "description": "Google's 'gl' country-bias parameter, e.g. 'my' for Malaysia, 'us' for United States.",
            "default": "us"
          },
          "languageCode": {
            "title": "Language (hl parameter)",
            "type": "string",
            "description": "Google's 'hl' interface-language parameter, e.g. 'en', 'ms', 'zh-CN'. Affects which language result text comes back in, not which businesses are found — use multiple search terms for that.",
            "default": "en"
          },
          "expandTerms": {
            "title": "Expand terms (local languages + business-noun suffixes)",
            "type": "boolean",
            "description": "`gl`/`hl` only bias region and UI language — they do NOT translate your query. Searching \"laundry\" with gl=my searches the literal English word and misses every \"kedai dobi\". When this is on, each search term (and Custom term) is matched against a business-type table and expanded into that business's equivalents across Expansion languages below, e.g. \"laundry\" → \"dobi\", \"kedai dobi\", \"洗衣店\", \"自助洗衣\". A term with no match in the table is kept as-is and logged, never dropped. English-language results are then also expanded with business-noun suffixes (centre, court, club, …), e.g. \"padel\" → \"padel centre\", \"padel court\" …",
            "default": false
          },
          "expansionLanguages": {
            "title": "Expansion languages (advanced)",
            "type": "array",
            "description": "Which languages to expand into when Expand terms is on. Table coverage: en, ms, zh, ja, de, es, pt, fr — every one empirically verified with a real sweep through this Actor before shipping. th/id are not in the table (translations were never verified), so listing them here currently has no effect. Leave empty to derive from Country code (e.g. my → en, ms, zh; jp → en, ja; de → en, de; es → en, es; br → en, pt; fr → en, fr).",
            "items": {
              "type": "string"
            }
          },
          "customTerms": {
            "title": "Custom terms (advanced)",
            "type": "array",
            "description": "Extra search terms merged in alongside Search terms — always searched, regardless of Expand terms. Use this for anything the business-type table doesn't cover; an unmatched term is searched as-is rather than dropped.",
            "items": {
              "type": "string"
            }
          },
          "expansionSuffixes": {
            "title": "Expansion suffixes (advanced)",
            "type": "array",
            "description": "Overrides the default business-noun suffix list. Only applied to plain-ASCII (English) terms — appending an English suffix to a non-Latin-script or Malay-only term produces an unsearchable string.",
            "default": [
              "centre",
              "center",
              "court",
              "club",
              "complex",
              "hall",
              "arena"
            ],
            "items": {
              "type": "string"
            }
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Google rate-limits aggressively by IP. Apify Proxy (residential recommended) is strongly advised for anything beyond a small calibration run.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}