{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Geo-Grid Rank Tracker & Local SEO Heatmap",
    "description": "Track Google Maps local pack rankings across a 3×3, 5×5, or 7×7 geo-grid. Get interactive HTML heatmaps, Share of Local Voice (SoLV), ARP, ATRP, Place ID matching, and top competitor leaderboards — pay-per-grid-point Local Falcon alternative.",
    "version": "1.1",
    "x-build-id": "2B2Y5NqP0jGn3lTqG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scravion~google-maps-geogrid-rank-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scravion-google-maps-geogrid-rank-tracker",
        "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/scravion~google-maps-geogrid-rank-tracker/runs": {
      "post": {
        "operationId": "runs-sync-scravion-google-maps-geogrid-rank-tracker",
        "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/scravion~google-maps-geogrid-rank-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-scravion-google-maps-geogrid-rank-tracker",
        "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": {
          "searchQuery": {
            "title": "Primary Local Keyword",
            "type": "string",
            "description": "The Google Maps search term to track across the geographic grid (e.g., 'emergency dentist', 'coffee shop', 'personal injury lawyer')."
          },
          "keywords": {
            "title": "Additional Keywords (Optional, up to 10)",
            "maxItems": 10,
            "type": "array",
            "description": "Optional list of extra local keywords to scan across the exact same geo-grid in a single run.",
            "items": {
              "type": "string"
            }
          },
          "targetBusiness": {
            "title": "Target Business Name, Place ID, or Maps URL (Optional)",
            "type": "string",
            "description": "Business name (e.g., 'La Cabra'), Google Place ID ('ChIJ...'), or Google Maps place URL. Leave empty to run in Competitor Discovery Mode and see who dominates the area."
          },
          "targetPlaceId": {
            "title": "Target Google Place ID (Optional — Exact Branch Match)",
            "type": "string",
            "description": "Optional Google Place ID (starts with 'ChIJ') for 100% unambiguous multi-branch business matching."
          },
          "locationQuery": {
            "title": "City or Street Address (Optional Auto-Geocode)",
            "type": "string",
            "description": "Enter a city or street address (e.g., 'SoHo, New York' or 'Austin, TX') if you leave Center Latitude/Longitude blank."
          },
          "centerLatitude": {
            "title": "Center Latitude",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Decimal latitude of the grid center (e.g., 40.7128 for Lower Manhattan, 51.5074 for London, 41.0082 for Istanbul)."
          },
          "centerLongitude": {
            "title": "Center Longitude",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "Decimal longitude of the grid center (e.g., -74.0060 for Lower Manhattan, -0.1278 for London, 28.9784 for Istanbul)."
          },
          "gridSize": {
            "title": "Geo-Grid Matrix Size (3, 5, or 7)",
            "minimum": 3,
            "maximum": 7,
            "type": "integer",
            "description": "Enter 3 for a 3×3 grid (9 points — fast audit), 5 for a 5×5 grid (25 points — standard Local SEO), or 7 for a 7×7 grid (49 points — deep metro coverage).",
            "default": 3
          },
          "stepDistanceKm": {
            "title": "Distance Between Grid Points (km)",
            "minimum": 0.1,
            "type": "number",
            "description": "Spacing in kilometers between adjacent pins (e.g., 0.5 km for dense urban neighborhoods, 1.5 km for standard city audits, 3–5 km for suburbs).",
            "default": 1.5
          },
          "maxResultsPerPoint": {
            "title": "Max Listings to Inspect per Grid Point",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How deep into Google Maps results to check at each pin (1–50). Default 20 matches Local Falcon / BrightLocal standard top-20 tracking.",
            "default": 20
          },
          "matchMode": {
            "title": "Business Name Match Mode",
            "enum": [
              "smart",
              "exact"
            ],
            "type": "string",
            "description": "Smart matches Place ID, CID, exact name, or clean partial match (e.g., 'Blue Bottle Coffee' matches 'Blue Bottle Coffee - SoHo'). Exact requires exact normalized name or Place ID.",
            "default": "smart"
          },
          "mapZoom": {
            "title": "Google Maps Zoom Level",
            "enum": [
              "auto",
              "12",
              "13",
              "14",
              "15",
              "16",
              "17"
            ],
            "type": "string",
            "description": "Auto chooses optimal zoom based on stepDistanceKm (16z for <=0.5km, 15z for <=1.5km, 14z for <=4km) for sharp hyper-local variation.",
            "default": "auto"
          },
          "language": {
            "title": "Google Maps Language (hl)",
            "type": "string",
            "description": "Language code for Google Maps results (e.g., en, tr, de, es, fr, pt-BR).",
            "default": "en"
          },
          "includeHeatmap": {
            "title": "Generate Interactive HTML Heatmap (HEATMAP.html)",
            "type": "boolean",
            "description": "Saves a self-contained visual rank heatmap with SoLV %, ARP, ATRP, clickable pins, rank-change arrows, and competitor leaderboard to the Key-Value Store.",
            "default": true
          },
          "monitorMode": {
            "title": "Monitor Mode (Track Rank Changes vs. Previous Run)",
            "type": "boolean",
            "description": "Persists each grid scan in a named Key-Value Store and computes per-pin rankDelta (+3 / -2), SoLV delta, and ARP delta against your last scan. Ideal for weekly scheduled Local SEO monitoring.",
            "default": false
          },
          "monitorStateNamespace": {
            "title": "Monitor State Namespace (Optional)",
            "type": "string",
            "description": "Custom label to isolate monitor history per client or campaign (auto-generated from keyword + target + coordinates when left blank)."
          },
          "maxConcurrency": {
            "title": "Parallel Browser Contexts",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Number of grid points scanned concurrently (1–3). Keep at 1–2 for best stability without proxy.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration (Optional)",
            "type": "object",
            "description": "Optional Apify Proxy configuration for large 5×5 / 7×7 or high-volume scheduled Local SEO monitoring."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}