{
  "openapi": "3.0.1",
  "info": {
    "title": "Lead List Cleaner — Dedupe, Phones, Addresses, Websites, Emails",
    "description": "Clean any business lead list (CSV, Google Sheet, JSON or an Apify dataset such as Google Maps results): remove duplicates, format phones (E.164) and addresses, check websites are live and email domains have MX, drop personal emails, add a quality score. $1.50 per 1,000 rows.",
    "version": "0.1",
    "x-build-id": "8x8g0aLnUc38Sm8gC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/signalloom~lead-list-cleaner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-signalloom-lead-list-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/signalloom~lead-list-cleaner/runs": {
      "post": {
        "operationId": "runs-sync-signalloom-lead-list-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/signalloom~lead-list-cleaner/run-sync": {
      "post": {
        "operationId": "run-sync-signalloom-lead-list-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": "Clean the results of another Actor run: pick the dataset or paste its ID (Run → Storage → Dataset ID). Works with Google Maps, store-leads or any other dataset in your account; the Actor gets read-only access to that dataset only. Leave all three sources empty to try the built-in sample. Example: \"aBcD1234eFgH5678\"."
          },
          "sourceUrl": {
            "title": "CSV or JSON file URL",
            "type": "string",
            "description": "A link to a CSV or JSON file (comma, semicolon or tab separated). Google Sheets links work if the sheet is shared as \"Anyone with the link\". Example: \"https://example.com/leads.csv\"."
          },
          "rows": {
            "title": "Rows (JSON)",
            "type": "array",
            "description": "Rows pasted as a JSON array of objects, e.g. [{\"name\": \"Joe's Pizza\", \"phone\": \"(512) 555 0100\", \"website\": \"joespizza.com\"}]. Rows from all sources you fill in are cleaned together."
          },
          "fieldMapping": {
            "title": "Field mapping (optional)",
            "type": "object",
            "description": "Columns are detected automatically (name/title, phone, website/url/domain, email/emails, address or street/city/state/postalCode/country). Override any of them with your column name, e.g. {\"phone\": \"Main Phone\", \"name\": \"Company\"}. Keys: name, phone, website, email, address, street, city, state, postalCode, country."
          },
          "defaultCountry": {
            "title": "Default country",
            "type": "string",
            "description": "Two-letter country code used for phone numbers without a +country code when the row has no country, e.g. US, GB, CA, AU, DE. Example: \"GB\".",
            "default": "US"
          },
          "duplicates": {
            "title": "Duplicates",
            "enum": [
              "flag",
              "remove"
            ],
            "type": "string",
            "description": "Flag: keep every row and mark duplicates (clean_is_duplicate, clean_duplicate_of_row). Remove: output only one row per business. Duplicate rows are never charged either way. API values: \"flag\", \"remove\".",
            "default": "flag"
          },
          "mergeStrategy": {
            "title": "Which row to keep",
            "enum": [
              "merge",
              "keepMostComplete",
              "keepFirst"
            ],
            "type": "string",
            "description": "Merge (recommended): keep the most complete row and fill its missing phone, website, email or address from its duplicates. Most complete: keep the most complete row as is. First: keep the first row as is. API values: \"merge\", \"keepMostComplete\", \"keepFirst\".",
            "default": "merge"
          },
          "dedupeBy": {
            "title": "Match duplicates by",
            "type": "array",
            "description": "Rows are the same business when they share any of these. Website domain ignores social and platform pages (Facebook, Yelp…).",
            "items": {
              "type": "string",
              "enum": [
                "domain",
                "phone",
                "nameAddress"
              ],
              "enumTitles": [
                "Website domain",
                "Phone number",
                "Name + street address"
              ]
            },
            "default": [
              "domain",
              "phone",
              "nameAddress"
            ]
          },
          "mergeLocations": {
            "title": "Merge branches of the same company",
            "type": "boolean",
            "description": "Off (default): rows with the same website or phone but different street addresses are kept as separate locations (chains, franchises). On: one row per company.",
            "default": false
          },
          "checkWebsites": {
            "title": "Check websites are live",
            "type": "boolean",
            "description": "One request to each unique website's homepage: HTTP status, redirect target, HTTPS, parked domains. Page content is not read or stored.",
            "default": true
          },
          "checkEmailDns": {
            "title": "Check email domains (MX)",
            "type": "boolean",
            "description": "Looks up each email domain's mail server (MX record) in DNS. No email is sent and no mail server is contacted.",
            "default": true
          },
          "dropPersonEmails": {
            "title": "Drop person-looking emails",
            "type": "boolean",
            "description": "On (default): only company mailboxes are kept (info@, sales@, reservations@, the brand's own name). Addresses that look like a person's (jane@, j.smith@) are removed from the output, including from your original columns, and counted in clean_emails_dropped. Turn off only if you have a lawful basis to process personal emails.",
            "default": true
          },
          "tidyOriginalFields": {
            "title": "Tidy original text fields",
            "type": "boolean",
            "description": "Trim spaces, collapse double spaces, remove invisible characters and decode HTML entities in your original columns too. The cleaned values are always in the clean_* columns.",
            "default": true
          },
          "maxRows": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many input rows. Example: 1000.",
            "default": 10000
          },
          "maxConcurrency": {
            "title": "Websites checked in parallel",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many different websites are checked at the same time. Each site gets at most one request per redirect.",
            "default": 10
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}