{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Leads Qualifier",
    "description": "Qualify Google Maps leads against your ideal customer before paying for downstream enrichment.",
    "version": "0.0",
    "x-build-id": "yJ5wfA90bAwCpqVnH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/norvane~google-maps-leads-qualifier/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-norvane-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/norvane~google-maps-leads-qualifier/runs": {
      "post": {
        "operationId": "runs-sync-norvane-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/norvane~google-maps-leads-qualifier/run-sync": {
      "post": {
        "operationId": "run-sync-norvane-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": {
          "datasetId": {
            "title": "Google Maps dataset ID",
            "type": "string",
            "description": "Dataset ID from an upstream scraper. Do not enable paid upstream enrichment if your goal is to qualify before enriching."
          },
          "items": {
            "title": "Or paste leads",
            "maxItems": 1000,
            "type": "array",
            "description": "Inline source, up to 1,000 records and 4 MB. Use datasetId for larger sources. An explicitly empty array is an empty source, not a demo.",
            "items": {
              "type": "object"
            }
          },
          "icpDescription": {
            "title": "Ideal customer profile",
            "maxLength": 4000,
            "type": "string",
            "description": "Required for real sources. Describe observable business types, services, ownership, and exclusions. The demo uses its fixed sample ICP."
          },
          "excludeDescription": {
            "title": "Additional exclusions",
            "maxLength": 4000,
            "type": "string",
            "description": "Optional exclusions such as chains, hospital departments, or businesses offering only general dentistry."
          },
          "analyzeWebsite": {
            "title": "Analyze business websites",
            "type": "boolean",
            "description": "$0.003 per processed lead when usable homepage text is analyzed. Metadata-only decisions cost $0.001, including absent, blocked, dead, social-only, and closed-business cases.",
            "default": true
          },
          "minProbability": {
            "title": "Qualification threshold",
            "enum": [
              "0.3",
              "0.5",
              "0.7"
            ],
            "type": "string",
            "description": "Minimum probability required to qualify a lead (0.3 for high recall, 0.5 for balanced, 0.7 for high precision).",
            "default": "0.5"
          },
          "outputMode": {
            "title": "Default dataset output",
            "enum": [
              "all",
              "qualifiedOnly"
            ],
            "type": "string",
            "description": "Billing is per processed lead, not per qualified lead. In qualifiedOnly mode, SUMMARY contains the audit_dataset_id holding all paid decisions, including rejected leads.",
            "default": "all"
          },
          "maxItems": {
            "title": "Maximum source records",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Maximum input positions consumed. Invalid and duplicate records count toward the scan limit but are not charged.",
            "default": 10000
          },
          "downstreamCostPerLead": {
            "title": "Downstream cost per lead, USD",
            "type": "string",
            "description": "Optional decimal such as 0.036. SUMMARY estimates avoided downstream spend. This does not estimate the opportunity cost of false negatives."
          },
          "fieldMapping": {
            "title": "Field mapping",
            "type": "object",
            "description": "Map supported logical keys to top-level source fields. Supported keys: nameField, websiteField, categoryField, descriptionField, placeIdField, addressField, phoneField, cityField, languageField, closedField, temporarilyClosedField."
          },
          "payload": {
            "title": "Upstream integration payload",
            "type": "object",
            "description": "Supports payload.resource.defaultDatasetId, or payload.resource.id containing the upstream run ID."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}