{
  "openapi": "3.0.1",
  "info": {
    "title": "Phone Number Validator: E.164, Country & Line Type",
    "description": "Validate and format phone numbers in bulk, offline, with Google libphonenumber data: valid or not, E.164, national and international format, country, line type (mobile, landline, VoIP, toll-free) and the reason when a number is invalid. Finds numbers in pasted text too.",
    "version": "1.0",
    "x-build-id": "PliFvArKMzfXqGaBS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hydrocore~phone-number-validator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hydrocore-phone-number-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/hydrocore~phone-number-validator/runs": {
      "post": {
        "operationId": "runs-sync-hydrocore-phone-number-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/hydrocore~phone-number-validator/run-sync": {
      "post": {
        "operationId": "run-sync-hydrocore-phone-number-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": {
          "phoneNumbers": {
            "title": "Phone numbers",
            "type": "array",
            "description": "Phone numbers in any format, one per line: +1 650-253-0000, (212) 555-0123, 0049 30 901820, 07911 123456. Numbers without a + country code are read with the default country below. The prefilled example list is used when the input is empty; it is ignored when you paste text.",
            "default": [
              "+1 650-253-0000",
              "(212) 555-0123",
              "+44 20 7946 0958",
              "+33 6 12 34 56 78",
              "+1 800 555 0199 ext. 12",
              "12345"
            ],
            "items": {
              "type": "string"
            }
          },
          "text": {
            "title": "Or paste text that contains numbers",
            "type": "string",
            "description": "Optional. Free text (an email signature, a web page, a CSV column). Every phone number found in it is checked as if you had added it above. Up to 200,000 characters."
          },
          "defaultCountry": {
            "title": "Default country",
            "type": "string",
            "description": "Two-letter ISO country code used for numbers written without a + country code (for example US, GB, DE, IN). Default US. Leave empty to accept only international (+) numbers.",
            "default": "US"
          },
          "onlyValid": {
            "title": "Only valid numbers",
            "type": "boolean",
            "description": "Save only valid numbers. Invalid numbers are then dropped and not charged. Default false.",
            "default": false
          },
          "lineTypes": {
            "title": "Line types",
            "type": "array",
            "description": "Keep only these line types (empty = all). Invalid numbers have no line type, so they are dropped when this filter is set. Dropped numbers are not charged.",
            "items": {
              "type": "string",
              "enum": [
                "mobile",
                "fixedLine",
                "fixedLineOrMobile",
                "voip",
                "tollFree",
                "premiumRate",
                "sharedCost",
                "personalNumber",
                "pager",
                "uan",
                "voicemail",
                "unknown"
              ],
              "enumTitles": [
                "Mobile",
                "Landline (fixed line)",
                "Landline or mobile (country does not tell them apart, e.g. US/CA)",
                "VoIP",
                "Toll-free",
                "Premium rate",
                "Shared cost",
                "Personal number",
                "Pager",
                "UAN (company number)",
                "Voicemail",
                "Unknown type"
              ]
            }
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Keep only numbers from these ISO country codes, for example US, CA (empty = all). Dropped numbers are not charged.",
            "items": {
              "type": "string"
            }
          },
          "dedupe": {
            "title": "Remove duplicates",
            "type": "boolean",
            "description": "Check each number once even when it is written in different ways (+16502530000 and (650) 253-0000). Duplicates are not charged. Default true.",
            "default": true
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "input",
              "country",
              "lineType",
              "invalidFirst"
            ],
            "type": "string",
            "description": "Order of the saved rows. Sorting happens before the limit. Default input order.",
            "default": "input"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Most numbers to save (and charge) in one run. Default 1,000.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}