{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Category Scraper ⚡ Advanced Data, Best Value",
    "description": "Scrape every Google Maps business in one category across any list of cities or zip codes. Keeps only listings whose Google category matches yours: name, phone, website, rating, reviews, address, coordinates, place ID.",
    "version": "1.0",
    "x-build-id": "XZU07dBEj9afOckIQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/claygenius~google-maps-category-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-claygenius-google-maps-category-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/claygenius~google-maps-category-scraper/runs": {
      "post": {
        "operationId": "runs-sync-claygenius-google-maps-category-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/claygenius~google-maps-category-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-claygenius-google-maps-category-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": [
          "category",
          "locations"
        ],
        "properties": {
          "category": {
            "title": "Google Maps category",
            "type": "string",
            "description": "The business category exactly as Google Maps shows it under a business name, e.g. Fence contractor, Dentist, Plumber, Roofing contractor, Italian restaurant. Open any matching business on Google Maps to see the exact wording."
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Cities, neighborhoods, zip codes or regions, one per line, e.g. Austin, TX or 78701 or Manchester, UK. One search returns a few hundred businesses at most, so for full coverage of a big city list its zip codes or neighborhoods. Businesses found in more than one location are kept once.",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Search terms (optional)",
            "type": "array",
            "description": "What to type into Google Maps for each location, e.g. windows and doors, or window installation. Leave empty to search the category itself. Every term is searched in every location, so 3 terms x 100 zip codes = 300 searches. The category filter below decides what is kept.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "matchMode": {
            "title": "Category matching",
            "enum": [
              "exact",
              "contains"
            ],
            "type": "string",
            "description": "Exact: the business's Google category must equal yours (Dentist keeps only Dentist). Contains: the category must contain your text (Dentist also keeps Cosmetic dentist and Pediatric dentist). Not case-sensitive either way.",
            "default": "exact"
          },
          "extraCategories": {
            "title": "Also accept these categories (optional)",
            "type": "array",
            "description": "Extra Google categories to keep alongside the main one, e.g. Fence supply store, or Deck builder.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "checkMainCategory": {
            "title": "Check each business's real main category",
            "type": "boolean",
            "description": "Off: businesses that list your category are kept, with isMainCategory true when it is their only category and null when they have several. On: one extra request per multi-category match finds their real main category (Google moves the searched category to the front, so the list order can't be trusted). Always on when 'Main category only' is on.",
            "default": false
          },
          "mainCategoryOnly": {
            "title": "Main category only",
            "type": "boolean",
            "description": "Off (default): every business that lists your category is saved, whether it is the business's main category or one of its extras. isMainCategory tells you which (true = main, false = extra, e.g. a roofer that also does fences). On: only businesses whose main category is yours are saved.",
            "default": false
          },
          "includeOtherCategories": {
            "title": "Also save businesses from other categories",
            "type": "boolean",
            "description": "Off: only matching businesses are saved. On: everything Google returned is saved, and matchesCategory (true/false) tells you which ones matched. Handy for finding category names to add above.",
            "default": false
          },
          "minReviews": {
            "title": "Minimum number of reviews",
            "minimum": 0,
            "type": "integer",
            "description": "Only save businesses with at least this many Google reviews, e.g. 100 to keep only established businesses. Businesses with no reviews count as 0. Businesses whose count Google hid are kept and marked reviewsCountKnown: false, so you can check them yourself (or switch on Find hidden review counts). 0 = no review filter.",
            "default": 0
          },
          "fetchReviewCounts": {
            "title": "Find hidden review counts on Google Search (slow, rarely needed)",
            "type": "boolean",
            "description": "The fast engine already retries on fresh IPs until review counts are visible, so this is rarely needed. When a count is still hidden, this looks it up on Google Search: 20 to 90 seconds per request, billed by Apify as a Google search proxy request. Off: those businesses are kept with reviewsCount null and reviewsCountKnown false.",
            "default": false
          },
          "maxItemsPerLocation": {
            "title": "Max listings per location",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many listings per location, before the category filter. 0 = all (pages until Google has no more results). 20 = only the first page, fastest. The fast engine reads 20 per request.",
            "default": 0
          },
          "language": {
            "title": "Google language",
            "type": "string",
            "description": "Language code Google Maps uses for categories and opening hours, e.g. en, de, fr, es. Write your category in this language.",
            "default": "en"
          },
          "engine": {
            "title": "Engine",
            "enum": [
              "fast",
              "browser"
            ],
            "type": "string",
            "description": "Fast (recommended): reads Google Maps' own results data directly, no browser. About 1-2 seconds per page of 20 businesses, full address with city and zip, all categories, and it retries on a fresh IP until review counts are visible. Browser: opens Google Maps in Chrome like a person, much slower and more expensive. Locations the fast engine can not read are retried with the browser automatically.",
            "default": "fast"
          },
          "fastConcurrency": {
            "title": "Fast engine: searches at the same time",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many searches the fast engine runs in parallel. 150 with the default 16 GB of memory was fastest in tests with Apify's datacenter proxy (about 1.7x faster than 50). Going higher made runs slower, because Google starts slowing down the proxy IPs. More proxy IPs allow more.",
            "default": 150
          },
          "skipKnownPages": {
            "title": "Fast engine: stop a search when a page brings nothing new",
            "type": "boolean",
            "description": "Neighbouring zip codes return mostly the same businesses. On: a search stops reading further pages as soon as a page contains only businesses already found by another search in this run. Much faster on dense zip lists; may miss a few businesses ranked low in one zip.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Locations at the same time",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Browser engine only: how many locations are opened in Chrome at the same time. Each needs about 2/3 of a CPU core and Apify gives 1 core per 4 GB of memory. The fast engine always runs 25 locations at once and needs little memory.",
            "default": 6
          },
          "proxyConfig": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify datacenter proxy works for Google Maps. Switch to Residential if you see blocked or failed locations.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}