{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Lead Cleaner – Dedupe, Email MX & Phone Format",
    "description": "Clean Google Maps and scraped lead lists before CRM import: dedupe, E.164 phones, email syntax + domain MX check, role/free-mail/disposable flags, website check and a lead score. No SMTP probing. $0.60 per 1,000 leads; duplicates and dropped rows are free.",
    "version": "0.0",
    "x-build-id": "CHUkhvhJBF7zbDg6m"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/chris_elder~google-maps-lead-cleaner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-chris_elder-google-maps-lead-cleaner",
        "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/chris_elder~google-maps-lead-cleaner/runs": {
      "post": {
        "operationId": "runs-sync-chris_elder-google-maps-lead-cleaner",
        "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/chris_elder~google-maps-lead-cleaner/run-sync": {
      "post": {
        "operationId": "run-sync-chris_elder-google-maps-lead-cleaner",
        "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": "Apify dataset ID",
            "type": "string",
            "description": "The dataset to clean, e.g. the default dataset of your Google Maps scraper run (Storage tab → Dataset ID). Using this Actor as an integration after a scraper run? Set this to {{resource.defaultDatasetId}} – Apify fills in the triggering run's dataset and grants this Actor read access to it. Use this OR items OR csvUrl."
          },
          "items": {
            "title": "Rows (JSON array)",
            "type": "array",
            "description": "Paste rows directly instead of datasetId. The prefill is 8 real public hotel listings from OpenStreetMap shaped like Google Maps scraper output (includes one duplicate, a mistyped email and a domain without MX)."
          },
          "csvUrl": {
            "title": "CSV or JSON file URL",
            "type": "string",
            "description": "Public link to a CSV (comma, semicolon or tab) or a JSON array, e.g. a Google Sheet published as CSV. Used when datasetId and items are empty."
          },
          "fieldMapping": {
            "title": "Field mapping (optional)",
            "type": "object",
            "description": "Only needed when your column names are unusual. Keys: name, website, phone, email, address, street, city, postalCode, state, countryCode, placeId. Values: your column name (dot paths like contact.email work). Example: {\"name\": \"Company\", \"phone\": \"Tel\"}. Common Google Maps scraper and contact-extractor fields are detected automatically."
          },
          "defaultCountry": {
            "title": "Default country for phone numbers",
            "type": "string",
            "description": "2-letter ISO code (GB, US, DE, AU…) used to read national-format numbers like 020 7730 8191 when a row has no countryCode. Rows with countryCode use their own."
          },
          "dedupeMode": {
            "title": "Dedupe mode",
            "enum": [
              "auto",
              "company",
              "none"
            ],
            "type": "string",
            "description": "auto = one row per place: Google placeId, else website (domain + page path), else phone, else name + address. company = one row per company website domain (merges chain branches). none = keep every row. Merged duplicates are free.",
            "default": "auto"
          },
          "checkMx": {
            "title": "Check email domain MX records",
            "type": "boolean",
            "description": "Look up DNS MX records once per email domain (cached). Included in the price. This checks the domain can receive mail, not that the mailbox exists (no SMTP probing).",
            "default": true
          },
          "checkWebsites": {
            "title": "Check websites are reachable",
            "type": "boolean",
            "description": "One HEAD request per unique website (GET fallback), following redirects. Adds status, final URL and alive flag. Included in the price.",
            "default": true
          },
          "websiteTimeoutSecs": {
            "title": "Website check timeout (seconds)",
            "minimum": 2,
            "maximum": 60,
            "type": "integer",
            "description": "Per website. 2–60.",
            "default": 10
          },
          "dropRowsWithoutContact": {
            "title": "Drop rows with no contact method",
            "type": "boolean",
            "description": "Remove rows that have neither a usable email (domain has MX) nor a valid phone. Dropped rows are not charged.",
            "default": false
          },
          "minLeadQuality": {
            "title": "Minimum lead quality (0–100)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Drop rows scoring below this. 0 keeps everything. Dropped rows are not charged.",
            "default": 0
          },
          "passthroughFields": {
            "title": "Extra fields to keep",
            "type": "array",
            "description": "Source fields copied to the output unchanged (dot paths allowed). Default keeps the Google Maps category, rating, review count and Maps URL.",
            "default": [
              "categoryName",
              "totalScore",
              "reviewsCount",
              "url"
            ],
            "items": {
              "type": "string"
            }
          },
          "includeEmailDetails": {
            "title": "Include per-email details",
            "type": "boolean",
            "description": "Adds emailDetails (status, role, free-mail, disposable, MX hosts) for every email found. Turn off for a narrower CSV.",
            "default": true
          },
          "includeOriginal": {
            "title": "Include the original row",
            "type": "boolean",
            "description": "Adds the full source row under original.",
            "default": false
          },
          "maxRows": {
            "title": "Max rows to read",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Cap on input rows read (protects cost). Only cleaned rows written to the dataset are charged.",
            "default": 100000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}