{
  "openapi": "3.0.1",
  "info": {
    "title": "MapSweep - Google Maps Grid Scraper & Lead Monitor",
    "description": "Full-coverage Google Maps scraper: grid search past the 12000-result cap, change tracking, contact enrichment, lead scoring and review analytics.",
    "version": "0.0",
    "x-build-id": "DPJ2c1RB9nH2geYu8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/safwan_26daud~mapsweep-google-maps-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-safwan_26daud-mapsweep-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/safwan_26daud~mapsweep-google-maps-scraper/runs": {
      "post": {
        "operationId": "runs-sync-safwan_26daud-mapsweep-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/safwan_26daud~mapsweep-google-maps-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-safwan_26daud-mapsweep-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": [
          "searchStrings"
        ],
        "properties": {
          "searchStrings": {
            "title": "Search terms",
            "type": "array",
            "description": "Business types or keywords to search for, e.g. dentist, coffee shop.",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "City, region or country, e.g. Johor Bahru, Malaysia. Ignored if a custom area is given."
          },
          "polygon": {
            "title": "Custom area (GeoJSON)",
            "type": "object",
            "description": "Optional GeoJSON Polygon or MultiPolygon. Overrides Location."
          },
          "countryCode": {
            "title": "Country code",
            "type": "string",
            "description": "Two-letter ISO country code used for the Google domain and results, e.g. my.",
            "default": ""
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Result language code, e.g. en, ms.",
            "default": "en"
          },
          "enableGridSplit": {
            "title": "Split area into a grid",
            "type": "boolean",
            "description": "Search the area cell by cell and split any cell that hits Google's result cap, so the list is complete.",
            "default": true
          },
          "startCellKm": {
            "title": "Starting cell size (km)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Side length of the first grid cells.",
            "default": 5
          },
          "minCellKm": {
            "title": "Smallest cell size (km)",
            "minimum": 0.1,
            "maximum": 10,
            "type": "number",
            "description": "Cells are not split below this size.",
            "default": 0.5
          },
          "saturationThreshold": {
            "title": "Split when a cell returns at least this many places",
            "minimum": 20,
            "maximum": 120,
            "type": "integer",
            "description": "Google shows about 120 results per search, so a cell near that number is probably incomplete.",
            "default": 100
          },
          "maxPlaces": {
            "title": "Maximum places",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many places in total, across all search terms.",
            "default": 1000
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Skip places rated below this value. 0 keeps all.",
            "default": 0
          },
          "minReviews": {
            "title": "Minimum review count",
            "minimum": 0,
            "type": "integer",
            "description": "Skip places with fewer reviews than this.",
            "default": 0
          },
          "websiteFilter": {
            "title": "Website filter",
            "enum": [
              "any",
              "withWebsite",
              "withoutWebsite"
            ],
            "type": "string",
            "description": "Keep all places, only those with a website, or only those without one (useful for web agencies).",
            "default": "any"
          },
          "categories": {
            "title": "Category filter",
            "type": "array",
            "description": "Keep only places whose category matches one of these names. Empty keeps all.",
            "items": {
              "type": "string"
            }
          },
          "skipClosed": {
            "title": "Skip closed places",
            "type": "boolean",
            "description": "Skip places marked permanently or temporarily closed.",
            "default": true
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "all",
              "newOrChangedOnly"
            ],
            "type": "string",
            "description": "Return every place, or only places that are new or changed since the last run with the same tracking name.",
            "default": "all"
          },
          "trackingStoreName": {
            "title": "Tracking name",
            "type": "string",
            "description": "Name of the store that remembers previous results. Use the same name on every scheduled run. Required for New or changed only."
          },
          "enrichContacts": {
            "title": "Enrich contacts from website",
            "type": "boolean",
            "description": "Crawl each place's website for emails, phone numbers and social links.",
            "default": false
          },
          "verifyEmails": {
            "title": "Verify emails",
            "type": "boolean",
            "description": "Check syntax and mail server records and add a confidence value to each email.",
            "default": false
          },
          "maxPagesPerWebsite": {
            "title": "Max pages per website",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Limit on pages crawled per website when enriching.",
            "default": 5
          },
          "scrapeReviews": {
            "title": "Scrape reviews",
            "type": "boolean",
            "description": "Add reviews to each place.",
            "default": false
          },
          "maxReviewsPerPlace": {
            "title": "Max reviews per place",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Limit on reviews collected per place.",
            "default": 20
          },
          "reviewsSort": {
            "title": "Reviews sort order",
            "enum": [
              "newest",
              "relevant",
              "highest",
              "lowest"
            ],
            "type": "string",
            "description": "Order in which reviews are collected when review scraping is on.",
            "default": "newest"
          },
          "analyzeReviews": {
            "title": "Analyze reviews",
            "type": "boolean",
            "description": "Add review velocity, owner reply rate, topic sentiment and a short summary per place.",
            "default": false
          },
          "leadScoring": {
            "title": "Add lead score",
            "type": "boolean",
            "description": "Score each place from 0 to 100 using rating, review growth, missing website and contact availability.",
            "default": false
          },
          "maxSpendUsd": {
            "title": "Spend cap (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Stop the run when charges reach this amount. 0 means no cap.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Residential proxies are recommended for large runs.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}