{
  "openapi": "3.0.1",
  "info": {
    "title": "Contact Data Validation API - Email, Phone, Address, Lead",
    "description": "Validate and enrich contact data through eighteen services on one key: score a whole lead and cross-check its parts, verify email deliverability, look up phone line type carrier and the name on it, parse and validate names, and standardise addresses in the US and worldwide. Pay per result.",
    "version": "0.1",
    "x-build-id": "K44TUJ8R5YLbdxuFo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~contact-data-validation-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-contact-data-validation-api",
        "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/nabeelbaghoor~contact-data-validation-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-contact-data-validation-api",
        "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/nabeelbaghoor~contact-data-validation-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-contact-data-validation-api",
        "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": {
          "mode": {
            "title": "What to validate",
            "enum": [
              "lead-validation",
              "lead-validation-international",
              "email-validation",
              "phone-info",
              "phone-append",
              "business-phone-append",
              "name-validation",
              "address-us",
              "address-us-single-line",
              "address-parse",
              "city-state-zip",
              "secondary-numbers",
              "address-international",
              "geocode-place",
              "geocode-reverse",
              "address-detective",
              "address-detective-outlying",
              "best-country"
            ],
            "type": "string",
            "description": "Which service to call. Every mode reads the same records list and simply takes different fields out of it, so one prepared list can be run through several modes without being rewritten.",
            "default": "lead-validation"
          },
          "records": {
            "title": "Records",
            "type": "array",
            "description": "The records to validate, one JSON object per line. Supply whichever fields the mode needs and leave the rest out. Recognised fields: fullName, firstName, lastName, salutation, gender, dateOfBirth, email, phone, phone2, phone3, ipAddress, businessName, businessDomain, businessEin, address1 to address8, singleLine, city, state, postalCode, country, latitude, longitude, searchRadius, boundaries, extras, outputLanguage, captureTime, testType, label. Identical records are removed so you are never charged twice for the same lookup.",
            "items": {
              "type": "string"
            }
          },
          "emails": {
            "title": "Email addresses",
            "type": "array",
            "description": "Shorthand for the email validation mode: addresses one per line, so a simple run does not have to be written as JSON. Added to whatever the records list already holds.",
            "items": {
              "type": "string"
            }
          },
          "phones": {
            "title": "Phone numbers",
            "type": "array",
            "description": "Shorthand for the phone lookup mode: numbers one per line. Added to whatever the records list already holds.",
            "items": {
              "type": "string"
            }
          },
          "names": {
            "title": "Names",
            "type": "array",
            "description": "Shorthand for the name validation mode: names one per line. Added to whatever the records list already holds.",
            "items": {
              "type": "string"
            }
          },
          "addresses": {
            "title": "Single-line addresses",
            "type": "array",
            "description": "Shorthand for the single-line address validation and geocode modes: one whole address per line. The single-line address mode needs the city and state, or the postal code, on the same line, and the provider rejects the record rather than guessing when they are missing. Added to whatever the records list already holds.",
            "items": {
              "type": "string"
            }
          },
          "testType": {
            "title": "Judge leads as",
            "enum": [
              "business",
              "consumer",
              "business-noaddress",
              "consumer-noaddress"
            ],
            "type": "string",
            "description": "Whether a lead is scored as a business or as a consumer, and whether an address is expected at all. The no-address variants are for forms that never collected one, and they stop a missing address from dragging the overall score down.",
            "default": "business"
          },
          "phoneTestType": {
            "title": "Phone lookup depth",
            "enum": [
              "basic",
              "business",
              "full"
            ],
            "type": "string",
            "description": "How far the phone lookup goes. Basic returns line type and carrier, business adds business listing data, and full adds the contact behind the line. Deeper lookups cost more of your provider credits.",
            "default": "full"
          },
          "nameOption": {
            "title": "Name validation option",
            "type": "string",
            "description": "The option string passed to the name service. Leave as Default unless the provider has told you to use another value for your account.",
            "default": "Default"
          },
          "allowEmailCorrections": {
            "title": "Correct email typos",
            "type": "boolean",
            "description": "Let the email service repair an obvious typo before validating, and return what it corrected. On by default: a signup that misspelled a common webmail domain by one character is a real subscriber, not a bounce.",
            "default": true
          },
          "emailTimeoutMs": {
            "title": "Email lookup timeout in milliseconds",
            "minimum": 500,
            "maximum": 60000,
            "type": "integer",
            "description": "How long the email service may spend contacting the receiving mail server. A short timeout finishes faster and returns more inconclusive answers.",
            "default": 5000
          },
          "maxMatchesPerRecord": {
            "title": "Maximum matches per record",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many results the geocoding modes may return for one record. Each returned match is a row, so this multiplies both the dataset and the spend.",
            "default": 5
          },
          "searchType": {
            "title": "Geocode search type",
            "type": "string",
            "description": "The search type passed to the geocoding modes. Leave as Default unless the provider has told you to use another value.",
            "default": "Default"
          },
          "minCertainty": {
            "title": "Minimum overall certainty",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "In the lead modes, only keep leads scoring at least this on the provider's zero to one hundred scale. Leave at zero to keep every lead. Applied after the provider answers, so it reduces dataset noise and Apify spend rather than provider credits.",
            "default": 0
          },
          "leadQualities": {
            "title": "Keep only these lead qualities",
            "type": "array",
            "description": "In the lead modes, only keep leads the provider rated this way, such as Pass, Review or Fail. Leave empty to keep every rating.",
            "items": {
              "type": "string"
            }
          },
          "requireDeliverableEmail": {
            "title": "Require a usable email",
            "type": "boolean",
            "description": "Drop rows whose email component scored below the provider's usable threshold. Useful when the point of the run is a mailable list rather than a full audit.",
            "default": false
          },
          "requireValidPhone": {
            "title": "Require a usable phone number",
            "type": "boolean",
            "description": "Drop rows whose phone component scored below the provider's usable threshold, or which the phone service could not confirm.",
            "default": false
          },
          "requireValidAddress": {
            "title": "Require a usable address",
            "type": "boolean",
            "description": "Drop rows whose address component scored below the provider's usable threshold, or which resolved to no address at all.",
            "default": false
          },
          "environment": {
            "title": "Which host to call",
            "enum": [
              "production",
              "trial"
            ],
            "type": "string",
            "description": "Production runs against the provider's live hosts and fails over to their backup host if the primary reports a service failure. Trial runs against the trial host, which is the one a free trial key is issued for. A key issued for one will not work on the other.",
            "default": "production"
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 1200,
            "type": "integer",
            "description": "Pace the run so it stays under whatever rate your plan allows. Lower this if the provider starts refusing requests; raise it to finish a long list sooner.",
            "default": 300
          },
          "skipNotFound": {
            "title": "Skip records with no result",
            "type": "boolean",
            "description": "Leave records the provider returned nothing for, and records it rejected as malformed, out of the dataset. Off by default, because a rejected record is usually worth seeing. Misses are never charged for either way.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many rows. This is the cap on both spend and run time.",
            "default": 100
          },
          "apiKey": {
            "title": "License key",
            "type": "string",
            "description": "Your own license key for the contact validation API. Note that each service is licensed separately, so a key can be valid and still be refused by a service that is not on your plan; the actor reports those two cases differently. Stored as a secret."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}