{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Email Extractor",
    "description": "Get emails, phone numbers and social media profiles of businesses on Google Maps. Search by keyword and location; each business's own website is checked for contact details. Export leads to Excel, CSV or JSON.",
    "version": "0.1",
    "x-build-id": "RUzYEfofGvv1Q5bm0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automly~google-maps-email-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automly-google-maps-email-extractor",
        "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/automly~google-maps-email-extractor/runs": {
      "post": {
        "operationId": "runs-sync-automly-google-maps-email-extractor",
        "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/automly~google-maps-email-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-automly-google-maps-email-extractor",
        "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 per line, e.g. dentist, plumber or italian restaurant. Add the city in the term (plumbers in Denver) or in Location below. Each term is its own search. Leave it empty to read only the links or place IDs below.",
            "items": {
              "type": "string"
            }
          },
          "locationQuery": {
            "title": "Location",
            "type": "string",
            "description": "Where to search, e.g. Austin, TX or 10001 or Germany. Only places inside this area are kept, and the search terms need no city then. Turn on grid search below to cover a large area in full. Use one location per run; the fields below are another way to name it."
          },
          "maxCrawledPlacesPerSearch": {
            "title": "Number of places per search",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "The most places to read for each search term, e.g. 50. A search usually finds up to about 200 places; turn on grid search below to cover a whole city or region.",
            "default": 100
          },
          "onlyPlacesWithEmail": {
            "title": "Only places with an email",
            "type": "boolean",
            "description": "Save only places whose website lists at least one email address. Places without a website are skipped before they count toward the number of places per search; places whose website shows no email are left out after it is read and still count toward that number, so you may get fewer rows than it. Places left out are not saved and not charged; the run's status says how many.",
            "default": false
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language of the Google Maps results, e.g. en, de, fr, es.",
            "default": "en"
          },
          "countryCode": {
            "title": "Country Code",
            "type": "string",
            "description": "Country the search prefers, e.g. us, gb, de. Name the city or area in Location or the search term: this alone does not limit results to one country.",
            "default": "us"
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City, e.g. Pittsburgh. Do not add the state or country here."
          },
          "county": {
            "title": "County",
            "type": "string",
            "description": "County, e.g. Travis County."
          },
          "state": {
            "title": "State",
            "type": "string",
            "description": "State or region, e.g. Texas."
          },
          "postalCode": {
            "title": "Postal code",
            "type": "string",
            "description": "One postal code, e.g. 10001. Use it on its own, without a city."
          },
          "customGeolocation": {
            "title": "Custom search area",
            "type": "object",
            "description": "Draw the exact area to search as GeoJSON, coordinates as [longitude, latitude]: a Polygon, a MultiPolygon, or a Point with radiusKm for a circle, e.g. {\"type\": \"Point\", \"coordinates\": [-73.9857, 40.7484], \"radiusKm\": 3}. Only places inside the area are kept. geojson.io draws one for you."
          },
          "startUrls": {
            "title": "Google Maps links",
            "type": "array",
            "description": "Google Maps links, e.g. https://www.google.com/maps/place/... , a short share link (maps.app.goo.gl/...), a ?cid= link, or a search link (https://www.google.com/maps/search/pizza/@40.75,-73.98,15z) which is read like a search term at that spot on the map.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "placeIds": {
            "title": "Place IDs",
            "type": "array",
            "description": "Google place IDs, one per line, e.g. ChIJCar0f49ZwokR6ozLV-dHNTE (the placeId field of any result).",
            "items": {
              "type": "string"
            }
          },
          "categoryFilterWords": {
            "title": "Only these categories",
            "type": "array",
            "description": "Keep places with one of these Google categories, e.g. dentist or italian restaurant. A category matches when it contains every word you give (restaurant matches Chinese restaurant). List all the names a category can have (divorce lawyer, divorce attorney).",
            "items": {
              "type": "string"
            }
          },
          "searchMatching": {
            "title": "Name must match the search term",
            "enum": [
              "all",
              "only_includes",
              "only_exact"
            ],
            "type": "string",
            "description": "Keep only places whose name contains, or is exactly, the search term, e.g. Starbucks. The part after \"in\" or \"near\" (the city) is not part of the name.",
            "default": "all"
          },
          "placeMinimumStars": {
            "title": "Minimum rating",
            "enum": [
              "",
              "two",
              "twoAndHalf",
              "three",
              "threeAndHalf",
              "four",
              "fourAndHalf"
            ],
            "type": "string",
            "description": "Keep places rated at least this many stars. Places with no rating are skipped too.",
            "default": ""
          },
          "placeMinimumReviews": {
            "title": "Minimum number of reviews",
            "minimum": 0,
            "type": "integer",
            "description": "Keep places with at least this many reviews, e.g. 50. 0 keeps every place.",
            "default": 0
          },
          "website": {
            "title": "Website",
            "enum": [
              "allPlaces",
              "withWebsite",
              "withoutWebsite"
            ],
            "type": "string",
            "description": "Keep only places that list a website, or only those that do not (handy for web design leads).",
            "default": "allPlaces"
          },
          "skipClosedPlaces": {
            "title": "Skip closed places",
            "type": "boolean",
            "description": "Skip places marked as temporarily or permanently closed.",
            "default": false
          },
          "enableGridSearch": {
            "title": "Enable Grid Search",
            "type": "boolean",
            "description": "Split the search area into a grid of smaller cells to find more results. Searches the area in smaller parts so one query can return thousands of places instead of about 200. Needs a known city in the query or custom bounds.",
            "default": false
          },
          "gridCellKm": {
            "title": "Grid Cell Size (km)",
            "minimum": 0.5,
            "maximum": 50,
            "type": "number",
            "description": "Size of each grid cell in kilometers. Smaller cells find more results but take longer. Recommended: 5 for quick scans, 2 for thorough scraping, 1 for exhaustive coverage. A grid may contain at most 50,000 cells; use a larger cell size or smaller bounds for larger areas.",
            "default": 5
          },
          "maxPagesPerCell": {
            "title": "Max Pages Per Grid Cell",
            "minimum": 1,
            "maximum": 11,
            "type": "integer",
            "description": "How deeply each grid cell is searched: higher finds more places in busy areas but takes longer. Only applies when grid search is enabled.",
            "default": 5
          },
          "customBounds": {
            "title": "Custom Search Bounds",
            "type": "object",
            "description": "Custom bounding box for grid search as JSON: {\"south\": lat, \"west\": lng, \"north\": lat, \"east\": lng}. If not provided, auto-detects from known cities.",
            "properties": {
              "south": {
                "title": "South Latitude",
                "type": "number",
                "description": "South latitude of bounding box"
              },
              "west": {
                "title": "West Longitude",
                "type": "number",
                "description": "West longitude of bounding box"
              },
              "north": {
                "title": "North Latitude",
                "type": "number",
                "description": "North latitude of bounding box"
              },
              "east": {
                "title": "East Longitude",
                "type": "number",
                "description": "East longitude of bounding box"
              }
            }
          },
          "proxyConfig": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Connection settings. The default works for almost every run; leave it as it is.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}