{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Scraper",
    "description": "Extract business data from Google Maps search results — names, addresses, phones, websites, ratings, reviews, opening hours, and 20+ fields. Covers any location or category. Grid search mode finds thousands of places per city.",
    "version": "1.0",
    "x-build-id": "t80QhiNzfGyVU5cVZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automly~google-maps-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automly-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/automly~google-maps-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automly-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/automly~google-maps-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automly-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": [
          "searchStringsArray"
        ],
        "properties": {
          "searchStringsArray": {
            "title": "Search Queries",
            "type": "array",
            "description": "List of search queries to run on Google Maps (e.g., 'restaurants in cairo', 'hotels in dubai'). Each query will be searched separately.",
            "items": {
              "type": "string"
            }
          },
          "maxCrawledPlacesPerSearch": {
            "title": "Max Places Per Search",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of places to scrape per search query. In simple mode, Google Maps returns up to ~220 results. Enable grid search to get more.",
            "default": 100
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language code for Google Maps results (e.g., 'en', 'ar', 'fr').",
            "default": "en"
          },
          "countryCode": {
            "title": "Country Code",
            "type": "string",
            "description": "Country code for Google Maps results (e.g., 'us', 'eg', 'ae').",
            "default": "us"
          },
          "enableGridSearch": {
            "title": "Enable Grid Search",
            "type": "boolean",
            "description": "Split the search area into a grid of smaller cells to find more results. This bypasses the ~200 result limit per single search by running localized searches across the area. Requires either 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.",
            "default": 5
          },
          "maxPagesPerCell": {
            "title": "Max Pages Per Grid Cell",
            "minimum": 1,
            "maximum": 11,
            "type": "integer",
            "description": "Maximum number of result pages to fetch per grid cell (20 results per page). Only applies when grid search is enabled.",
            "default": 5
          },
          "proxyConfig": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Select proxies to use. Residential proxies are recommended for best results, but datacenter proxies also work.",
            "default": {
              "useApifyProxy": true
            }
          },
          "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"
              }
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}