{
  "openapi": "3.0.1",
  "info": {
    "title": "Ultimate Google Places Scraper",
    "description": "Extract business data from Google Maps including reviews, ratings, contact details, opening hours, and images. Get structured data from restaurants, hotels, shops, and any business listed on Google Maps.",
    "version": "1.0",
    "x-build-id": "K4GwR0M08FziIubzG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/happitap~ultimate-google-places-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-happitap-ultimate-google-places-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/happitap~ultimate-google-places-scraper/runs": {
      "post": {
        "operationId": "runs-sync-happitap-ultimate-google-places-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/happitap~ultimate-google-places-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-happitap-ultimate-google-places-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 Terms",
            "type": "array",
            "description": "Array of search terms (e.g., 'restaurant', 'dentist', 'hotel'). Required for search-based scraping.",
            "items": {
              "type": "string"
            },
            "default": [
              "restaurant"
            ]
          },
          "locationQuery": {
            "title": "Location Query",
            "type": "string",
            "description": "Free-text location (e.g., 'New York, NY', 'London, UK'). Used with search terms.",
            "default": "San Francisco, CA"
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Country name for structured location search."
          },
          "state": {
            "title": "State",
            "type": "string",
            "description": "State/province name for structured location search."
          },
          "county": {
            "title": "County",
            "type": "string",
            "description": "County name for structured location search."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City name for structured location search."
          },
          "postalCode": {
            "title": "Postal Code",
            "type": "string",
            "description": "Postal/ZIP code for structured location search."
          },
          "lat": {
            "title": "Latitude",
            "type": "number",
            "description": "Latitude for point-based search (requires lng and optional radiusKm)."
          },
          "lng": {
            "title": "Longitude",
            "type": "number",
            "description": "Longitude for point-based search (requires lat and optional radiusKm)."
          },
          "radiusKm": {
            "title": "Radius (km)",
            "type": "number",
            "description": "Search radius in kilometers for point-based search. Default: 5km.",
            "default": 5
          },
          "geoJson": {
            "title": "GeoJSON Polygon",
            "type": "object",
            "description": "GeoJSON search area polygon"
          },
          "directUrlsOrPlaceIds": {
            "title": "Direct URLs or Place IDs",
            "type": "array",
            "description": "Array of direct Google Maps URLs or Place IDs to scrape (bypasses search).",
            "items": {
              "type": "string"
            }
          },
          "maxCrawledPlacesPerSearch": {
            "title": "Max Places Per Search",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of places to extract per search term.",
            "default": 20
          },
          "maxReviews": {
            "title": "Max Reviews Per Place",
            "type": "integer",
            "description": "Maximum number of reviews to scrape per place. 0 = none.",
            "default": 10
          },
          "reviewsSort": {
            "title": "Reviews Sort Order",
            "enum": [
              "newest",
              "most_relevant",
              "highest_rating",
              "lowest_rating"
            ],
            "type": "string",
            "description": "Sort order for reviews.",
            "default": "newest"
          },
          "placeMinimumStars": {
            "title": "Minimum Star Rating",
            "enum": [
              "",
              "one",
              "two",
              "three",
              "four",
              "five"
            ],
            "type": "string",
            "description": "Filter places by minimum star rating."
          },
          "skipClosedPlaces": {
            "title": "Skip Closed Places",
            "type": "boolean",
            "description": "Skip permanently closed places.",
            "default": false
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language code for Google Maps interface (e.g., 'en', 'es', 'fr').",
            "default": "en"
          },
          "categoryFilterWords": {
            "title": "Category Filter Words",
            "type": "array",
            "description": "Filter places by category keywords (e.g., ['restaurant', 'cafe']). Only places matching these will be scraped.",
            "items": {
              "type": "string"
            }
          },
          "scrapePlaceDetailPage": {
            "title": "Scrape Place Details",
            "type": "boolean",
            "description": "Enable deep scraping of place detail pages (required for full data).",
            "default": true
          },
          "includeReviews": {
            "title": "Include Reviews",
            "type": "boolean",
            "description": "Scrape reviews for each place.",
            "default": true
          },
          "includeImages": {
            "title": "Include Images",
            "type": "boolean",
            "description": "Scrape images for each place.",
            "default": true
          },
          "maxImages": {
            "title": "Max Images Per Place",
            "type": "integer",
            "description": "Maximum number of images to scrape per place.",
            "default": 10
          },
          "scrapeContacts": {
            "title": "Scrape Contact Details",
            "type": "boolean",
            "description": "Attempt to enrich contact details via website scraping (experimental).",
            "default": false
          },
          "debugMode": {
            "title": "Debug Mode",
            "type": "boolean",
            "description": "Enable debug mode (saves HTML + screenshots for first 10 search + 20 detail pages).",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum concurrent requests. Lower values reduce blocking risk.",
            "default": 6
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Apify Proxy configuration."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}