{
  "openapi": "3.0.1",
  "info": {
    "title": "Phone Number Validator & Formatter – E.164, Country, Line Type",
    "description": "Validate and format phone numbers offline with Google libphonenumber metadata: E.164, international and national format, country, line type (mobile, fixed, toll-free, premium...). Clean CRM lists before an import or an SMS send. No live carrier lookup.",
    "version": "0.1",
    "x-build-id": "wex9ApL1t47o9CHE8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/far003~phone-number-validator-e164/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-far003-phone-number-validator-e164",
        "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/far003~phone-number-validator-e164/runs": {
      "post": {
        "operationId": "runs-sync-far003-phone-number-validator-e164",
        "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/far003~phone-number-validator-e164/run-sync": {
      "post": {
        "operationId": "run-sync-far003-phone-number-validator-e164",
        "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": "The numbers to check. Each entry is either a text such as \"+39 347 123 4567\" or an object {\"phone\": \"347 123 4567\", \"country\": \"IT\"} when this row has its own country (ISO 3166-1 alpha-2). Send numbers as text, not as JSON numbers (a number loses its leading zeros). Spaces, dots, dashes, brackets, \"00\" or \"+\" prefixes and extensions (ext, x, #) are fine. Empty and non-text entries are skipped for free. Use this list, a dataset (below), or both."
          },
          "datasetId": {
            "title": "Dataset ID or name (optional)",
            "type": "string",
            "description": "To clean a list that is already in Apify, give the ID or the name of one of your datasets here and say which field holds the phone number. The dataset is only read."
          },
          "phoneField": {
            "title": "Phone field of the dataset",
            "type": "string",
            "description": "Name of the field with the phone number in each dataset item. A path such as \"contact.phone\" is accepted. Required with a dataset ID."
          },
          "countryField": {
            "title": "Country field of the dataset (optional)",
            "type": "string",
            "description": "Name of the field with the country of each item (ISO 3166-1 alpha-2 such as \"IT\"). When it is empty or missing for an item, the default country is used."
          },
          "defaultCountry": {
            "title": "Default country",
            "type": "string",
            "description": "Two-letter ISO 3166-1 country code (IT, US, GB, DE...) used to read numbers written without \"+\" or an international prefix, when the row has no country of its own. A number that starts with \"+\" always keeps its own country. Leave empty only if all your numbers are international: a number written without \"+\" and with no country is free of charge and comes back as MISSING_COUNTRY, so nothing is read."
          },
          "convertVanityLetters": {
            "title": "Convert letters (vanity numbers)",
            "type": "boolean",
            "description": "Off (default): a number with letters is reported as not valid (CONTAINS_LETTERS). On: when the number part has 3 or more letters and nothing else than A-Z, they are turned into digits with the phone keypad (1-800-FLOWERS becomes 1-800-356-9377) and the row says so (`vanityConverted`).",
            "default": false
          },
          "dedupe": {
            "title": "Deliver each number once",
            "type": "boolean",
            "description": "On (default): the same number written in different ways (+39 347 123 4567, 0039 3471234567...) is delivered and charged once; the repetitions are free. Numbers with different extensions are different numbers. Off: every row gets its own result.",
            "default": true
          },
          "onlyValid": {
            "title": "Only valid numbers",
            "type": "boolean",
            "description": "On: only numbers that are valid are delivered and charged; the others are counted in the run summary and cost nothing. Off (default): invalid numbers are delivered too, with the reason, so you can fix them.",
            "default": false
          },
          "onlyNew": {
            "title": "Only numbers not seen before",
            "type": "boolean",
            "description": "On: numbers delivered by an earlier run that used the same memory are skipped for free. The memory is a key-value store in your account that keeps only salted SHA-256 hashes of the numbers, never a number. Off (default): no memory is read or written.",
            "default": false
          },
          "seenStoreName": {
            "title": "Name of the memory store",
            "type": "string",
            "description": "Name of the key-value store used by \"Only new\". Use one name per list or campaign. 3 to 63 characters: lowercase letters, digits and hyphens. Delete the store to forget everything.",
            "default": "phone-validator-seen-hashes"
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 10000000,
            "type": "integer",
            "description": "Stop after this many charged results have been delivered (free rows, such as MISSING_COUNTRY, do not count). Leave empty for no limit. Rows not reached are listed as a count in the run summary. The spending limit of the run is always respected as well."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}