{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Leads Qualifier",
    "description": "Turn map searches into ranked sales leads: OpenStreetMap built in (or Google Maps), business emails and socials from websites, industry-specific scoring with reasons, pitch lines, deduped CRM-ready CSV.",
    "version": "1.0",
    "x-build-id": "cAi8gNwSzLku16drc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/codepal~google-maps-leads-qualifier/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-codepal-google-maps-leads-qualifier",
        "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/codepal~google-maps-leads-qualifier/runs": {
      "post": {
        "operationId": "runs-sync-codepal-google-maps-leads-qualifier",
        "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/codepal~google-maps-leads-qualifier/run-sync": {
      "post": {
        "operationId": "run-sync-codepal-google-maps-leads-qualifier",
        "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": {
          "source": {
            "title": "Where places come from",
            "enum": [
              "openstreetmap",
              "google-maps",
              "dataset",
              "list"
            ],
            "type": "string",
            "description": "OpenStreetMap is built in: no extra Actor, no per-place fee, great for businesses with websites; coverage is thinner than Google for small shops. Google Maps runs Apify's Google Maps Scraper (compass/crawler-google-places, a third-party Actor) for the fullest coverage; its per-place price (~$0.003–0.004) is billed to you separately. Or reuse an existing dataset, or paste your own list.",
            "default": "openstreetmap"
          },
          "searchStringsArray": {
            "title": "Search terms",
            "type": "array",
            "description": "What you would type in a map search, e.g. \"dentist\", \"law firm\". Used by the OpenStreetMap and Google Maps sources.",
            "items": {
              "type": "string"
            }
          },
          "locationQuery": {
            "title": "Location",
            "type": "string",
            "description": "City and country, e.g. \"Nairobi, Kenya\"."
          },
          "maxPlacesPerSearch": {
            "title": "Max places per search term",
            "minimum": 1,
            "type": "integer",
            "description": "Places per search term. For Google Maps, each place costs the Google Maps Scraper's per-place price.",
            "default": 50
          },
          "radiusKm": {
            "title": "Radius (km, OpenStreetMap)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Search within this radius of the location's centre instead of its whole boundary. 0 = whole city/area.",
            "default": 0
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Google Maps result language (e.g. en, fr, sw). Google Maps source only.",
            "default": "en"
          },
          "countryCode": {
            "title": "Country code",
            "type": "string",
            "description": "Optional two-letter country code for the Google Maps source, e.g. ke.",
            "default": ""
          },
          "datasetId": {
            "title": "Dataset",
            "type": "string",
            "description": "Dataset of a Google Maps Scraper run (any Actor output with title/website/phone fields works)."
          },
          "places": {
            "title": "Places list",
            "type": "array",
            "description": "JSON list, e.g. [{\"name\":\"Acme Ltd\",\"website\":\"acme.co.ke\",\"phone\":\"0722…\",\"category\":\"Hardware store\"}].",
            "default": []
          },
          "industry": {
            "title": "Industry profile",
            "enum": [
              "auto",
              "dental",
              "medical",
              "restaurant",
              "hotel",
              "realEstate",
              "legal",
              "beauty",
              "fitness",
              "education",
              "automotive",
              "construction",
              "retail",
              "professional",
              "generic"
            ],
            "type": "string",
            "description": "Which qualification rules to apply. Auto picks a profile per business from its Google category.",
            "default": "auto"
          },
          "offers": {
            "title": "What you sell",
            "type": "array",
            "description": "Leads are scored higher when their website/profile shows a gap you can fix, and each lead gets a ready pitch line.",
            "items": {
              "type": "string",
              "enum": [
                "website-design",
                "seo",
                "online-booking",
                "online-ordering",
                "ecommerce",
                "reputation",
                "social-media",
                "chat-whatsapp",
                "advertising"
              ],
              "enumTitles": [
                "Website design / redesign",
                "SEO / content",
                "Online booking software",
                "Online ordering / delivery",
                "E-commerce store",
                "Reviews / reputation management",
                "Social media marketing",
                "Live chat / WhatsApp automation",
                "Paid ads / tracking"
              ]
            },
            "default": []
          },
          "minLeadScore": {
            "title": "Minimum lead score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "0–100. Leads below are not saved (and not charged).",
            "default": 0
          },
          "tiers": {
            "title": "Only these tiers",
            "type": "array",
            "description": "A ≥ 70, B ≥ 50, C ≥ 30, D below. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "A",
                "B",
                "C",
                "D"
              ]
            },
            "default": []
          },
          "scrapeWebsites": {
            "title": "Visit business websites",
            "type": "boolean",
            "description": "Find emails, extra phones, social profiles, contact forms and qualification signals (booking, ordering, HTTPS, mobile-friendly, site age).",
            "default": true
          },
          "maxPagesPerSite": {
            "title": "Max pages per website",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Home page plus contact/about/services pages.",
            "default": 3
          },
          "emailPolicy": {
            "title": "Emails to keep",
            "enum": [
              "role-only",
              "all",
              "none"
            ],
            "type": "string",
            "description": "Role mailboxes (info@, bookings@) are business contact points. Addresses that look like a named person are personal data; only keep them if you have a lawful basis (e.g. GDPR legitimate interest, Kenya Data Protection Act).",
            "default": "role-only"
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Skip website pages the site owner disallows.",
            "default": true
          },
          "skipClosedPlaces": {
            "title": "Skip closed businesses",
            "type": "boolean",
            "description": "Drop permanently or temporarily closed places.",
            "default": true
          },
          "onlyWithWebsite": {
            "title": "Only businesses with a website",
            "type": "boolean",
            "description": "Turn off if you sell websites: businesses without one are your best prospects.",
            "default": false
          },
          "requirePhone": {
            "title": "Require phone",
            "type": "boolean",
            "description": "Only keep businesses with a phone number.",
            "default": false
          },
          "requireEmail": {
            "title": "Require email",
            "type": "boolean",
            "description": "Only keep businesses where an email was found.",
            "default": false
          },
          "minRating": {
            "title": "Minimum Google rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "0 = no limit.",
            "default": 0
          },
          "minReviews": {
            "title": "Minimum review count",
            "minimum": 0,
            "type": "integer",
            "description": "0 = no limit.",
            "default": 0
          },
          "maxLeads": {
            "title": "Max leads",
            "minimum": 0,
            "type": "integer",
            "description": "Save at most this many leads (best first). 0 = no limit.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy for websites",
            "type": "object",
            "description": "Business websites rarely need a proxy.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}