{
  "openapi": "3.0.1",
  "info": {
    "title": "Contact List Cleaner: Fix Phones, Emails & Names, Dedupe",
    "description": "Clean a contact list: fix name case, tidy emails (syntax and typos), format and validate phone numbers, then remove duplicates. Takes JSON, CSV or a dataset. Offline logic: no mailbox, DNS or phone-line checks. Pay per contact row.",
    "version": "0.1",
    "x-build-id": "GAIH0LXspXsEtc1WA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data-done-right~contact-list-cleaner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data-done-right-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/data-done-right~contact-list-cleaner/runs": {
      "post": {
        "operationId": "runs-sync-data-done-right-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/data-done-right~contact-list-cleaner/run-sync": {
      "post": {
        "operationId": "run-sync-data-done-right-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": {
          "contacts": {
            "title": "Contacts (list of objects)",
            "type": "array",
            "description": "Contacts as a JSON list of objects, one per person. Example: [{\"name\": \"JANE DOE\", \"email\": \"Jane@Acme.com\", \"phone\": \"(415) 555-2671\"}]. Extra keys are kept untouched in the output."
          },
          "csvUrl": {
            "title": "CSV file URL (optional)",
            "type": "string",
            "description": "Public link to a CSV file with a header row (up to 25 MB). Example: https://example.com/contacts.csv. Public files only, no logins; internal addresses are blocked."
          },
          "datasetId": {
            "title": "Dataset with contacts (optional)",
            "type": "string",
            "description": "Pick an Apify dataset (for example a scraper's output). Every item is treated as one contact. Example: a dataset ID such as aBcD1234eFgH5678i."
          },
          "nameColumn": {
            "title": "Full name column",
            "type": "string",
            "description": "Column that holds the full name. Leave empty to detect it (name, full name, contact). Example: Contact Name."
          },
          "firstNameColumn": {
            "title": "First name column",
            "type": "string",
            "description": "Column with the first name, used with the last name column instead of a full name. Example: First Name. Leave empty to detect."
          },
          "lastNameColumn": {
            "title": "Last name column",
            "type": "string",
            "description": "Column with the last name. Example: Surname. Leave empty to detect."
          },
          "emailColumn": {
            "title": "Email column",
            "type": "string",
            "description": "Column with the email address. Example: Work Email. Leave empty to detect."
          },
          "phoneColumn": {
            "title": "Phone column",
            "type": "string",
            "description": "Column with the phone number. Example: Mobile. Leave empty to detect."
          },
          "companyColumn": {
            "title": "Company column",
            "type": "string",
            "description": "Column with the company name. Example: Organisation. Leave empty to detect."
          },
          "defaultCountry": {
            "title": "Default country for phone numbers",
            "type": "string",
            "description": "Two-letter ISO code used for numbers written without +country code. Example: US, GB, DE, FR. Default: US. Numbers that start with + ignore this.",
            "default": "US"
          },
          "phoneFormat": {
            "title": "Phone output format",
            "enum": [
              "e164",
              "international",
              "national"
            ],
            "type": "string",
            "description": "How valid phone numbers are written in the phone field. phoneE164 is always filled for valid numbers. Default: E.164.",
            "default": "e164"
          },
          "fixNameCase": {
            "title": "Fix name capitalisation",
            "type": "boolean",
            "description": "Recase names written in ALL CAPS or all lower case (JANE DOE becomes Jane Doe; van and de stay lower case). Mixed-case names such as McDonald are never touched. Default: on.",
            "default": true
          },
          "fixEmailTypos": {
            "title": "Auto-correct email domain typos",
            "type": "boolean",
            "description": "Replace known domain typos (gmial.com, hotmial.com, .con) with the suggested address. Off by default: the suggestion is always shown in emailSuggestion and nothing is changed.",
            "default": false
          },
          "dedupeBy": {
            "title": "Find duplicates by",
            "enum": [
              "email",
              "phone",
              "emailOrPhone",
              "nameAndCompany",
              "any",
              "none"
            ],
            "type": "string",
            "description": "Which match makes two rows duplicates. Email ignores case, gmail dots and +tags. Phone compares valid numbers in E.164 form. Shared office numbers can merge different people, so phone matching is opt-in.",
            "default": "email"
          },
          "duplicates": {
            "title": "What to do with duplicates",
            "enum": [
              "remove",
              "flag"
            ],
            "type": "string",
            "description": "remove: only the most complete row of each duplicate group is delivered. flag: all rows are delivered with isDuplicate and duplicateOf. Rows are charged either way. Default: remove.",
            "default": "remove"
          },
          "mergeDuplicates": {
            "title": "Fill gaps from duplicates",
            "type": "boolean",
            "description": "When the kept row lacks a valid email, phone, name or company that a duplicate has, copy it over (see filledFromDuplicates). Default: on.",
            "default": true
          },
          "maxContacts": {
            "title": "Maximum contacts",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Upper limit of non-empty rows to process and charge. Example: 1000. Rows beyond it are skipped and not charged.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}