{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Scraper — Reviews & Sentiment Analysis",
    "description": "Scrape business listings from Google Maps to collect names, addresses, phone numbers, websites, and more. Perfect for generating local B2B leads or enriching your CRM with location-based contact data.",
    "version": "0.1",
    "x-build-id": "NR4jYlAp2vgWdokd4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scraper-engine~google-maps-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scraper-engine-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/scraper-engine~google-maps-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scraper-engine-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/scraper-engine~google-maps-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scraper-engine-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": [
          "keywords"
        ],
        "properties": {
          "locations": {
            "title": "📍 Cities, regions, or neighborhoods",
            "type": "array",
            "description": "🏙️ Examples: New York, Texas, Downtown Chicago — mix and match for bulk coverage.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "🔎 What to find (keywords)",
            "type": "array",
            "description": "☕ Describe the businesses or places you care about — coffee shops, dentists, hotels near airport. Add many keywords to multiply your searches.",
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "🔗 Optional: Google Maps links",
            "type": "array",
            "description": "🌐 Bulk-friendly list of map links.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "🎯 How many places to collect",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "🔢 Total unique places (parents) across all locations, keywords, and URLs (duplicates merged). Default is friendly for quick tests.",
            "default": 20
          },
          "maxReviewsPerPlace": {
            "title": "💬 Max reviews per place",
            "minimum": 0,
            "maximum": 99999,
            "type": "integer",
            "description": "🧾 How many reviews to scrape per place — text, stars, date, owner response, context. Example: maxResults=5 + maxReviewsPerPlace=10 → up to 5 places and up to 50 review rows. 0 = skip reviews (places only). Default is 10.",
            "default": 10
          },
          "reviewsSort": {
            "title": "🔀 Reviews sort order",
            "enum": [
              "newest",
              "mostRelevant",
              "highestRanking",
              "lowestRanking"
            ],
            "type": "string",
            "description": "⭐ Order reviews are collected in: newest (monitoring), mostRelevant (Google default), highestRanking or lowestRanking (praise vs complaint mining). Default is newest.",
            "default": "newest"
          },
          "reviewsStartDate": {
            "title": "📅 Reviews start date",
            "type": "string",
            "description": "🗓️ Only collect reviews on/after this date — absolute (2025-05-03) or relative (e.g. \"3 months\"). Leave empty for all-time. On newest sort the scroll stops once older reviews appear.",
            "default": ""
          },
          "reviewsFilterString": {
            "title": "🔍 Reviews keyword filter",
            "type": "string",
            "description": "🔎 Only keep reviews whose text contains this keyword (e.g. \"parking\", \"wait time\", \"refund\"). Empty = keep all reviews.",
            "default": ""
          },
          "language": {
            "title": "🌐 Language",
            "enum": [
              "en",
              "es",
              "fr",
              "de",
              "it",
              "pt",
              "nl",
              "hi",
              "ar",
              "tr",
              "id",
              "ja",
              "ko",
              "zh-CN"
            ],
            "type": "string",
            "description": "🗣️ Locale used for Maps cookies and Accept-Language headers when collecting reviews. Default is English.",
            "default": "en"
          },
          "personalData": {
            "title": "🪪 Include reviewer personal data",
            "type": "boolean",
            "description": "🔒 If disabled, reviewer name and profile link are blanked in every review row.",
            "default": true
          },
          "aiEnhancement": {
            "title": "🤖 AI review enrichment",
            "type": "boolean",
            "description": "🧠 Turn on to enrich each review's text with sentiment / themes / summary. Requires an API key below (or the provider's env var). Default is off.",
            "default": false
          },
          "aiModel": {
            "title": "🤖 AI model / provider",
            "enum": [
              "claude-haiku-4-5",
              "claude-sonnet-5",
              "claude-opus-4-8",
              "gpt-4o-mini",
              "gpt-4o",
              "gpt-4.1-mini",
              "gemini-2.0-flash-lite",
              "gemini-2.0-flash",
              "gemini-2.5-flash",
              "grok-3-mini",
              "deepseek-chat",
              "sonar",
              "mistral-small-latest"
            ],
            "type": "string",
            "description": "Provider auto-detected from the name: claude-*=Anthropic, gpt-*/o1/o3=OpenAI, gemini-*=Google, grok-*=xAI, deepseek-*=DeepSeek, sonar*=Perplexity, mistral-*=Mistral. Cheaper mini/flash/haiku models are recommended for classification.",
            "default": "claude-haiku-4-5"
          },
          "aiApiKey": {
            "title": "🔑 AI API key",
            "type": "string",
            "description": "Your provider API key. Used only when AI review enrichment is on. Falls back to the provider env var (ANTHROPIC_API_KEY / OPENAI_API_KEY / GEMINI_API_KEY / XAI_API_KEY / DEEPSEEK_API_KEY / PERPLEXITY_API_KEY / MISTRAL_API_KEY)."
          },
          "proxyConfiguration": {
            "title": "🌐 Connection & reliability",
            "type": "object",
            "description": "🎛️ Optional Apify Proxy for the place-discovery pass — leave off for simple runs; turn on for heavier jobs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}