{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Lead Quality & Duplicate Audit",
    "description": "Turn supplied Google Maps place and business-leads datasets into CRM-readiness, email-evidence, closed-business, and duplicate reports. Support current Compass enrichment fields; preserve only transparent source signals and never scrape, verify mailboxes, merge records, or invent a universal score.",
    "version": "0.2",
    "x-build-id": "yvWGfHHncFzZF0Cwt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/8tp~google-maps-lead-quality-audit/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-8tp-google-maps-lead-quality-audit",
        "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/8tp~google-maps-lead-quality-audit/runs": {
      "post": {
        "operationId": "runs-sync-8tp-google-maps-lead-quality-audit",
        "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/8tp~google-maps-lead-quality-audit/run-sync": {
      "post": {
        "operationId": "run-sync-8tp-google-maps-lead-quality-audit",
        "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_dataset_id": {
            "title": "Source Google Maps dataset",
            "type": "string",
            "description": "Optional Apify dataset containing Google Maps business rows. Selecting it grants this limited-permission Actor read access only to that dataset and takes precedence over inline rows."
          },
          "leads": {
            "title": "Business lead rows",
            "minItems": 1,
            "maxItems": 10000,
            "type": "array",
            "description": "Inline rows for a quick audit. Common Compass place and business-leads enrichment, Lukaskrivka, Santamaria, ScrapAPI, and flat lead-export fields are recognized automatically.",
            "items": {
              "type": "object",
              "additionalProperties": true
            },
            "default": [
              {
                "placeId": "sample-a",
                "title": "North Plumbing",
                "address": "10 Main St, Chicago, IL 60601",
                "countryCode": "US",
                "website": "https://north-plumbing.example",
                "phone": "+1 312 555 0100",
                "emails": [
                  "hello@north-plumbing.example"
                ],
                "categoryName": "Plumber",
                "totalScore": 4.7,
                "reviewsCount": 82
              },
              {
                "place_id": "sample-b",
                "name": "Lake Electric",
                "complete_address": "20 Lake St, Chicago, IL 60601",
                "country_code": "US",
                "website": "https://lake-electric.example",
                "phone": "+1 312 555 0200",
                "emails_from_website": [
                  "not-an-email"
                ],
                "rating": 4.5,
                "review_count": 39
              },
              {
                "place_id": "sample-c",
                "name": "Lake Electric",
                "address": "20 Lake Street, Chicago, IL 60601",
                "country": "United States",
                "website": "https://lake-electric.example/",
                "phone": "312-555-0200",
                "rating": 4.5,
                "review_count": 39
              },
              {
                "cid": "sample-d",
                "title": "Closed Roofing",
                "address": "30 Roof Ave, Chicago, IL 60602",
                "countryCode": "US",
                "website": "https://closed-roofing.example",
                "phone": "+1 312 555 0300",
                "permanentlyClosed": true
              }
            ]
          },
          "source_contract": {
            "title": "Source field contract",
            "enum": [
              "auto",
              "compass_google_maps_extractor",
              "compass_crawler_google_places",
              "compass_business_leads_enrichment",
              "lukaskrivka_contact_details",
              "santamaria_google_maps_scraper",
              "slothtech_lead_extractor",
              "scrapapi_google_maps_scraper",
              "custom"
            ],
            "type": "string",
            "description": "Choose a reviewed source family for run metadata, or auto for alias detection. This selection does not authenticate provenance or trust upstream duplicate flags.",
            "default": "auto"
          },
          "field_map": {
            "title": "Custom field mapping",
            "type": "object",
            "description": "Optional semantic-to-source dotted paths. Use with custom or to override individual auto aliases. Array or string values are accepted for contact/category fields.",
            "properties": {
              "stable_id": {
                "type": "string",
                "title": "Stable place ID field",
                "description": "Dotted path to a place ID, CID, data ID, or another stable business identifier."
              },
              "name": {
                "type": "string",
                "title": "Business name field",
                "description": "Dotted path to the public business name."
              },
              "address": {
                "type": "string",
                "title": "Full address field",
                "description": "Dotted path to a complete public business address."
              },
              "city": {
                "type": "string",
                "title": "City field",
                "description": "Dotted path to the business city or locality."
              },
              "state": {
                "type": "string",
                "title": "State/region field",
                "description": "Dotted path to the business state, province, or region."
              },
              "postal_code": {
                "type": "string",
                "title": "Postal-code field",
                "description": "Dotted path to the business postal code."
              },
              "country": {
                "type": "string",
                "title": "Country field",
                "description": "Dotted path to the business country name or code. Explicit United States or Canada evidence enables conservative calling-code-1 phone normalization."
              },
              "latitude": {
                "type": "string",
                "title": "Latitude field",
                "description": "Dotted path to numeric latitude."
              },
              "longitude": {
                "type": "string",
                "title": "Longitude field",
                "description": "Dotted path to numeric longitude."
              },
              "website": {
                "type": "string",
                "title": "Website field",
                "description": "Dotted path to the public business website."
              },
              "phones": {
                "type": "string",
                "title": "Phone string or array field",
                "description": "Dotted path to one public business phone or an array of phones. Up to 20 valid normalized values are retained, and each can contribute potential duplicate evidence."
              },
              "emails": {
                "type": "string",
                "title": "Email string or array field",
                "description": "Dotted path to one public business email or an array of emails."
              },
              "categories": {
                "type": "string",
                "title": "Category string or array field",
                "description": "Dotted path to one business category or an array of categories."
              },
              "rating": {
                "type": "string",
                "title": "Rating field",
                "description": "Dotted path to a numeric rating from zero through five."
              },
              "review_count": {
                "type": "string",
                "title": "Review-count field",
                "description": "Dotted path to a nonnegative integer review count."
              },
              "permanently_closed": {
                "type": "string",
                "title": "Permanent-closed field",
                "description": "Dotted path to a boolean permanent-closed flag."
              },
              "temporarily_closed": {
                "type": "string",
                "title": "Temporary-closed field",
                "description": "Dotted path to a boolean temporary-closed flag."
              },
              "social_urls": {
                "type": "string",
                "title": "Social URL string or array field",
                "description": "Dotted path to one public social URL or an array of URLs."
              }
            },
            "default": {},
            "additionalProperties": false
          },
          "required_fields": {
            "title": "CRM-ready required fields",
            "minItems": 1,
            "maxItems": 9,
            "uniqueItems": true,
            "type": "array",
            "description": "Select the fields that define ready for this run. Every percentage is a direct count across this list; no fields are secretly weighted.",
            "items": {
              "type": "string",
              "enum": [
                "name",
                "address",
                "website",
                "phone",
                "email",
                "categories",
                "coordinates",
                "rating",
                "review_count"
              ]
            },
            "default": [
              "name",
              "address",
              "website",
              "phone",
              "email"
            ]
          },
          "max_rows": {
            "title": "Maximum source rows",
            "minimum": 1,
            "maximum": 25000,
            "type": "integer",
            "description": "Hard cap on selected-Dataset or inline rows retained and analyzed in one run. One extra selected row is probed to make truncation explicit.",
            "default": 25000
          },
          "max_source_bytes": {
            "title": "Maximum source JSON bytes",
            "minimum": 1024,
            "maximum": 67108864,
            "type": "integer",
            "description": "Hard compact canonical-JSON byte cap applied identically to selected-Dataset and inline rows. A row that would cross the cap is withheld and reported.",
            "default": 16777216
          },
          "max_source_row_bytes": {
            "title": "Maximum bytes per source row",
            "minimum": 256,
            "maximum": 4194304,
            "type": "integer",
            "description": "Hard compact canonical-JSON byte cap for one source row. An oversized row is withheld, stops the bounded read, and is reported without copying its contents.",
            "default": 1048576
          },
          "max_scorecard_rows": {
            "title": "Maximum lead scorecards",
            "minimum": 0,
            "maximum": 25000,
            "type": "integer",
            "description": "Cap scorecards before publication. Accepted non-invalid rows are planned as the chargeable prefix; effective summaries cover only delivered scorecards.",
            "default": 10000
          },
          "max_duplicate_pairs": {
            "title": "Maximum duplicate candidates",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Cap deterministic pair records. Zero still computes duplicate-row status and summary counts but emits no pair details.",
            "default": 5000
          },
          "max_duplicate_bucket_size": {
            "title": "Maximum comparison bucket size",
            "minimum": 2,
            "maximum": 200,
            "type": "integer",
            "description": "Skip any exact signal shared by more rows than this cap, preventing quadratic pair explosions from placeholder values.",
            "default": 50
          },
          "include_business_names": {
            "title": "Include public business names",
            "type": "boolean",
            "description": "Copy normalized public business names into lead scorecards and duplicate-candidate rows.",
            "default": true
          },
          "include_contact_values": {
            "title": "Include business contact values",
            "type": "boolean",
            "description": "Off by default for data minimization. Enable to copy normalized addresses, website domains, phones, and syntax-valid emails into the immutable run plan and output dataset.",
            "default": false
          },
          "as_of": {
            "title": "Fixed report timestamp",
            "type": "string",
            "description": "Optional ISO 8601 timestamp for reproducible runs. It affects generated_at only and never changes source facts."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}