{
  "openapi": "3.0.1",
  "info": {
    "title": "Phone Number Lookup API",
    "description": "All-in-one phone intelligence API. Validates any number, returns carrier, line type (mobile/landline/VoIP), country, region, owner name (US/CA), fraud score, breach data, WhatsApp/Telegram presence, and reverse-lookup URLs in a single call. 240+ countries.",
    "version": "1.4",
    "x-build-id": "lulIwDhgnGJ0z7ksP"
  },
  "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 enrich (max 10,000 per run). Use E.164 format (e.g., '+12025551234') for best accuracy. Local formats like '(202) 555-1234' work if you also set defaultCountry. Each number is charged separately. NOT a search query — this is exact-match lookup only.",
            "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 format.",
            "default": "US"
          },
          "maxConcurrency": {
            "title": "Concurrent lookups",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Number of phone numbers processed in parallel. Higher = faster but may hit IPQS rate limits. 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 with one click. Free, no extra cost. Defaults to true.",
            "default": true
          },
          "includeWhatsAppCheck": {
            "title": "Check WhatsApp format validity (experimental)",
            "type": "boolean",
            "description": "Tests whether the number is in a format WhatsApp would accept (uses unauthenticated wa.me redirect). EXPERIMENTAL — without WhatsApp Business API auth (planned for v2), this only confirms format validity, not actual registration status. Set true if you want the field populated. Defaults to false.",
            "default": false
          },
          "includeTelegramCheck": {
            "title": "Check Telegram public profile",
            "type": "boolean",
            "description": "Tests whether the number has a public Telegram profile (uses t.me redirect). Returns public name + photo if profile exists, otherwise registered: false. Note: most Telegram users have private profiles and will return false even if registered. Defaults to true.",
            "default": true
          },
          "enableUnofficialSources": {
            "title": "Enable unofficial sources (v2 — coming soon)",
            "type": "boolean",
            "description": "Reserved for v2 — will enable Truecaller and GetContact unofficial APIs for global owner-name lookup. Currently a no-op flag (logs a notice). Use of unofficial sources may violate third-party Terms of Service in some jurisdictions; user is responsible for legal compliance.",
            "default": false
          },
          "maxCostUsd": {
            "title": "Max cost ceiling (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Hard spending cap per run (in USD). Actor stops gracefully when reached. Useful for bulk runs where you want to limit exposure. Leave at 0 for no cap. Example: 50 means actor stops after spending $50.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}