{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Scraper",
    "description": "Scrapes Google Maps places — business data, reviews, images, contacts. Pay-per-event pricing.",
    "version": "1.0",
    "x-build-id": "K6TGsG8syPK4MKbtg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/intergration~google-maps-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-intergration-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/intergration~google-maps-scraper/runs": {
      "post": {
        "operationId": "runs-sync-intergration-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/intergration~google-maps-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-intergration-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",
        "properties": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to search on Google Maps (e.g. 'restaurant', 'pharmacy'). Use distinct, non-overlapping terms. Each term triggers a full map-scroll pass — duplicate or adjacent terms inflate run time and cost without adding unique places.",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "City, region, or country name. Resolved via OpenStreetMap Nominatim. Omitting this field AND all geolocation parameters caps output at 120 places."
          },
          "country": {
            "title": "Country code",
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code for precise resolution (e.g. 'KE', 'NG', 'ZA')."
          },
          "state": {
            "title": "State / province",
            "type": "string",
            "description": "State or province name for more precise location resolution (e.g. 'Nairobi County', 'Lagos State')."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City name for precise location resolution (e.g. Nairobi, Lagos, Cape Town)."
          },
          "postalCode": {
            "title": "Postal code",
            "type": "string",
            "description": "Postal or ZIP code for precise location resolution."
          },
          "customGeolocation": {
            "title": "Custom search area (GeoJSON)",
            "type": "object",
            "description": "GeoJSON Polygon, MultiPolygon, or Point with radiusKm. IMPORTANT: coordinates must be in [longitude, latitude] order per RFC 7946 — the opposite of Google Maps display order. Use geojson.io to build and visually verify before pasting."
          },
          "directPlaceIds": {
            "title": "Direct Place IDs or Google Maps URLs",
            "type": "array",
            "description": "Skip search — extract specific known places directly. WARNING: Direct Place ID/URL input automatically triggers the 'Additional place details' add-on ($0.0016/place) on top of the standard place-scraped rate. Minimum cost per place is $0.0048.",
            "items": {
              "type": "string"
            }
          },
          "maxCrawledPlaces": {
            "title": "Max places to scrape",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on total places returned. Set this to control cost on large runs.",
            "default": 100
          },
          "language": {
            "title": "Language",
            "enum": [
              "English",
              "Mandarin Chinese",
              "Spanish",
              "Arabic",
              "Hindi",
              "Portuguese",
              "Indonesian",
              "French",
              "Japanese",
              "Russian",
              "German",
              "Korean",
              "Turkish",
              "Vietnamese",
              "Thai",
              "Italian",
              "Polish",
              "Dutch",
              "Persian",
              "Swahili"
            ],
            "type": "string",
            "description": "Language for Google Maps results and UI. Overrides region-based language detection — results will be returned in this language regardless of the scraping location or proxy IP. Affects place names, categories, reviews, and all text fields in the output.",
            "default": "English"
          },
          "categories": {
            "title": "Category filter",
            "type": "array",
            "description": "Only keep places matching these Google Maps category labels. Include ALL synonyms — 'Divorce attorney' and 'Divorce lawyer' are different category IDs. Missing a synonym silently excludes all places under that label. Multiple categories count as 1 filter event.",
            "items": {
              "type": "string"
            }
          },
          "minimumStarRating": {
            "title": "Minimum star rating",
            "minimum": 1,
            "maximum": 5,
            "type": "number",
            "description": "Exclude places below this rating (1.0–5.0). Each active filter adds $0.0008 per place."
          },
          "requiresWebsite": {
            "title": "Has website (filter)",
            "type": "boolean",
            "description": "Only return places that have a website URL. Recommended when contact details are enabled — prevents spending place-scraping budget on listings that cannot return contact data.",
            "default": false
          },
          "titleKeyword": {
            "title": "Title keyword filter",
            "type": "string",
            "description": "Only return places whose name contains this string (case-insensitive partial match). Adds $0.0008 per place."
          },
          "scrapeAdditionalDetails": {
            "title": "Additional place details",
            "type": "boolean",
            "description": "Extract enriched fields: table reservations, web results, Q&A. Flat $0.0016/place regardless of how many detail types are enabled. Always enable all types you need — selecting fewer does not reduce cost.",
            "default": false
          },
          "scrapeContacts": {
            "title": "Contact details",
            "type": "boolean",
            "description": "Visit each business website to extract email addresses and social media profile URLs. Charged $0.0016 per place that has a website. Enable the 'Has website' filter to avoid spending place budget on listings with no website.",
            "default": false
          },
          "scrapeReviews": {
            "title": "Reviews",
            "type": "boolean",
            "description": "Extract individual reviews (text, rating, date, owner response). Charged $0.0004 per review. Set reviewsPerPlaceLimit to control cost.",
            "default": false
          },
          "reviewsPerPlaceLimit": {
            "title": "Reviews per place (cap)",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum reviews to extract per place. Set this before every review run — without a cap, places with thousands of reviews can drive significant cost. A cap of 200 reviews on 5,000 places = $400 in review charges.",
            "default": 50
          },
          "scrapeReviewerData": {
            "title": "Reviewer personal data",
            "type": "boolean",
            "description": "Include reviewer name, ID, URL, photo, isLocalGuide flag, and review count. Disabled by default for privacy compliance. Only enable when you have a documented lawful basis. Requires 'Reviews' to also be enabled.",
            "default": false
          },
          "scrapeImages": {
            "title": "Images",
            "type": "boolean",
            "description": "Extract images and metadata (author, upload date) from each place listing. Charged $0.0004 per image. Set imagesPerPlaceLimit to control cost.",
            "default": false
          },
          "imagesPerPlaceLimit": {
            "title": "Images per place (cap)",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum images to extract per place. Set conservatively — 50 images × 10,000 places = $200 in image charges.",
            "default": 10
          },
          "enrichSocialMedia": {
            "title": "Social media profile enrichment",
            "type": "boolean",
            "description": "Retrieve follower counts, descriptions, and verification status for discovered social profiles. REQUIRES 'Contact details' to also be enabled — social enrichment has no URLs to process if contacts are not scraped first.",
            "default": false
          },
          "scrapeBusinessLeads": {
            "title": "Business leads enrichment (LinkedIn)",
            "type": "boolean",
            "description": "Pull LinkedIn profiles for identified personnel. Part of the Additional place details add-on — $0.0016/place (mandatory) plus $0.0016/place for contacts.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy settings. Residential proxies are strongly recommended for production runs.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "debugMode": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Enable verbose logging including selector miss events and raw XHR body samples.",
            "default": false
          },
          "estimatedPlaces": {
            "title": "Estimated places (for pre-run cost estimate)",
            "minimum": 1,
            "type": "integer",
            "description": "Optional. Enter your expected place count to see a cost estimate in the billing summary before the run starts. Does not affect scraping — purely informational. Leave blank to skip pre-run estimate."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}