{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Scraper",
    "description": "This scraper deploys an automated spatial grid matrix to break past the standard 120-listing limit, capturing every hidden business. Delivers clean, non duplicate B2B leads instantly filtered by phone, website, and an intelligent 0–100 quality score.",
    "version": "0.0",
    "x-build-id": "3f4YJHzzabACYnc3Z"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/primelabs~google-maps-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-primelabs-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/primelabs~google-maps-scraper/runs": {
      "post": {
        "operationId": "runs-sync-primelabs-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/primelabs~google-maps-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-primelabs-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": [
          "target_city",
          "max_results",
          "max_search_requests",
          "scan_mode",
          "scan_depth",
          "output_format"
        ],
        "properties": {
          "target_city": {
            "title": "City Name",
            "type": "string",
            "description": "The target city to scrape listings from (e.g., London, Berlin, Toronto)."
          },
          "target_country": {
            "title": "Country Modifier (Optional)",
            "type": "string",
            "description": "Appended to the geocoder lookup to guarantee precise region matching."
          },
          "search_query": {
            "title": "Niche Keyword (Standard Mode)",
            "type": "string",
            "description": "The business type or keyword to target if executing a single run look-up."
          },
          "search_queries": {
            "title": "Niche Keywords Array (Multi-Keyword Mode)",
            "type": "array",
            "description": "Optional list of multiple keywords to run across the grid sequentially. Overrides standard mode if populated.",
            "items": {
              "type": "string"
            }
          },
          "max_results": {
            "title": "Global Maximum Results Cap",
            "minimum": 1,
            "type": "integer",
            "description": "The absolute total limit of unique data rows to save for the entire actor execution run."
          },
          "max_search_requests": {
            "title": "Maximum Search Requests Budget Cap",
            "minimum": 1,
            "type": "integer",
            "description": "Safety governor limit. Prevents execution explosion by throwing errors if required tasks cross this line.",
            "default": 50
          },
          "scan_mode": {
            "title": "Grid Spatial Scan Mode",
            "enum": [
              "city_center",
              "balanced",
              "full_coverage"
            ],
            "type": "string",
            "description": "City Center applies a true spherical radius envelope; Balanced/Full Coverage uses boundary-fitted box intervals.",
            "default": "balanced"
          },
          "scan_depth": {
            "title": "Grid Scan Depth Coverage",
            "enum": [
              "basic",
              "standard",
              "deep",
              "enterprise"
            ],
            "type": "string",
            "description": "Controls the layout density grid sizing parameters."
          },
          "required_fields": {
            "title": "Filter Validation: Required Contact Fields",
            "type": "array",
            "description": "Lead quality filter. Only save leads that contain these verified fields.",
            "items": {
              "type": "string",
              "enum": [
                "phone",
                "website"
              ],
              "enumTitles": [
                "Valid Phone Number Present",
                "Active Website URL Present"
              ]
            }
          },
          "output_format": {
            "title": "CRM / API Data Export Format Preset",
            "enum": [
              "full",
              "crm",
              "contact_only"
            ],
            "type": "string",
            "description": "Controls output field structures based exclusively on user selection visibility thresholds.",
            "default": "full"
          },
          "min_reviews": {
            "title": "Filter: Minimum Reviews Count",
            "minimum": 0,
            "type": "integer",
            "description": "Only extract profiles containing at least this many review ratings (set to 0 to skip filtering).",
            "default": 0
          },
          "include_lead_scoring": {
            "title": "Compute Commercial Value: Lead Quality Score",
            "type": "boolean",
            "description": "If enabled, appends a calculated lead_quality_score (0-100) to support prospecting ranking.",
            "default": true
          },
          "include_row_metadata": {
            "title": "Append Run Metadata Key on Each Lead Row",
            "type": "boolean",
            "description": "Turn off to save data storage space. (A global summary is always saved to Key-Value Store regardless of choice).",
            "default": false
          },
          "with_website": {
            "title": "Filter: Only Profiles With Active Website Links",
            "type": "boolean",
            "description": "Filter out any business listings that do not have a website URL attached.",
            "default": false
          },
          "without_website": {
            "title": "Filter: Only Profiles Missing Website Links",
            "type": "boolean",
            "description": "Filter out any business listings that already have an established website URL.",
            "default": false
          },
          "skip_permanently_closed": {
            "title": "Filter: Automatically Skip Permanently Closed Locations",
            "type": "boolean",
            "description": "Automatically drop and skip listings marked as 'Permanently Closed' or 'Temporarily Closed'.",
            "default": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}