Back to Docs

Lookup API

Phone validation, carrier lookup, and caller ID

Validation

Verify phone numbers

Carrier

Network information

Global

195+ countries

Real-time

Instant results

Dual-Key Authentication

API KeyPermanent

X-Smsly-Key-Id: sk_live_xxx

SDK KeyRotatable

X-SMSLY-SDK-KEY: sdk_live_xxx

Quick Start

Python
from smsly import SMSly

# === DUAL KEY SECURITY ===
# Two keys required (both can be in .env or embedded):
# 1. API Key - for authentication
# 2. SDK Key - for SDK validation

client = SMSly(
    api_key="setup_api_your_key",   # From dashboard
    sdk_key="setup_sdk_your_key"    # From dashboard
)

# Basic phone lookup
info = client.lookup.phone("+1234567890")
print(f"Country: {info.country_code}")
print(f"Type: {info.phone_type}")  # mobile, landline, voip
print(f"Valid: {info.valid}")

# Carrier lookup
carrier = client.lookup.carrier("+1234567890")
print(f"Carrier: {carrier.name}")
print(f"Network: {carrier.network_type}")

# Caller ID (CNAM) lookup
caller = client.lookup.caller("+1234567890")
print(f"Name: {caller.caller_name}")
print(f"Type: {caller.caller_type}")  # business, consumer

# Bulk lookup
results = client.lookup.bulk(["+1234567890", "+0987654321"])
for result in results:
    print(f"{result.phone}: {result.valid}")

API Endpoints

GET/v1/lookup/:phoneBasic phone lookup
GET/v1/lookup/:phone/carrierCarrier information
GET/v1/lookup/:phone/callerCaller name (CNAM)
POST/v1/lookup/bulkBulk phone lookup

Ready to validate numbers?

Get API Keys