{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Scraper with Emails",
    "description": "Google Maps places worldwide: name, category, address, coordinates, phone, website, rating, reviews, price level and hours. Optional contact extraction opens each business site for e-mails and socials. Tiled search beats Google's result cap. Example: 'restaurant', Los Angeles, 100 places.",
    "version": "1.0",
    "x-build-id": "roA9AgEp40hGw9gnv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/badr_xba~google-maps-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-badr_xba-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/badr_xba~google-maps-scraper/runs": {
      "post": {
        "operationId": "runs-sync-badr_xba-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/badr_xba~google-maps-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-badr_xba-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": [
          "searchQueries"
        ],
        "properties": {
          "searchQueries": {
            "title": "🔍 Search queries",
            "type": "array",
            "description": "What you would type into Google Maps, one per line: <b>dentist</b>, <b>plumber</b>, <b>marketing agency</b>. Each search runs in every area below.<br>You can also write the place inside the search (<b>dentist in Chicago</b>, <b>restaurants near 75011 Paris</b>) or paste <b>Google Maps links</b> (search, place, maps.app.goo.gl short links, ?cid=) and <b>place IDs</b> (ChIJ…). A list pasted on one line (dentist, plumber, lawyer) is split automatically; duplicates are removed.",
            "default": [
              "restaurant"
            ],
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "📍 Areas",
            "type": "array",
            "description": "Cities, districts, postal codes, regions or countries, one per line: <b>Los Angeles, California</b>, <b>Brooklyn, New York</b>, <b>Casablanca, Morocco</b>, <b>SW1A, London</b>. Write “city, region, country” so ambiguous names resolve correctly. GPS coordinates (<b>34.05, -118.24</b>) and Google Maps map links (…/@34.05,-118.24,13z) work too. Not used by searches that already name their place (dentist in Chicago) or by Google Maps links.",
            "default": [
              "Los Angeles, California"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxPlacesPerSearch": {
            "title": "💯 Maximum places per search and area",
            "minimum": 0,
            "type": "integer",
            "description": "Exact upper limit of places delivered (and billed) for each search in each area. 0 means no limit: the Actor stops when the area is exhausted — a large city can hold several thousand places. Keep it low for a first test.",
            "default": 100
          },
          "extractContacts": {
            "title": "📧 Find e-mails and social profiles",
            "type": "boolean",
            "description": "Opens the website of each business to collect public e-mail addresses and Facebook, Instagram, LinkedIn, X, YouTube, TikTok and WhatsApp links. This is what turns a place list into a lead list. It adds a few seconds per business and costs nothing extra.",
            "default": false
          },
          "onlyWithEmail": {
            "title": "Only places with an e-mail",
            "type": "boolean",
            "description": "Delivers only businesses whose e-mail address was found — you do not pay for the others. Switches the option above on automatically.",
            "default": false
          },
          "onlyWithPhone": {
            "title": "Only places with a phone number",
            "type": "boolean",
            "description": "Useful for cold calling: drops listings without a phone number.",
            "default": false
          },
          "onlyWithWebsite": {
            "title": "Only places with a website",
            "type": "boolean",
            "description": "Keeps only places that show a website.",
            "default": false
          },
          "onlyWithoutWebsite": {
            "title": "Only places without a website",
            "type": "boolean",
            "description": "The opposite: businesses with no website, often the best prospects for a web agency.",
            "default": false
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 1,
            "maximum": 5,
            "type": "number",
            "description": "Keep only places rated at least this, from 1 to 5 (decimals allowed, e.g. 4.5). Leave empty for no filter."
          },
          "minReviews": {
            "title": "Minimum review count",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only places with at least this many Google reviews. Leave empty for no filter."
          },
          "skipClosedPlaces": {
            "title": "Skip closed places",
            "type": "boolean",
            "description": "Drops places Google marks as permanently or temporarily closed.",
            "default": false
          },
          "categoryKeywords": {
            "title": "Category contains",
            "type": "array",
            "description": "Keep only places whose Google category contains one of these words, e.g. pizza, italian.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Name excludes",
            "type": "array",
            "description": "Exclude places whose name contains any of these words, e.g. a franchise you already work with.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "🔗 Google Maps URLs or place IDs",
            "type": "array",
            "description": "Optional — they can also go in Search queries. Place links (…/maps/place/…), ?cid= links, maps.app.goo.gl short links and place IDs (ChIJ…) give one row each. Search links (…/maps/search/pizza/@40.75,-73.98,14z) are searched in the area shown on the map.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "latitude": {
            "title": "Latitude (instead of an area)",
            "type": "string",
            "description": "To target an exact point rather than a city: centre latitude, e.g. 34.0522. Use together with Longitude and Radius. When set, Areas is ignored."
          },
          "longitude": {
            "title": "Longitude (instead of an area)",
            "type": "string",
            "description": "Centre longitude, e.g. -118.2437."
          },
          "radiusKm": {
            "title": "Radius around the point (km)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Half-width of the square area searched around those coordinates.",
            "default": 5
          },
          "dedupeAcrossSearches": {
            "title": "Remove duplicates across searches and areas",
            "type": "boolean",
            "description": "On (recommended): a business found by two keywords or in two overlapping areas is delivered — and billed — only once per run. Off: it can appear once per search.",
            "default": true
          },
          "strictArea": {
            "title": "Stay strictly inside the area",
            "type": "boolean",
            "description": "When a square inside your area is nearly empty — ocean, mountains — Google widens the search to the whole country on its own. Switched on, the Actor drops those results from elsewhere. Switch it off to keep everything Google offers.",
            "default": true
          },
          "languageCode": {
            "title": "Language",
            "type": "string",
            "description": "Two-letter language code (en, fr, es, de, ar…). Sets the language of categories and opening hours.",
            "default": "en"
          },
          "countryCode": {
            "title": "Country of results",
            "type": "string",
            "description": "Two-letter country code (us, gb, fr, ma…). Leave empty not to force a country."
          },
          "maxPagesPerTile": {
            "title": "Pages per square",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "Google returns 20 places per page. 5 pages means up to 100 places per square before it is split.",
            "default": 5
          },
          "maxSplitDepth": {
            "title": "Split depth",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "When a square comes back full, the Actor divides it into four to reach the places hidden behind Google's limit. 2 means up to 16 squares per area, 3 up to 64 — slower, more complete. Use 3 for dense cities.",
            "default": 2
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "How many requests run at the same time. Each request returns 20 places, so 8 is enough to collect a thousand in well under a minute. Lower it only if Google starts refusing requests.",
            "default": 8
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Without a proxy, a refused Google request is retried automatically through Apify's datacenter proxy with a fresh IP. If many requests are still refused (see FAILED_INPUTS), choose the RESIDENTIAL group. Business websites are always read without residential proxy.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}