Locanium API reference
One REST API for geolocation and validation. Bearer-token auth, JSON in and out, one key for all eight endpoints. Make your first call in minutes.
Quickstart
Grab a sandbox key, then call any endpoint with a bearer token. Here is a complete first request:
curl "https://api.locanium.com/v1/geoip?ip=8.8.8.8" \ -H "Authorization: Bearer sk_live_..."
Authentication
Authenticate every request with your secret key in the Authorization header. Keys are scoped to sandbox or live — never ship a secret key in client-side code.
Authorization: Bearer sk_live_51H...
Making requests
GET endpoints take query parameters; POST endpoints take a JSON body. Every response is JSON and every error uses a standard HTTP status code with a machine-readable message.
Endpoints
Eight endpoints across two families. One key works for all of them.
/v1/geoipgeoip
Resolve any IP address to country, city, coordinates, timezone, currency and network.
Parameters- IPv4 or IPv6 address. Defaults to the caller’s IP.
ipstring
{
"ip": "8.8.8.8",
"country": "United States",
"country_code": "US",
"city": "Mountain View",
"latitude": 37.386,
"longitude": -122.084,
"timezone": "America/Los_Angeles",
"currency": "USD",
"isp": "Google LLC",
"asn": "AS15169"
}/v1/geocodegps
Reverse-geocode latitude/longitude into a formatted address and administrative area.
Parameters- Latitude in decimal degrees.
latnumber, required - Longitude in decimal degrees.
lngnumber, required
{
"formatted": "1600 Amphitheatre Pkwy, Mountain View, CA 94043",
"city": "Mountain View",
"region": "California",
"postal_code": "94043",
"country_code": "US"
}/v1/timezonetimezone
Return the IANA time zone, UTC offset and local time for a location or IP.
Parameters- Latitude. Provide lat+lng or ip.
latnumber - Longitude.
lngnumber - Resolve the zone from an IP instead.
ipstring
{
"timezone": "America/Los_Angeles",
"utc_offset": "-07:00",
"dst": true,
"local_time": "2026-07-03T09:12:44-07:00"
}/v1/currencycurrency
Convert between currencies with live foreign-exchange rates.
Parameters- Source ISO-4217 code, e.g. USD.
fromstring, required - Target ISO-4217 code, e.g. EUR.
tostring, required - Amount to convert. Defaults to 1.
amountnumber
{
"from": "USD",
"to": "EUR",
"rate": 0.9213,
"amount": 100,
"result": 92.13,
"timestamp": 1751558764
}/v1/validate/emailCheck syntax, MX records, deliverability, and flag disposable or role addresses.
Parameters- The email address to validate.
emailstring, required
{
"email": "[email protected]",
"valid": true,
"deliverable": true,
"mx_found": true,
"disposable": false,
"role": false,
"free": false
}/v1/validate/phonephone
Validate a phone number and return country, carrier and line type in E.164.
Parameters- Phone number in any format.
phonestring, required - ISO country code to help parse local numbers.
countrystring
{
"phone": "+14155552671",
"valid": true,
"country_code": "US",
"carrier": "Verizon",
"line_type": "mobile",
"e164": "+14155552671"
}/v1/validate/vatvat
Verify an EU VAT number against VIES and return the registered company.
Parameters- EU VAT number incl. country prefix.
vat_numberstring, required
{
"vat_number": "DE811907980",
"valid": true,
"country_code": "DE",
"company_name": "Google Germany GmbH",
"address": "ABC-Strasse 19, 20354 Hamburg"
}/v1/validate/ibaniban
Validate an IBAN and return the bank, BIC and branch.
Parameters- International Bank Account Number.
ibanstring, required
{
"iban": "DE89370400440532013000",
"valid": true,
"country_code": "DE",
"bank": "Commerzbank",
"bic": "COBADEFFXXX",
"branch": "Köln"
}Errors
Locanium uses conventional HTTP status codes. 4xx codes indicate a problem with your request; 5xx codes are safe to retry.
200 OKRequest succeeded; the body contains the result.400 Bad RequestA parameter is missing or malformed.401 UnauthorizedMissing or invalid API key.402 Payment RequiredPlan quota exceeded — upgrade or wait for reset.404 Not FoundUnknown endpoint or resource.429 Too Many RequestsRate limit hit — back off and retry.5xxServer error. Safe to retry with exponential backoff.
Rate limits
Limits scale with your plan: Developer 10,000 requests/month, Growth 500,000/month, Enterprise custom. Bursts are capped per second; a 429 includes a Retry-After header.
SDKs
Official SDKs wrap auth, retries and typing. Anything else can call the REST API directly.
npm install @locanium/sdkpip install locaniumcomposer require locanium/locaniumgo get github.com/locanium/locanium-gogem install locanium