{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Scraper & Extractor - Postal Code Lists",
    "description": "Scrapes Google Maps for any search term and place. Give it search terms plus a location or a list of postal codes; get each business's name, address, phone, website, rating, review count, opening hours, picture and coordinates as rows.",
    "version": "0.1",
    "x-build-id": "dSXCKFBo2jejwOm1o"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/h1018y~anvil-google-maps-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-h1018y-anvil-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/h1018y~anvil-google-maps-api/runs": {
      "post": {
        "operationId": "runs-sync-h1018y-anvil-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/h1018y~anvil-google-maps-api/run-sync": {
      "post": {
        "operationId": "run-sync-h1018y-anvil-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": {
          "searchStringsArray": {
            "title": "Search terms",
            "type": "array",
            "description": "What to look for on Google Maps, one phrase per line, for example: coffee shop, dentist, plumber.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "locationQuery": {
            "title": "Location",
            "type": "string",
            "description": "City, region or country to search in, for example: New York, USA or Seoul, South Korea."
          },
          "maxCrawledPlacesPerSearch": {
            "title": "Max places per search term",
            "minimum": 1,
            "type": "integer",
            "description": "Stops as soon as this many places were found for each search term. Example: 20.",
            "default": 20
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language of the result texts as a two-letter code, for example en, de, ko or ja.",
            "default": "en"
          },
          "countryCode": {
            "title": "Country code",
            "type": "string",
            "description": "Two-letter country code for the Google Maps country site, for example us, gb, de or kr."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "Optional city added to the location, for example Austin. Use it with Country code."
          },
          "state": {
            "title": "State",
            "type": "string",
            "description": "Optional state or region added to the location, for example Texas."
          },
          "county": {
            "title": "County",
            "type": "string",
            "description": "Optional county or district added to the location, for example Travis County."
          },
          "postalCode": {
            "title": "Postal codes",
            "type": "string",
            "description": "One postal code or several separated by commas, for example 10001, 10002; each one is searched on its own and added to the location."
          },
          "startUrls": {
            "title": "Google Maps links",
            "type": "array",
            "description": "Pasted Google Maps search or place links, for example https://www.google.com/maps/search/pizza+in+Rome/.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "categoryFilterWords": {
            "title": "Category filter words",
            "type": "array",
            "description": "Keep only places whose category contains one of these words, for example: pizza, bakery.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchMatching": {
            "title": "Search matching",
            "enum": [
              "all",
              "only_includes",
              "only_exact"
            ],
            "type": "string",
            "description": "all keeps every place; only_includes keeps places whose name contains the search term; only_exact needs the exact name.",
            "default": "all"
          },
          "placeMinimumStars": {
            "title": "Minimum stars",
            "enum": [
              "",
              "two",
              "twoAndHalf",
              "three",
              "threeAndHalf",
              "four",
              "fourAndHalf"
            ],
            "type": "string",
            "description": "Skip places rated below this value. Example: four keeps 4.0 stars and up.",
            "default": ""
          },
          "website": {
            "title": "Website filter",
            "enum": [
              "allPlaces",
              "withWebsite",
              "withoutWebsite"
            ],
            "type": "string",
            "description": "allPlaces returns everything; withWebsite only places that list a website; withoutWebsite only places without one.",
            "default": "allPlaces"
          },
          "skipClosedPlaces": {
            "title": "Skip closed places",
            "type": "boolean",
            "description": "Leave out places that Google marks as permanently or temporarily closed.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new or changed",
            "type": "boolean",
            "description": "Return only places that are new or whose rating, reviews, phone or website changed since the last run with the same input.",
            "default": false
          },
          "includeBioContacts": {
            "title": "Include contacts from description text",
            "type": "boolean",
            "description": "Off by default. This version returns only the phone and website a business lists in its own Google Maps fields, never text-mined contacts.",
            "default": false
          },
          "useApifyProxy": {
            "title": "Use Apify proxy",
            "type": "boolean",
            "description": "Send the requests through the Apify proxy. Keep it on unless you know what you are doing.",
            "default": true
          },
          "proxyGroups": {
            "title": "Proxy groups",
            "type": "array",
            "description": "Optional Apify proxy groups to use, for example RESIDENTIAL.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "postalCodes": {
            "title": "Postal codes list",
            "type": "array",
            "description": "A list of postal codes; each one is searched on its own and every place says which code found it (searchPostalCode), for example 10001, 10002.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxImages": {
            "title": "Pictures per place",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "How many picture links to return per place in imageUrls, 0 to 20, for example 5.",
            "default": 5
          },
          "webhookUrl": {
            "title": "Send results to (webhook URL)",
            "type": "string",
            "description": "Optional. An https address - your own system, Zapier, Make or a Slack incoming webhook - that gets each run's results as JSON (with 'only new' on: just the new ones). Example: https://hooks.slack.com/services/T000/B000/XXXX"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}