{
  "openapi": "3.0.1",
  "info": {
    "title": "WhatsApp Number Scraper & Phone List Cleaner",
    "description": "Cleans phone lists as they really arrive (+212…, 0…, (212) 6…) into one international column with country, carrier, line type and time zone, duplicates merged and impossible numbers flagged. Optional WhatsApp registration check via your provider. 199 countries. Example: Morocco as default.",
    "version": "1.0",
    "x-build-id": "c6o0NHQOG0ig67iZv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/badr_xba~whatsapp-number-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-badr_xba-whatsapp-number-scraper",
        "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/badr_xba~whatsapp-number-scraper/runs": {
      "post": {
        "operationId": "runs-sync-badr_xba-whatsapp-number-scraper",
        "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/badr_xba~whatsapp-number-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-badr_xba-whatsapp-number-scraper",
        "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": {
          "checkWhatsApp": {
            "title": "Check WhatsApp registration",
            "type": "boolean",
            "description": "Tells you, per number, whether a WhatsApp account exists — without messaging anyone. WhatsApp publishes this nowhere: wa.me answers the same page for a number that exists and one that does not, and web.whatsapp.com needs a signed-in session. So this step calls a validation service you subscribe to, using your key, exactly like every other WhatsApp validator on the market. Fill in the five fields below with your provider documentation.",
            "default": true
          },
          "whatsappApiUrl": {
            "title": "Provider address",
            "type": "string",
            "description": "The endpoint your provider documents, for example https://api.example.com/v1/whatsapp/check"
          },
          "whatsappApiKey": {
            "title": "Provider key",
            "type": "string",
            "description": "Your API key. Stored encrypted by Apify and never written to the dataset or the log."
          },
          "whatsappApiMethod": {
            "title": "Method",
            "enum": [
              "GET",
              "POST"
            ],
            "type": "string",
            "description": "How your provider expects the request.",
            "default": "GET"
          },
          "whatsappNumberField": {
            "title": "Name of the number field",
            "type": "string",
            "description": "What your provider calls the number: phone, number, msisdn…",
            "default": "phone"
          },
          "whatsappResultPath": {
            "title": "Where the answer sits",
            "type": "string",
            "description": "Path to the yes/no value in the provider answer. Use dots to go deeper: data.exists, result.0.is_registered.",
            "default": "exists"
          },
          "whatsappKeyHeader": {
            "title": "Header carrying the key",
            "type": "string",
            "description": "Usually Authorization, sometimes X-API-Key.",
            "default": "Authorization"
          },
          "whatsappKeyPrefix": {
            "title": "Prefix before the key",
            "type": "string",
            "description": "Written in front of the key in the header. Empty for providers that want the bare key.",
            "default": "Bearer "
          },
          "whatsappRequestsPerMinute": {
            "title": "Provider rate limit (per minute)",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "The pace your plan allows. The Actor keeps to it instead of discovering the limit by being refused.",
            "default": 20
          },
          "phoneNumber": {
            "title": "Single phone number",
            "type": "string",
            "description": "One number to check, with its country code and no spaces: 212612345678. Handy for a quick test."
          },
          "phoneNumbers": {
            "title": "Phone numbers",
            "type": "array",
            "description": "The list to clean. Any writing works — +212612345678, 212612345678, 0612345678, (212) 612-345-678 — and the Actor puts them all into one international form.",
            "items": {
              "type": "string"
            }
          },
          "defaultCountry": {
            "title": "Country for numbers written locally",
            "enum": [
              "AF",
              "AL",
              "DZ",
              "AD",
              "AO",
              "AG",
              "AR",
              "AM",
              "AU",
              "AT",
              "AZ",
              "BS",
              "BH",
              "BD",
              "BB",
              "BY",
              "BE",
              "BZ",
              "BJ",
              "BT",
              "BO",
              "BA",
              "BW",
              "BR",
              "BN",
              "BG",
              "BF",
              "BI",
              "CV",
              "KH",
              "CM",
              "CA",
              "CF",
              "TD",
              "CL",
              "CN",
              "CO",
              "KM",
              "CG",
              "CR",
              "HR",
              "CU",
              "CY",
              "CZ",
              "CI",
              "CD",
              "DK",
              "DJ",
              "DM",
              "DO",
              "EC",
              "EG",
              "SV",
              "GQ",
              "ER",
              "EE",
              "SZ",
              "ET",
              "FJ",
              "FI",
              "FR",
              "GA",
              "GM",
              "GE",
              "DE",
              "GH",
              "GR",
              "GD",
              "GT",
              "GN",
              "GW",
              "GY",
              "HT",
              "HN",
              "HK",
              "HU",
              "IS",
              "IN",
              "ID",
              "IR",
              "IQ",
              "IE",
              "IL",
              "IT",
              "JM",
              "JP",
              "JO",
              "KZ",
              "KE",
              "KI",
              "XK",
              "KW",
              "KG",
              "LA",
              "LV",
              "LB",
              "LS",
              "LR",
              "LY",
              "LI",
              "LT",
              "LU",
              "MG",
              "MW",
              "MY",
              "MV",
              "ML",
              "MT",
              "MH",
              "MR",
              "MU",
              "MX",
              "FM",
              "MD",
              "MC",
              "MN",
              "ME",
              "MA",
              "MZ",
              "MM",
              "NA",
              "NR",
              "NP",
              "NL",
              "NZ",
              "NI",
              "NE",
              "NG",
              "KP",
              "MK",
              "NO",
              "OM",
              "PK",
              "PW",
              "PS",
              "PA",
              "PG",
              "PY",
              "PE",
              "PH",
              "PL",
              "PT",
              "PR",
              "QA",
              "RO",
              "RU",
              "RW",
              "KN",
              "LC",
              "VC",
              "WS",
              "SM",
              "ST",
              "SA",
              "SN",
              "RS",
              "SC",
              "SL",
              "SG",
              "SK",
              "SI",
              "SB",
              "SO",
              "ZA",
              "KR",
              "SS",
              "ES",
              "LK",
              "SD",
              "SR",
              "SE",
              "CH",
              "SY",
              "TW",
              "TJ",
              "TZ",
              "TH",
              "TL",
              "TG",
              "TO",
              "TT",
              "TN",
              "TR",
              "TM",
              "TV",
              "UG",
              "UA",
              "AE",
              "GB",
              "US",
              "UY",
              "UZ",
              "VU",
              "VA",
              "VE",
              "VN",
              "YE",
              "ZM",
              "ZW"
            ],
            "type": "string",
            "description": "Numbers written without a country code — 0612345678 — belong to this country. Leave empty if every number in your list already carries its code."
          },
          "countries": {
            "title": "Keep only these countries",
            "type": "array",
            "description": "Drops every number that does not belong to one of these countries. Cleaning first is what keeps the bill down: a malformed number is never sent to your provider. Leave empty to keep them all.",
            "items": {
              "type": "string",
              "enum": [
                "AF",
                "AL",
                "DZ",
                "AD",
                "AO",
                "AG",
                "AR",
                "AM",
                "AU",
                "AT",
                "AZ",
                "BS",
                "BH",
                "BD",
                "BB",
                "BY",
                "BE",
                "BZ",
                "BJ",
                "BT",
                "BO",
                "BA",
                "BW",
                "BR",
                "BN",
                "BG",
                "BF",
                "BI",
                "CV",
                "KH",
                "CM",
                "CA",
                "CF",
                "TD",
                "CL",
                "CN",
                "CO",
                "KM",
                "CG",
                "CR",
                "HR",
                "CU",
                "CY",
                "CZ",
                "CI",
                "CD",
                "DK",
                "DJ",
                "DM",
                "DO",
                "EC",
                "EG",
                "SV",
                "GQ",
                "ER",
                "EE",
                "SZ",
                "ET",
                "FJ",
                "FI",
                "FR",
                "GA",
                "GM",
                "GE",
                "DE",
                "GH",
                "GR",
                "GD",
                "GT",
                "GN",
                "GW",
                "GY",
                "HT",
                "HN",
                "HK",
                "HU",
                "IS",
                "IN",
                "ID",
                "IR",
                "IQ",
                "IE",
                "IL",
                "IT",
                "JM",
                "JP",
                "JO",
                "KZ",
                "KE",
                "KI",
                "XK",
                "KW",
                "KG",
                "LA",
                "LV",
                "LB",
                "LS",
                "LR",
                "LY",
                "LI",
                "LT",
                "LU",
                "MG",
                "MW",
                "MY",
                "MV",
                "ML",
                "MT",
                "MH",
                "MR",
                "MU",
                "MX",
                "FM",
                "MD",
                "MC",
                "MN",
                "ME",
                "MA",
                "MZ",
                "MM",
                "NA",
                "NR",
                "NP",
                "NL",
                "NZ",
                "NI",
                "NE",
                "NG",
                "KP",
                "MK",
                "NO",
                "OM",
                "PK",
                "PW",
                "PS",
                "PA",
                "PG",
                "PY",
                "PE",
                "PH",
                "PL",
                "PT",
                "PR",
                "QA",
                "RO",
                "RU",
                "RW",
                "KN",
                "LC",
                "VC",
                "WS",
                "SM",
                "ST",
                "SA",
                "SN",
                "RS",
                "SC",
                "SL",
                "SG",
                "SK",
                "SI",
                "SB",
                "SO",
                "ZA",
                "KR",
                "SS",
                "ES",
                "LK",
                "SD",
                "SR",
                "SE",
                "CH",
                "SY",
                "TW",
                "TJ",
                "TZ",
                "TH",
                "TL",
                "TG",
                "TO",
                "TT",
                "TN",
                "TR",
                "TM",
                "TV",
                "UG",
                "UA",
                "AE",
                "GB",
                "US",
                "UY",
                "UZ",
                "VU",
                "VA",
                "VE",
                "VN",
                "YE",
                "ZM",
                "ZW"
              ],
              "enumTitles": [
                "Afghanistan (+93)",
                "Albania (+355)",
                "Algeria (+213)",
                "Andorra (+376)",
                "Angola (+244)",
                "Antigua and Barbuda (+1)",
                "Argentina (+54)",
                "Armenia (+374)",
                "Australia (+61)",
                "Austria (+43)",
                "Azerbaijan (+994)",
                "Bahamas (+1)",
                "Bahrain (+973)",
                "Bangladesh (+880)",
                "Barbados (+1)",
                "Belarus (+375)",
                "Belgium (+32)",
                "Belize (+501)",
                "Benin (+229)",
                "Bhutan (+975)",
                "Bolivia (+591)",
                "Bosnia and Herzegovina (+387)",
                "Botswana (+267)",
                "Brazil (+55)",
                "Brunei (+673)",
                "Bulgaria (+359)",
                "Burkina Faso (+226)",
                "Burundi (+257)",
                "Cabo Verde (+238)",
                "Cambodia (+855)",
                "Cameroon (+237)",
                "Canada (+1)",
                "Central African Republic (+236)",
                "Chad (+235)",
                "Chile (+56)",
                "China (+86)",
                "Colombia (+57)",
                "Comoros (+269)",
                "Congo (+242)",
                "Costa Rica (+506)",
                "Croatia (+385)",
                "Cuba (+53)",
                "Cyprus (+357)",
                "Czechia (+420)",
                "Côte d'Ivoire (+225)",
                "DR Congo (+243)",
                "Denmark (+45)",
                "Djibouti (+253)",
                "Dominica (+1)",
                "Dominican Republic (+1)",
                "Ecuador (+593)",
                "Egypt (+20)",
                "El Salvador (+503)",
                "Equatorial Guinea (+240)",
                "Eritrea (+291)",
                "Estonia (+372)",
                "Eswatini (+268)",
                "Ethiopia (+251)",
                "Fiji (+679)",
                "Finland (+358)",
                "France (+33)",
                "Gabon (+241)",
                "Gambia (+220)",
                "Georgia (+995)",
                "Germany (+49)",
                "Ghana (+233)",
                "Greece (+30)",
                "Grenada (+1)",
                "Guatemala (+502)",
                "Guinea (+224)",
                "Guinea-Bissau (+245)",
                "Guyana (+592)",
                "Haiti (+509)",
                "Honduras (+504)",
                "Hong Kong (+852)",
                "Hungary (+36)",
                "Iceland (+354)",
                "India (+91)",
                "Indonesia (+62)",
                "Iran (+98)",
                "Iraq (+964)",
                "Ireland (+353)",
                "Israel (+972)",
                "Italy (+39)",
                "Jamaica (+1)",
                "Japan (+81)",
                "Jordan (+962)",
                "Kazakhstan (+7)",
                "Kenya (+254)",
                "Kiribati (+686)",
                "Kosovo (+383)",
                "Kuwait (+965)",
                "Kyrgyzstan (+996)",
                "Laos (+856)",
                "Latvia (+371)",
                "Lebanon (+961)",
                "Lesotho (+266)",
                "Liberia (+231)",
                "Libya (+218)",
                "Liechtenstein (+423)",
                "Lithuania (+370)",
                "Luxembourg (+352)",
                "Madagascar (+261)",
                "Malawi (+265)",
                "Malaysia (+60)",
                "Maldives (+960)",
                "Mali (+223)",
                "Malta (+356)",
                "Marshall Islands (+692)",
                "Mauritania (+222)",
                "Mauritius (+230)",
                "Mexico (+52)",
                "Micronesia (+691)",
                "Moldova (+373)",
                "Monaco (+377)",
                "Mongolia (+976)",
                "Montenegro (+382)",
                "Morocco (+212)",
                "Mozambique (+258)",
                "Myanmar (+95)",
                "Namibia (+264)",
                "Nauru (+674)",
                "Nepal (+977)",
                "Netherlands (+31)",
                "New Zealand (+64)",
                "Nicaragua (+505)",
                "Niger (+227)",
                "Nigeria (+234)",
                "North Korea (+850)",
                "North Macedonia (+389)",
                "Norway (+47)",
                "Oman (+968)",
                "Pakistan (+92)",
                "Palau (+680)",
                "Palestine (+970)",
                "Panama (+507)",
                "Papua New Guinea (+675)",
                "Paraguay (+595)",
                "Peru (+51)",
                "Philippines (+63)",
                "Poland (+48)",
                "Portugal (+351)",
                "Puerto Rico (+1)",
                "Qatar (+974)",
                "Romania (+40)",
                "Russia (+7)",
                "Rwanda (+250)",
                "Saint Kitts and Nevis (+1)",
                "Saint Lucia (+1)",
                "Saint Vincent and the Grenadines (+1)",
                "Samoa (+685)",
                "San Marino (+378)",
                "Sao Tome and Principe (+239)",
                "Saudi Arabia (+966)",
                "Senegal (+221)",
                "Serbia (+381)",
                "Seychelles (+248)",
                "Sierra Leone (+232)",
                "Singapore (+65)",
                "Slovakia (+421)",
                "Slovenia (+386)",
                "Solomon Islands (+677)",
                "Somalia (+252)",
                "South Africa (+27)",
                "South Korea (+82)",
                "South Sudan (+211)",
                "Spain (+34)",
                "Sri Lanka (+94)",
                "Sudan (+249)",
                "Suriname (+597)",
                "Sweden (+46)",
                "Switzerland (+41)",
                "Syria (+963)",
                "Taiwan (+886)",
                "Tajikistan (+992)",
                "Tanzania (+255)",
                "Thailand (+66)",
                "Timor-Leste (+670)",
                "Togo (+228)",
                "Tonga (+676)",
                "Trinidad and Tobago (+1)",
                "Tunisia (+216)",
                "Turkey (+90)",
                "Turkmenistan (+993)",
                "Tuvalu (+688)",
                "Uganda (+256)",
                "Ukraine (+380)",
                "United Arab Emirates (+971)",
                "United Kingdom (+44)",
                "United States (+1)",
                "Uruguay (+598)",
                "Uzbekistan (+998)",
                "Vanuatu (+678)",
                "Vatican City (+39)",
                "Venezuela (+58)",
                "Vietnam (+84)",
                "Yemen (+967)",
                "Zambia (+260)",
                "Zimbabwe (+263)"
              ]
            }
          },
          "keepOnlyValid": {
            "title": "Keep only valid numbers",
            "type": "boolean",
            "description": "Drops numbers that cannot exist — wrong length for their country, or a prefix no operator uses. Off, they are kept and flagged, so you can see what your list was carrying.",
            "default": false
          },
          "keepOnlyMobile": {
            "title": "Keep only mobile numbers",
            "type": "boolean",
            "description": "Drops landlines, toll-free and premium numbers. Useful before any messaging campaign. In the United States and Canada the two cannot be told apart, so those numbers are kept.",
            "default": false
          },
          "deduplicate": {
            "title": "Remove duplicates",
            "type": "boolean",
            "description": "Two spellings of the same number — 0612345678 and +212612345678 — are the same line. Off, duplicates are kept and point at the first one through duplicateOf.",
            "default": true
          },
          "includeCarrier": {
            "title": "Add the carrier",
            "type": "boolean",
            "description": "The operator the number was issued to (Orange, Etisalat, STC…). Not available everywhere.",
            "default": true
          },
          "includeTimezone": {
            "title": "Add the time zone",
            "type": "boolean",
            "description": "The time zones the number belongs to — useful to call or message at a decent hour.",
            "default": true
          },
          "maxItems": {
            "title": "Maximum numbers",
            "minimum": 0,
            "type": "integer",
            "description": "A ceiling for the run. 0 means no ceiling.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}