{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Lead Priority Scorer",
    "description": "Scores Google Maps places (from any Google Maps scraper's output) into a single 0-100 lead-priority score by combining missing website, unclaimed profile, GBP completeness, and relative review count. Zero-fetch, zero-LLM.",
    "version": "0.2",
    "x-build-id": "L4PbNm1DdI8ohbNXn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/reverenced_garnet~apify-gmaps-lead-priority/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-reverenced_garnet-apify-gmaps-lead-priority",
        "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/reverenced_garnet~apify-gmaps-lead-priority/runs": {
      "post": {
        "operationId": "runs-sync-reverenced_garnet-apify-gmaps-lead-priority",
        "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/reverenced_garnet~apify-gmaps-lead-priority/run-sync": {
      "post": {
        "operationId": "run-sync-reverenced_garnet-apify-gmaps-lead-priority",
        "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": {
          "searchTerms": {
            "title": "Business types to search for",
            "type": "array",
            "description": "What kind of business, one per line (e.g. \"dentist\", \"plumber\"). This Actor calls Google Maps Scraper (compass/crawler-google-places) for you and scores the results — no separate scraper run needed.",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "One city/area per run (e.g. \"Austin, Texas\" or \"Leeds, UK\")."
          },
          "maxPlacesPerSearch": {
            "title": "Max places per search term",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many places to fetch per search term. Google Maps Scraper charges your (the buyer's) own Apify account for this fetch — about $4 per 1,000 places on the free plan, less on paid tiers.",
            "default": 100
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "ja",
              "de",
              "fr",
              "es",
              "pt-BR",
              "it",
              "nl"
            ],
            "type": "string",
            "description": "Language for the Google Maps results.",
            "default": "en"
          },
          "leadFilter": {
            "title": "Lead filter",
            "enum": [
              "all",
              "noWebsiteOrUnclaimed",
              "noWebsiteAndUnclaimed",
              "noWebsite",
              "unclaimed"
            ],
            "type": "string",
            "description": "Only keep leads matching this condition. Filtered-out places are not scored or charged for.",
            "default": "all"
          },
          "minTier": {
            "title": "Minimum priority tier to output",
            "enum": [
              "Hot",
              "Warm",
              "Cold"
            ],
            "type": "string",
            "description": "Only output leads at or above this priority tier. Hot = highest opportunity, Cold = lowest. Set to Cold to get every place scored.",
            "default": "Cold"
          },
          "checkOpeningHours": {
            "title": "Check opening hours",
            "type": "boolean",
            "description": "Also fetch each place's opening hours (adds +$0.002/place on the free plan, less on paid tiers).",
            "default": false
          },
          "places": {
            "title": "Google Maps places (advanced: skip the built-in fetch)",
            "type": "array",
            "description": "Paste the dataset output (array of place objects) from a Google Maps scraper Actor here — e.g. Compass's \"Google Maps Scraper\". You can also chain this Actor directly after one using an Apify integration. If given, this Actor scores these places instead of fetching new ones via 'searchTerms'/'location'."
          },
          "slackWebhookUrl": {
            "title": "Slack webhook URL (optional)",
            "type": "string",
            "description": "Post a summary of scored leads to a Slack channel via an Incoming Webhook URL."
          },
          "discordWebhookUrl": {
            "title": "Discord webhook URL (optional)",
            "type": "string",
            "description": "Post a summary of scored leads to a Discord channel via a Channel Webhook URL."
          },
          "webhookUrl": {
            "title": "Generic webhook URL (optional)",
            "type": "string",
            "description": "POST a structured JSON summary (all scored leads with score/tier) to any URL of your choice — e.g. n8n, Make, or your own endpoint."
          },
          "notifyOnlyNewOrUpdated": {
            "title": "Notify only new/updated leads",
            "type": "boolean",
            "description": "If ON (default), notifications only include leads whose changeStatus is NEW or UPDATED vs. your last run on this Actor. If OFF, every scored lead in the output is included in the notification.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}