{
  "openapi": "3.0.1",
  "info": {
    "title": "Phone Number Lookup API — Carrier, Line Type, Validation",
    "description": "Validates phone numbers and returns E.164, country, and numbering-plan fields. Adds carrier and line type from IPQualityScore when credits remain, otherwise RapidAPI Veriphone. Fraud score and owner name only when IPQS returns them. WhatsApp is an experimental format check, off by default.",
    "version": "1.5",
    "x-build-id": "giIfMiJB7iiBts93Q"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~phone-number-lookup-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-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/khadinakbar~phone-number-lookup-api/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-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/khadinakbar~phone-number-lookup-api/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-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",
        "required": [
          "phoneNumbers"
        ],
        "properties": {
          "phoneNumbers": {
            "title": "Phone numbers to look up",
            "minItems": 1,
            "maxItems": 10000,
            "type": "array",
            "description": "Array of phone numbers to look up (max 10,000 per run). Use E.164 (e.g. '+12025551234') for best accuracy. Local formats like '(202) 555-1234' work if you also set defaultCountry. This is exact-match lookup, not a search query. Charged only when IPQS or Veriphone enrichment lands.",
            "items": {
              "type": "string"
            }
          },
          "defaultCountry": {
            "title": "Default country (ISO 3166-1 alpha-2)",
            "type": "string",
            "description": "Two-letter country code (e.g. 'US', 'GB', 'IN', 'DE') used as fallback when a phone number has no country code prefix. Only needed for local-format numbers like '(555) 123-4567'. Leave empty if all numbers are already in E.164.",
            "default": "US"
          },
          "maxConcurrency": {
            "title": "Concurrent lookups",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Number of phone numbers processed in parallel. Higher is faster but may hit IPQS or RapidAPI limits. RapidAPI Veriphone Basic is 1000 requests/hour; stay conservative. Default 20 is safe for most cases. Max 100. Lower this to 5-10 if you see rate-limit warnings.",
            "default": 20
          },
          "includeReverseLookupUrls": {
            "title": "Generate reverse-lookup URLs",
            "type": "boolean",
            "description": "Adds pre-built search URLs for Google, Whitepages, Truecaller, BeenVerified, Spokeo, 800notes, MrNumber, Facebook, and LinkedIn so you can investigate any number manually. Free, no extra event charge. Defaults to true.",
            "default": true
          },
          "includeWhatsAppCheck": {
            "title": "Check WhatsApp format validity (experimental)",
            "type": "boolean",
            "description": "Experimental format check using an unauthenticated wa.me redirect. This is not a WhatsApp registration lookup. It only tests whether the number looks like a WhatsApp-acceptable format. Defaults to false.",
            "default": false
          },
          "includeTelegramCheck": {
            "title": "Check Telegram public profile",
            "type": "boolean",
            "description": "Checks whether the number has a public Telegram profile via t.me. Returns public name and photo only when the profile is public. Most Telegram users have private profiles and will return registered: false even if they use Telegram. Defaults to true.",
            "default": true
          },
          "enableUnofficialSources": {
            "title": "Enable unofficial sources (reserved)",
            "type": "boolean",
            "description": "Reserved for a later version. Currently a no-op flag that logs a notice. Use of unofficial sources may violate third-party Terms of Service in some jurisdictions; you are responsible for legal compliance.",
            "default": false
          },
          "maxCostUsd": {
            "title": "Max cost ceiling (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Hard spending cap per run in USD, based on billed phone-looked-up events. The Actor stops gracefully when reached. Format-only rows do not count toward this cap. Leave at 0 for no cap.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}