{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Reviews & Photos Scraper",
    "description": "Two-mode Google Maps scraper. Pass search queries to discover candidate places, or Place IDs / CIDs / FIDs / short URLs / full URLs to extract reviews + Photos-tab images per place. Generic review fields: rating, date, owner response, translation, reviewer profile, helpful votes. Pay-per-event.",
    "version": "0.1",
    "x-build-id": "zKbPf7FXYcy9yRD7R"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/prodiger~google-maps-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-prodiger-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/prodiger~google-maps-scraper/runs": {
      "post": {
        "operationId": "runs-sync-prodiger-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/prodiger~google-maps-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-prodiger-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": {
          "searchStringsArray": {
            "title": "Search queries (shallow mode)",
            "type": "array",
            "description": "Free-form Google Maps search queries (e.g. 'Paradise Hyderabad'). Each query is resolved to up to `maxPlacesPerQuery` candidate places with stable Place IDs. Mutually exclusive with `placeIds`.",
            "items": {
              "type": "string"
            }
          },
          "placeIds": {
            "title": "Place identifiers (deep mode)",
            "type": "array",
            "description": "Place identifiers in any of: canonical Place ID (ChIJ...), CID (numeric), FID hex pair (0x...:0x...), short URL (goo.gl/maps/..., maps.app.goo.gl/...), full /maps/place/... URL. The actor normalizes each to a canonical Place ID before scraping. Mutually exclusive with `searchStringsArray`.",
            "items": {
              "type": "string"
            }
          },
          "maxReviews": {
            "title": "Max reviews per place (deep mode)",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Per-place cap on emitted review records. Counted post-filter (after `onlyWithPhotos`), so the cap matches what the caller sees.",
            "default": 50
          },
          "reviewsSort": {
            "title": "Reviews sort order",
            "enum": [
              "mostRelevant",
              "newest",
              "highestRating",
              "lowestRating"
            ],
            "type": "string",
            "description": "Sort order applied to the reviews tab before scraping.",
            "default": "mostRelevant"
          },
          "language": {
            "title": "UI language (hl)",
            "type": "string",
            "description": "Maps UI locale (sets the `hl` query parameter). Does NOT filter reviews by language — reviews from any language are returned. `detectedLanguage` and `originalLanguage` annotate each review's language.",
            "default": "en"
          },
          "onlyWithPhotos": {
            "title": "Only reviews with photos",
            "type": "boolean",
            "description": "When true, drop text-only reviews from the output. `maxReviews` then counts only photo-bearing reviews; the actor scrolls past more raw reviews to find them, bounded by `maxReviewsScanned`.",
            "default": false
          },
          "includePlacePhotos": {
            "title": "Include Photos-tab bundle",
            "type": "boolean",
            "description": "When true (deep mode), additionally emit one `recordType: 'place_photos'` record per place containing Photos-tab images (mixed owner-uploaded + visitor-uploaded).",
            "default": false
          },
          "maxPlacesPerQuery": {
            "title": "Max candidate places per query (shallow mode)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Cap on candidate places returned per search query. Use higher values when a query is expected to match many branches (e.g. chain restaurants).",
            "default": 5
          },
          "maxPlacePhotos": {
            "title": "Max Photos-tab images per place",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Per-place cap when `includePlacePhotos` is true. Maps lazy-renders the photo grid via scroll; this caps scroll iterations.",
            "default": 200
          },
          "maxReviewsScanned": {
            "title": "Max raw reviews scanned per place",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Upper bound on how many raw reviews the scroll loop visits before stopping, even if `maxReviews` (post-filter) hasn't been reached. 0 = auto (computed as `maxReviews × 10`).",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Max concurrent browser contexts",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Conservative default; Google rate-limits aggressively. Capped at 5 per the per-actor AGENTS.md guidance for browser-based crawlers.",
            "default": 2
          },
          "requestTimeoutSecs": {
            "title": "Per-page timeout (seconds)",
            "minimum": 10,
            "maximum": 120,
            "type": "integer",
            "description": "Wall-clock timeout for one page navigation + scroll/parse cycle.",
            "default": 45
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "RESIDENTIAL is mandatory; Google's anti-bot blocks datacenter IPs aggressively.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}