{
  "openapi": "3.0.1",
  "info": {
    "title": "Contact List Cleaner & Deduplicator",
    "description": "Clean contact and lead lists from CSV, Excel, Google Sheets or Apify datasets: phones to E.164 (240+ countries), email fixes, name splitting, date formats, exact + fuzzy dedupe. Clean CSV/Excel + report.",
    "version": "1.1",
    "x-build-id": "bpRQA0hqbo0rHKvDb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vantoannguyen~contact-list-cleaner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vantoannguyen-contact-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/vantoannguyen~contact-list-cleaner/runs": {
      "post": {
        "operationId": "runs-sync-vantoannguyen-contact-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/vantoannguyen~contact-list-cleaner/run-sync": {
      "post": {
        "operationId": "run-sync-vantoannguyen-contact-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": {
          "fileUrls": {
            "title": "File links (CSV, Excel or JSON)",
            "type": "array",
            "description": "Public links to .csv, .xlsx or .json files. Google Sheets, Google Drive and Dropbox share links are converted to download links automatically (the file must be shared as 'Anyone with the link').",
            "items": {
              "type": "string"
            }
          },
          "uploadedFile": {
            "title": "Or upload a file",
            "type": "string",
            "description": "Upload a CSV, Excel or JSON file from your computer."
          },
          "datasetIds": {
            "title": "Apify datasets",
            "type": "array",
            "description": "Pick datasets from earlier runs, e.g. results of Google Maps Scraper or any lead scraper. Rows from all datasets are merged and de-duplicated together. The Actor only reads them."
          },
          "rows": {
            "title": "Or paste rows as JSON",
            "type": "array",
            "description": "An array of objects, handy for API and AI-agent use. Example: [{\"name\": \"maria LOPEZ\", \"email\": \"Maria.Lopez@Example.com \", \"phone\": \"(503) 555-0142\"}]"
          },
          "sheetName": {
            "title": "Excel worksheet",
            "type": "string",
            "description": "Name of the worksheet to read from Excel files. Leave empty to read the first sheet."
          },
          "defaultCountry": {
            "title": "Default phone country",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Two-letter country code used for phone numbers written without +country code, e.g. US, GB, DE, FR, IN, AU, VN. Numbers that start with + or 00 keep their own country. If a row has a 'Country' / 'countryCode' column with a 2-letter code, that row uses it instead.",
            "default": "US"
          },
          "phoneFormat": {
            "title": "Phone output format",
            "enum": [
              "E164",
              "INTERNATIONAL",
              "NATIONAL"
            ],
            "type": "string",
            "description": "E164: +15035550142 (best for CRMs, SMS and WhatsApp tools). INTERNATIONAL: +1 503-555-0142. NATIONAL: (503) 555-0142.",
            "default": "E164"
          },
          "dateFormat": {
            "title": "Ambiguous dates",
            "enum": [
              "MDY",
              "DMY"
            ],
            "type": "string",
            "description": "How to read dates like 03/04/2026 where both parts could be the month. Dates such as 14/03/2026 or 2026-03-14 are always read correctly. Output is always YYYY-MM-DD.",
            "default": "MDY"
          },
          "recordType": {
            "title": "What is in the list?",
            "enum": [
              "auto",
              "people",
              "businesses"
            ],
            "type": "string",
            "description": "People: a 'Name' column is split into first and last name. Businesses: a 'Name' or 'title' column is the business name. Auto: businesses when the data looks like a Google Maps export, otherwise people.",
            "default": "auto"
          },
          "fuzzyMatching": {
            "title": "Merge near-duplicates",
            "type": "boolean",
            "description": "Besides exact duplicates, merge rows that share an email, a phone plus a similar name, or a similar name (typos, nicknames such as Bob/Robert) at the same company or city. The most complete row is kept and its gaps are filled from the others.",
            "default": true
          },
          "nameSimilarityPercent": {
            "title": "Name similarity for near-duplicates (%)",
            "minimum": 50,
            "maximum": 100,
            "type": "integer",
            "description": "How similar two names must be to count as the same contact (with the same company or city). Lower = more merging.",
            "default": 88
          },
          "dedupeKeyColumns": {
            "title": "ID columns for de-duplication",
            "type": "array",
            "description": "Optional. Rows with the same values in all these columns are always merged, e.g. a CRM ID. Google Maps 'placeId' is used automatically when present.",
            "items": {
              "type": "string"
            }
          },
          "columnMapping": {
            "title": "Column mapping (optional)",
            "type": "object",
            "description": "Columns are detected automatically (\"E-mail\", \"Phone #\", \"Organisation\", \"Date Joined\" ...). Override when needed, e.g. {\"email\": \"Work E-mail\", \"phone\": \"Mobile\"}. Fields: full_name, first_name, last_name, email, phone, company, city, website, signup_date."
          },
          "outputRows": {
            "title": "Rows in the dataset",
            "enum": [
              "ALL",
              "OK_ONLY"
            ],
            "type": "string",
            "description": "ALL: every clean contact with status OK or REVIEW (the issues column says what to check). OK_ONLY: only contacts that passed all checks. The CSV/Excel files always contain all rows.",
            "default": "ALL"
          },
          "saveCsv": {
            "title": "Save clean CSV file",
            "type": "boolean",
            "description": "Save clean_contacts.csv (UTF-8, opens in Excel) to the key-value store.",
            "default": true
          },
          "saveExcel": {
            "title": "Save clean Excel file",
            "type": "boolean",
            "description": "Save clean_contacts.xlsx with REVIEW rows highlighted.",
            "default": true
          },
          "maxRows": {
            "title": "Max rows to clean",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many input rows (0 = no limit). Useful for a cheap test run.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}