{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Phone Number Validator - Format, Type & Country",
    "description": "Validate and format phone numbers in bulk, offline: valid or not, E.164 / international / national format, country, line type (mobile, fixed line, toll free, VoIP) and time zones. CSV upload or another Actor's dataset. Invalid numbers are free. $0.80 per 1,000.",
    "version": "0.1",
    "x-build-id": "ecXj7Px6WiEG6Xqwn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tidytools~phone-validator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tidytools-phone-validator",
        "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/tidytools~phone-validator/runs": {
      "post": {
        "operationId": "runs-sync-tidytools-phone-validator",
        "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/tidytools~phone-validator/run-sync": {
      "post": {
        "operationId": "run-sync-tidytools-phone-validator",
        "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": {
          "phones": {
            "title": "Phone numbers",
            "type": "array",
            "description": "One number per line (use Bulk edit to paste a whole list). Any common spelling works: +1 (650) 253-0000, 0044 20 7946 0958, tel: links, \"ext. 12\". Numbers without a +country code need \"Default country\". Entries with fewer than 3 digits get a free error row.",
            "items": {
              "type": "string"
            }
          },
          "defaultCountry": {
            "title": "Default country",
            "type": "string",
            "description": "Two-letter country code (ISO 3166, e.g. US, GB, DE, TW) used for numbers written without a +country code, such as \"(650) 253-0000\" or \"0912 345 678\". Empty = such numbers are reported invalid (free) with reason \"no country\". Numbers with a + are always read with their own country code."
          },
          "outputFormat": {
            "title": "Format of the \"phone\" column",
            "enum": [
              "E164",
              "INTERNATIONAL",
              "NATIONAL",
              "RFC3966"
            ],
            "type": "string",
            "description": "Every row has all four formats; this one also goes into the \"phone\" column and the clean list VALID_NUMBERS.",
            "default": "E164"
          },
          "phonesText": {
            "title": "Or paste a list",
            "type": "string",
            "description": "Numbers separated by new lines, semicolons, tabs or \" / \", e.g. a column copied from a spreadsheet. Spaces inside a number are fine."
          },
          "csvFile": {
            "title": "Or upload a CSV file",
            "type": "string",
            "description": "A CSV or TSV file (up to 50 MB), or a link to one (e.g. a Google Sheets \"Publish to the web\" CSV link). The column named like \"phone\" or \"mobile\" is used, or the column with the most numbers; set \"CSV column\" to choose. Excel files: save as CSV first."
          },
          "csvColumn": {
            "title": "CSV column (optional)",
            "type": "string",
            "description": "Header name (e.g. \"Mobile Phone\") or column number (1 = first) of the numbers in the CSV file. Empty = detect automatically."
          },
          "datasetId": {
            "title": "Or read from a dataset",
            "type": "string",
            "description": "ID of a dataset from another run, e.g. Contact Details Extractor or a lead scraper. Every number in the chosen field is validated (fields holding several numbers, such as a \"phones\" array, are expanded)."
          },
          "datasetField": {
            "title": "Dataset field (optional)",
            "type": "string",
            "description": "Field with the numbers (dot paths allowed, e.g. \"contact.phone\"). Empty = the first field named like phones/phone/phoneNumber, or the field whose values look like phone numbers."
          },
          "keepFields": {
            "title": "Copy these source columns to the output",
            "type": "array",
            "description": "For CSV and dataset input: column or field names to copy into each row's sourceFields (e.g. \"name\", \"company\"), so the result maps back to your list.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "skipInvalid": {
            "title": "Leave invalid numbers out of the results",
            "type": "boolean",
            "description": "On: the dataset holds valid numbers only (invalid ones are still counted in SUMMARY). Off: every input gets a row, with the reason when it is invalid. Invalid numbers are free either way.",
            "default": false
          },
          "dedupe": {
            "title": "Merge duplicate numbers",
            "type": "boolean",
            "description": "Validate (and charge) each number once, comparing the E.164 form, so \"0912 345 678\" and \"+886 912 345 678\" count as one. The row gets duplicates = how many more times it appeared. Turn off to get one row per input line.",
            "default": true
          },
          "maxPhones": {
            "title": "Max numbers",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Cost cap: at most this many unique numbers are processed per run ($0.80 per 1,000 valid numbers on the Free plan). The rest are listed in SUMMARY.notProcessed.",
            "default": 100000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}