{
  "openapi": "3.0.1",
  "info": {
    "title": "Phone Number Lookup API: Line Type, Carrier and Fraud Risk",
    "description": "Phone number lookup and validation API for fraud prevention: E.164 formatting, line type and carrier, SMS pumping risk score, line status, caller name, reassigned number, SIM swap, call forwarding and identity match, via the Twilio Lookup v2 API. Bring your own key.",
    "version": "0.1",
    "x-build-id": "uLFSmGPs7ihGKzULO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~phone-number-lookup-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-phone-number-lookup-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~phone-number-lookup-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-phone-number-lookup-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~phone-number-lookup-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-phone-number-lookup-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 do",
            "enum": [
              "lookup",
              "identityMatch"
            ],
            "type": "string",
            "description": "Each mode calls the documented Twilio Lookup v2 route GET /v2/PhoneNumbers/{PhoneNumber} with your own Twilio credentials. Nothing is written to your Twilio account.",
            "default": "lookup"
          },
          "apiKey": {
            "title": "Twilio credentials (SID:secret)",
            "type": "string",
            "description": "Your own Twilio API key SID and secret written as SID:secret, for example SKxxxxxxxx:yourSecret (create a Standard API key in the Twilio Console under Account, API keys and tokens). An Account SID and Auth Token as ACxxxxxxxx:authToken also work. You may instead paste the secret alone here and put the SID in the Key SID field. Sent only as HTTP Basic auth to the Twilio Lookup host and removed from every log line. Leave empty to use the DATA_API_KEY secret in the same SID:secret form."
          },
          "keySid": {
            "title": "Key SID (optional)",
            "type": "string",
            "description": "Only when the credentials field holds the secret alone: the API key SID (SK followed by 32 characters) or Account SID (AC followed by 32 characters) that goes with it. The SID is an identifier, not a secret."
          },
          "region": {
            "title": "Twilio region",
            "enum": [
              "us1",
              "ie1"
            ],
            "type": "string",
            "description": "US1 calls lookups.twilio.com (the default). IE1 calls lookups.dublin.ie1.twilio.com and needs an API key created for the IE1 region.",
            "default": "us1"
          },
          "countryCode": {
            "title": "Default country",
            "type": "string",
            "description": "Two-letter ISO country code (such as US, GB or DE) used for numbers written in national format, without a + prefix. Leave empty and Twilio reads such numbers as US numbers. Numbers in E.164 format (+447772000001) ignore it."
          },
          "phoneNumbers": {
            "title": "Phone numbers",
            "type": "array",
            "description": "Phone number lookup. One phone number per line, in E.164 format (+14155552671) or national format with a default country. Spaces, dashes, dots and brackets are removed. Duplicates are sent once, and lines that are not phone numbers are skipped for free.",
            "items": {
              "type": "string"
            }
          },
          "dataPackages": {
            "title": "Data packages",
            "type": "array",
            "description": "Phone number lookup. The Twilio paid data packages to add. Leave empty for the free Basic Lookup only (validity and formatting). Twilio bills each package to your account. Reassigned number, SIM swap and call forwarding need carrier registration and approval on your Twilio account first.",
            "items": {
              "type": "string",
              "enum": [
                "line_type_intelligence",
                "sms_pumping_risk",
                "line_status",
                "caller_name",
                "reassigned_number",
                "sim_swap",
                "call_forwarding"
              ],
              "enumTitles": [
                "Line type and carrier (worldwide)",
                "SMS pumping risk score (worldwide)",
                "Line status: active, reachable, inactive (beta)",
                "Caller name and type (US numbers only)",
                "Reassigned number (US only, needs approval and a last verified date)",
                "SIM swap (private beta, needs approval)",
                "Call forwarding (UK carriers, private beta, needs approval)"
              ]
            },
            "default": [
              "line_type_intelligence"
            ]
          },
          "lastVerifiedDate": {
            "title": "Last verified date",
            "type": "string",
            "description": "Reassigned number package only, and then required: the date you obtained consent to contact the numbers or last confirmed them, as YYYYMMDD or YYYY-MM-DD. Twilio answers whether each number was reassigned to a new user since that date."
          },
          "identityRecords": {
            "title": "Identity records",
            "type": "array",
            "description": "Identity match. One object per person to verify, with phoneNumber and the details that person gave you: firstName, lastName, addressLine1, addressLine2, city, state, postalCode, addressCountryCode (two letters) and dateOfBirth (YYYYMMDD or YYYY-MM-DD). Twilio recommends firstName, lastName and addressLine1 as the minimum. These details are sent to Twilio only and are never written to the dataset, which holds only the match levels. Example: [{\"phoneNumber\": \"+14155552671\", \"firstName\": \"John\", \"lastName\": \"Doe\", \"addressLine1\": \"321 Main Street\", \"city\": \"New York\", \"state\": \"NY\", \"postalCode\": \"10021\", \"dateOfBirth\": \"19901214\"}]."
          },
          "maxResults": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "The run stops after this many rows. It also caps how many numbers are looked up.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}