{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Reviews Scraper - Places & AI Sentiment",
    "description": "Scrape Google Maps reviews at $0.0003/review - 33% cheaper than alternatives. 3 modes: keyword search, direct URL, place details. AI sentiment + topic analysis via 5 LLM providers. Residential proxy included. n8n-ready.",
    "version": "0.1",
    "x-build-id": "HTvIcaSDl1xeOVUao"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/harvestlab~google-maps-reviews-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-harvestlab-google-maps-reviews-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/harvestlab~google-maps-reviews-scraper/runs": {
      "post": {
        "operationId": "runs-sync-harvestlab-google-maps-reviews-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/harvestlab~google-maps-reviews-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-harvestlab-google-maps-reviews-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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "reviews"
            ],
            "type": "string",
            "description": "search — find places by keyword then extract reviews. reviews — scrape reviews from provided place URL(s) directly.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Keyword + location to search Google Maps. E.g. 'pizza restaurants Amsterdam' or 'hotels Barcelona center'."
          },
          "q": {
            "title": "Search query (alias)",
            "type": "string",
            "description": "Alias for searchQuery — short form for CLI use."
          },
          "startUrls": {
            "title": "Place URLs",
            "type": "array",
            "description": "Google Maps place URLs to scrape reviews from. Used in reviews mode. E.g. https://www.google.com/maps/place/...",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL",
                  "description": "Google Maps place URL"
                }
              }
            }
          },
          "maxPlaces": {
            "title": "Max places",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of places to scrape in search mode (default: 10, max: 50).",
            "default": 10
          },
          "maxResults": {
            "title": "Max results (alias)",
            "minimum": 1,
            "type": "integer",
            "description": "Alias for maxPlaces — short form for CLI use."
          },
          "maxReviewsPerPlace": {
            "title": "Max reviews per place",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum reviews to scrape per place (default: 50, max: 500).",
            "default": 50
          },
          "sortReviewsBy": {
            "title": "Sort reviews by",
            "enum": [
              "newest",
              "relevant",
              "highest_rating",
              "lowest_rating"
            ],
            "type": "string",
            "description": "Order of reviews to scrape.",
            "default": "newest"
          },
          "language": {
            "title": "Review language",
            "type": "string",
            "description": "Language code for reviews (default: en). Google will return reviews in this language where available.",
            "default": "en"
          },
          "enableAiAnalysis": {
            "title": "Enable AI sentiment analysis",
            "type": "boolean",
            "description": "Run AI sentiment scoring and topic extraction on reviews. Requires an LLM API key. Charged as ai-analysis-completed ($0.005) per place analysed.",
            "default": false
          },
          "llmProvider": {
            "title": "LLM provider",
            "enum": [
              "openrouter",
              "anthropic",
              "google",
              "openai",
              "ollama"
            ],
            "type": "string",
            "description": "AI provider for sentiment analysis.",
            "default": "openrouter"
          },
          "llmModel": {
            "title": "LLM model override",
            "type": "string",
            "description": "Override the default model for your chosen provider. Leave empty to use the recommended default."
          },
          "openrouterApiKey": {
            "title": "OpenRouter API key",
            "type": "string",
            "description": "OpenRouter API key. Get one at https://openrouter.ai/keys — or set OPENROUTER_API_KEY env var."
          },
          "anthropicApiKey": {
            "title": "Anthropic API key",
            "type": "string",
            "description": "Anthropic API key. Get one at https://console.anthropic.com/settings/keys — or set ANTHROPIC_API_KEY env var."
          },
          "googleApiKey": {
            "title": "Google AI API key",
            "type": "string",
            "description": "Google AI Studio API key. Get one at https://aistudio.google.com/app/apikey — or set GOOGLE_API_KEY env var."
          },
          "openaiApiKey": {
            "title": "OpenAI API key",
            "type": "string",
            "description": "OpenAI API key. Get one at https://platform.openai.com/api-keys — or set OPENAI_API_KEY env var."
          },
          "ollamaBaseUrl": {
            "title": "Ollama base URL",
            "type": "string",
            "description": "Ollama server URL. Default: http://localhost:11434. Install Ollama at https://ollama.com/download."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxies strongly recommended — Google Maps blocks datacenter IPs aggressively."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}