Phone validation, carrier lookup, and caller ID
Verify phone numbers
Network information
195+ countries
Instant results
X-Smsly-Key-Id: sk_live_xxx
X-SMSLY-SDK-KEY: sdk_live_xxx
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}")/v1/lookup/:phoneBasic phone lookup/v1/lookup/:phone/carrierCarrier information/v1/lookup/:phone/callerCaller name (CNAM)/v1/lookup/bulkBulk phone lookup