{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Places API – Area Coverage",
    "description": "Search Google Maps places and businesses in a circle, a polygon or by text. Adaptive grid for dense areas, one record per place, and a coverage report that shows what was searched.",
    "version": "0.1",
    "x-build-id": "qJYtkXB7i7O97cDO7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datarelay~google-maps-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datarelay-google-maps-api",
        "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/datarelay~google-maps-api/runs": {
      "post": {
        "operationId": "runs-sync-datarelay-google-maps-api",
        "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/datarelay~google-maps-api/run-sync": {
      "post": {
        "operationId": "run-sync-datarelay-google-maps-api",
        "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",
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "details",
              "match",
              "estimate"
            ],
            "type": "string",
            "description": "`search` – find places by search queries in an area or by text (default). `details` – full details of places you already know (Place IDs, CIDs or Google Maps URLs). `match` – find the Google Maps place of each business in your list (name + address, e.g. from a CRM), with a confidence. `estimate` – free estimate of how many places a search would deliver and what it would cost.",
            "default": "search"
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "What to search for, as you would type it into Google Maps: `coffee shop`, `dentist`, `car repair`. Each place is delivered once per run, even when several queries find it. Search mode only.",
            "items": {
              "type": "string"
            }
          },
          "allPlaces": {
            "title": "All places (broad categories)",
            "type": "boolean",
            "description": "Search ~50 broad categories (restaurants, shops, services, health, education, offices…) and merge them: \"everything\" in the area – Google Maps has no search for all places. Costs as many searches as categories; try `mode: estimate` first.",
            "default": false
          },
          "places": {
            "title": "Places (details mode)",
            "type": "array",
            "description": "Details mode: Place IDs (`ChIJ…`), CIDs, feature ids (`0x…:0x…`) or Google Maps URLs (place links, `?cid=` links, maps.app.goo.gl short links). Unknown or invalid entries are reported with a status and not charged.",
            "items": {
              "type": "string"
            }
          },
          "matchPlaces": {
            "title": "Businesses to match (match mode)",
            "type": "array",
            "description": "Match mode: one business per entry – a line \"Name, street, city\" or an object { \"name\", \"address\", \"city\", \"country\", \"phone\", \"website\", \"id\" }. Phone and website confirm the match; `id` is returned as `inputId`. Matches are charged; inputs without a confident match are reported free with the closest candidates."
          },
          "includeDetails": {
            "title": "Add place details",
            "type": "boolean",
            "description": "Search mode: fetch the details of every delivered place (rating distribution, the owner's description, review topics). One extra request per place, charged as a separate event only when the details were delivered.",
            "default": false
          },
          "expandQueries": {
            "title": "Expand queries",
            "type": "boolean",
            "description": "After the search, also search the categories that many of the found places have (e.g. `dentist` → `Dental clinic`, `Orthodontist`) – more places without knowing Google's category names. Up to 3 extra queries per query.",
            "default": false
          },
          "includePlacesInside": {
            "title": "Places inside malls, airports, stations",
            "type": "boolean",
            "description": "For malls, airports, stations and similar places found, also deliver the places in their directory (shops, restaurants, services) as separate records with `insideOf` – each charged as a place.",
            "default": false
          },
          "location": {
            "title": "Location (text search)",
            "type": "string",
            "description": "Optional. Searches \"<query> in <location>\" and lets Google pick the area – quick, but Google returns at most 100–200 places per query. For complete coverage of an area use a circle or a polygon below instead."
          },
          "locations": {
            "title": "More locations (text search)",
            "type": "array",
            "description": "More text locations, each searched with every query (e.g. `Prague`, `Brno`, `Ostrava`). Each place is delivered once.",
            "items": {
              "type": "string"
            }
          },
          "centerLat": {
            "title": "Circle: centre latitude",
            "type": "number",
            "description": "Latitude of the circle's centre, e.g. `50.0875`. The circle is ignored when area names or a text location are given."
          },
          "centerLng": {
            "title": "Circle: centre longitude",
            "type": "number",
            "description": "Longitude of the circle's centre, e.g. `14.4213`."
          },
          "radiusKm": {
            "title": "Circle: radius (km)",
            "type": "number",
            "description": "Radius in kilometres (up to 150; the area may be up to 50,000 km²)."
          },
          "polygon": {
            "title": "Polygon (GeoJSON)",
            "type": "object",
            "description": "Instead of a circle: a GeoJSON `Polygon` or `MultiPolygon` (also inside a `Feature`), coordinates as `[longitude, latitude]`. Holes are respected. Draw one at geojson.io and paste it here."
          },
          "areas": {
            "title": "Several areas (GeoJSON)",
            "type": "object",
            "description": "Search several areas in one run, e.g. postal codes or districts: a GeoJSON FeatureCollection whose features are Polygons / MultiPolygons, or Points with `properties.radiusKm` (circles). `properties.name` names the area in the results (`areaName`) and in the summary. Each place is delivered once, for the first area that finds it. Use instead of the circle or the polygon."
          },
          "areaNames": {
            "title": "Areas by name",
            "type": "array",
            "description": "Names of districts, towns, postal codes or regions (e.g. `Praha 2`, `10115 Berlin`, `Kraków`): their boundaries come from OpenStreetMap (© OpenStreetMap contributors) and each is searched like a polygon. Names without a boundary (a street, a single building) are rejected.",
            "items": {
              "type": "string"
            }
          },
          "estimateCompleteness": {
            "title": "Estimate completeness",
            "type": "boolean",
            "description": "Search the area a second time on a shifted grid and estimate (capture–recapture) how many places Google lists for the queries – the summary tells how complete the result is. About twice the requests; places found only by the second pass are delivered too.",
            "default": false
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language of names, categories, addresses and opening hours, e.g. `en`, `de`, `pl`.",
            "default": "en"
          },
          "languages": {
            "title": "More languages",
            "type": "array",
            "description": "Search again in these languages (e.g. `cs`, `de`): Google ranks places differently per language, so more languages can find more places. Records are in the language of the search that found them first.",
            "items": {
              "type": "string"
            }
          },
          "countryCode": {
            "title": "Country",
            "type": "string",
            "description": "Optional two-letter country code (`US`, `DE`) for Google's regional ranking."
          },
          "maxPlaces": {
            "title": "Maximum places",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many places in total (0 = no limit). You pay only for delivered places.",
            "default": 100
          },
          "maxPlacesPerQuery": {
            "title": "Maximum places per query",
            "minimum": 0,
            "type": "integer",
            "description": "Limit per search query (0 = no limit).",
            "default": 0
          },
          "maxRunSecs": {
            "title": "Time limit (seconds)",
            "minimum": 0,
            "type": "integer",
            "description": "Stop early with the places found so far (0 = until the run's timeout). The summary lists the cells that were not searched.",
            "default": 0
          },
          "skipClosed": {
            "title": "Skip closed businesses",
            "type": "boolean",
            "description": "Leave out places Google marks as closed. Filtered places are not charged.",
            "default": true
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Only places rated at least this (0–5). Places without a rating are left out when set.",
            "default": 0
          },
          "minReviews": {
            "title": "Minimum number of reviews",
            "minimum": 0,
            "type": "integer",
            "description": "Only places with at least this many reviews.",
            "default": 0
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Only places with a category containing one of these words (any language Google shows), e.g. `cafe`, `bakery`. Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "onlyWithWebsite": {
            "title": "Only places with a website",
            "type": "boolean",
            "description": "Leave out places without a website.",
            "default": false
          },
          "onlyWithPhone": {
            "title": "Only places with a phone number",
            "type": "boolean",
            "description": "Leave out places without a phone number.",
            "default": false
          },
          "requireSignals": {
            "title": "Only places with these signals",
            "type": "array",
            "description": "Lead filters: e.g. `popular_without_website` (100+ reviews, no website), `unclaimed_profile`, `no_website`, `few_reviews`, `low_rating`, `open_sundays`, `open_late`, `open_24_hours`, `no_phone`. All selected must apply.",
            "items": {
              "type": "string",
              "enum": [
                "no_website",
                "popular_without_website",
                "no_phone",
                "unclaimed_profile",
                "few_reviews",
                "low_rating",
                "open_sundays",
                "open_late",
                "open_24_hours"
              ],
              "enumTitles": [
                "No website",
                "Popular (100+ reviews) without a website",
                "No phone",
                "Unclaimed profile",
                "Fewer than 10 reviews",
                "Rating below 3.5",
                "Open on Sundays",
                "Open late (22:00+)",
                "Open 24 hours"
              ]
            },
            "default": []
          },
          "excludePlaces": {
            "title": "Exclude places",
            "type": "array",
            "description": "Place IDs, CIDs or Google Maps URLs you already have (e.g. from your CRM): skipped and not charged.",
            "items": {
              "type": "string"
            }
          },
          "distanceFromLat": {
            "title": "Distance from: latitude",
            "type": "number",
            "description": "Adds `distanceMeters` from this point to each place (default: the circle's centre)."
          },
          "distanceFromLng": {
            "title": "Distance from: longitude",
            "type": "number",
            "description": "Longitude of the point for `distanceMeters`."
          },
          "competitorRadiusMeters": {
            "title": "Competitors within (meters)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "For each delivered place, count the delivered places of the same Google type within this radius, their average rating and the nearest one (record COMPETITION, summary in OUTPUT.analytics). 0 = off. The count covers what this run searched.",
            "default": 0
          },
          "nameMatch": {
            "title": "Name must match the query",
            "enum": [
              "all",
              "contains",
              "exact"
            ],
            "type": "string",
            "description": "`all` – every place Google finds (default). `contains` – only places whose name contains the query (e.g. all \"Starbucks\" branches). `exact` – the name equals the query. Case and accents are ignored.",
            "default": "all"
          },
          "syncKey": {
            "title": "Sync key (monitoring)",
            "type": "string",
            "description": "A name for a search you repeat (e.g. `prague-cafes`). Places are remembered under this key in your account's storage, so later runs can deliver only new or changed places. Letters, digits and dashes."
          },
          "syncMode": {
            "title": "Sync mode",
            "enum": [
              "off",
              "newOnly",
              "changes"
            ],
            "type": "string",
            "description": "`newOnly` – deliver (and pay for) only places not delivered under this key before (\"new\" = first found under the key; Google's lists vary, so early runs still add places that existed before). `changes` – deliver new places and places whose name, address, phone, website, rating, status or opening hours changed (with the previous values), and report places not found in two complete runs in a row as `missing` (free). Unchanged places are not delivered or charged.",
            "default": "off"
          },
          "syncReset": {
            "title": "Reset the sync key",
            "type": "boolean",
            "description": "Forget what was remembered under the key (e.g. after changing the queries or the area) and start again.",
            "default": false
          },
          "syncBaselineRuns": {
            "title": "Baseline runs",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Runs under a new sync key that only remember places, delivering and charging nothing – so the first report of changes is not a list of everything. Default: 1 for `changes`, 0 for `newOnly`."
          },
          "fields": {
            "title": "Output fields",
            "type": "array",
            "description": "Only these fields in each record (empty = all), e.g. `phone`, `website`, `rating`. `fid`, `placeId` and `name` are always included.",
            "items": {
              "type": "string"
            }
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "With residential proxies (default), pages go out through the cheaper datacenter proxy first and switch to residential only after Google blocks a page twice. Other proxy settings are used as they are.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}