{
  "openapi": "3.0.1",
  "info": {
    "title": "Email List Cleaner & Validator (Dataset, CSV or Sheet)",
    "description": "Cleans an email list from an Apify dataset, a CSV/Excel file or Google Sheet, keeping every original column and adding a verdict per row: format, whether the domain accepts mail, throwaway domains, shared inboxes, typos and duplicates. Does NOT confirm individual mailboxes. Charged per address.",
    "version": "0.1",
    "x-build-id": "gjhww9LJGWzG3l07r"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nerolabs~email-list-cleaner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nerolabs-email-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/nerolabs~email-list-cleaner/runs": {
      "post": {
        "operationId": "runs-sync-nerolabs-email-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/nerolabs~email-list-cleaner/run-sync": {
      "post": {
        "operationId": "run-sync-nerolabs-email-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": "Dataset",
            "type": "string",
            "description": "Pick an existing Apify dataset, for example the output of any scraper run. Use this OR 'File URL' OR 'Data (inline)'. Declaring it this way is what lets this Actor run with limited permissions: it may read the dataset you point at, and nothing else on your account."
          },
          "fileUrl": {
            "title": "File URL (CSV, Excel, JSON or Google Sheet)",
            "type": "string",
            "description": "A public link to a CSV or TSV file, an Excel .xlsx file, a JSON array or JSON Lines file, or a Google Sheet (paste the normal sheet link with sharing set to 'Anyone with the link can view'). Format is detected automatically. Up to 100 MB."
          },
          "data": {
            "title": "Data (inline)",
            "type": "array",
            "description": "Paste rows directly instead, for a quick one-off check."
          },
          "fileFormat": {
            "title": "File format",
            "enum": [
              "auto",
              "csv",
              "tsv",
              "json",
              "jsonl",
              "xlsx"
            ],
            "type": "string",
            "description": "Only needed if automatic detection gets the file URL's format wrong.",
            "default": "auto"
          },
          "emailField": {
            "title": "Email field",
            "type": "string",
            "description": "Which column holds the address, for example 'email' or 'contact_email'. Leave empty and it is detected automatically, first by column name and then by looking at which column actually contains addresses."
          },
          "checkMailServer": {
            "title": "Check the domain can receive mail",
            "type": "boolean",
            "description": "Looks up the domain's MX records (falling back to an A record, which mail servers also accept). A domain with neither cannot receive mail from anyone, which is the single biggest source of hard bounces. Distinct domains are looked up once and cached, so a 5,000-row list with 300 domains costs 300 lookups, not 5,000.",
            "default": true
          },
          "detectDisposable": {
            "title": "Flag throwaway addresses",
            "type": "boolean",
            "description": "Marks known temporary mailbox providers (mailinator.com, guerrillamail.com, 10minutemail.com and around 120 others) as invalid. These are people who signed up without wanting to be contacted.",
            "default": true
          },
          "detectRole": {
            "title": "Flag shared-inbox addresses",
            "type": "boolean",
            "description": "Marks info@, sales@, support@, admin@ and similar as risky rather than invalid. They often work, but on a cold list they bounce and generate spam complaints far more than a named person does.",
            "default": true
          },
          "detectTypos": {
            "title": "Suggest fixes for likely typos",
            "type": "boolean",
            "description": "Spots near misses of popular domains (gmial.com, hotmial.co.uk, yahooo.com) and puts the suggestion in a 'didYouMean' column so you can correct rather than discard the row.",
            "default": true
          },
          "markDuplicates": {
            "title": "Mark duplicates",
            "type": "boolean",
            "description": "The first time an address appears it is checked normally; later repeats are marked 'duplicate'. Matching ignores case and surrounding spaces.",
            "default": true
          },
          "keep": {
            "title": "Rows to keep",
            "enum": [
              "all",
              "valid",
              "valid_and_risky",
              "problems"
            ],
            "type": "string",
            "description": "Filters the output. Every row is still checked and charged either way, so this is about what you get back, not about cost.",
            "default": "all"
          },
          "exportFormats": {
            "title": "Also export as a file",
            "type": "array",
            "description": "Optionally write the results as a real downloadable CSV and/or Excel file, on top of the dataset.",
            "items": {
              "type": "string",
              "enum": [
                "csv",
                "xlsx"
              ],
              "enumTitles": [
                "CSV",
                "Excel (.xlsx)"
              ]
            },
            "default": []
          },
          "outputDatasetName": {
            "title": "Also append to a named dataset",
            "type": "string",
            "description": "Optional. Every run's results are also appended to a dataset of this name, so a scheduled job builds one growing clean list. Not charged again."
          },
          "dnsConcurrency": {
            "title": "Domain lookups at once",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many domains to look up in parallel. The default is fine for almost everything.",
            "default": 20
          },
          "dnsTimeoutSecs": {
            "title": "Domain lookup timeout (seconds)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "A domain whose lookup times out is reported as risky, never as invalid, because a slow DNS server is not evidence of a bad address.",
            "default": 10
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many rows, a cost guard while you are testing. There is a hard ceiling of 200,000 per run regardless."
          },
          "webhookUrl": {
            "title": "Webhook URL (optional)",
            "type": "string",
            "description": "Optional. If set, the run summary (counts and download links, never the addresses themselves) is POSTed here as JSON when the run finishes, so a scheduled clean-up can report into Slack, Zapier, Make, n8n or your own API. Only charged on a confirmed 2xx."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}