Locanium
Developers

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.

Base URL · https://api.locanium.com/v1

Quickstart

Grab a sandbox key, then call any endpoint with a bearer token. Here is a complete first request:

GET /v1/geoip
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 header
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.

GET/v1/geoip

geoip

Resolve any IP address to country, city, coordinates, timezone, currency and network.

Parameters
  • ipstring
    IPv4 or IPv6 address. Defaults to the caller’s IP.
GET /v1/geoip
200 OK
{
  "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"
}
GET/v1/geocode

gps

Reverse-geocode latitude/longitude into a formatted address and administrative area.

Parameters
  • latnumber, required
    Latitude in decimal degrees.
  • lngnumber, required
    Longitude in decimal degrees.
GET /v1/geocode
200 OK
{
  "formatted": "1600 Amphitheatre Pkwy, Mountain View, CA 94043",
  "city": "Mountain View",
  "region": "California",
  "postal_code": "94043",
  "country_code": "US"
}
GET/v1/timezone

timezone

Return the IANA time zone, UTC offset and local time for a location or IP.

Parameters
  • latnumber
    Latitude. Provide lat+lng or ip.
  • lngnumber
    Longitude.
  • ipstring
    Resolve the zone from an IP instead.
GET /v1/timezone
200 OK
{
  "timezone": "America/Los_Angeles",
  "utc_offset": "-07:00",
  "dst": true,
  "local_time": "2026-07-03T09:12:44-07:00"
}
GET/v1/currency

currency

Convert between currencies with live foreign-exchange rates.

Parameters
  • fromstring, required
    Source ISO-4217 code, e.g. USD.
  • tostring, required
    Target ISO-4217 code, e.g. EUR.
  • amountnumber
    Amount to convert. Defaults to 1.
GET /v1/currency
200 OK
{
  "from": "USD",
  "to": "EUR",
  "rate": 0.9213,
  "amount": 100,
  "result": 92.13,
  "timestamp": 1751558764
}
POST/v1/validate/email

email

Check syntax, MX records, deliverability, and flag disposable or role addresses.

Parameters
  • emailstring, required
    The email address to validate.
POST /v1/validate/email
200 OK
{
  "email": "[email protected]",
  "valid": true,
  "deliverable": true,
  "mx_found": true,
  "disposable": false,
  "role": false,
  "free": false
}
POST/v1/validate/phone

phone

Validate a phone number and return country, carrier and line type in E.164.

Parameters
  • phonestring, required
    Phone number in any format.
  • countrystring
    ISO country code to help parse local numbers.
POST /v1/validate/phone
200 OK
{
  "phone": "+14155552671",
  "valid": true,
  "country_code": "US",
  "carrier": "Verizon",
  "line_type": "mobile",
  "e164": "+14155552671"
}
POST/v1/validate/vat

vat

Verify an EU VAT number against VIES and return the registered company.

Parameters
  • vat_numberstring, required
    EU VAT number incl. country prefix.
POST /v1/validate/vat
200 OK
{
  "vat_number": "DE811907980",
  "valid": true,
  "country_code": "DE",
  "company_name": "Google Germany GmbH",
  "address": "ABC-Strasse 19, 20354 Hamburg"
}
POST/v1/validate/iban

iban

Validate an IBAN and return the bank, BIC and branch.

Parameters
  • ibanstring, required
    International Bank Account Number.
POST /v1/validate/iban
200 OK
{
  "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.

JavaScript / TypeScriptnpm install @locanium/sdk
Pythonpip install locanium
PHPcomposer require locanium/locanium
Gogo get github.com/locanium/locanium-go
Rubygem install locanium

Ready to build?

Book a demo and we’ll set you up with a production key the same day.

Book a demo
Get started

One API for geolocation, currency and identity checks. Book a demo and get a sandbox key the same day.