VisitorGeo API
One authenticated GET returns the caller’s approximate location and network. Everything is an IP-based estimate.
Endpoint
GET https://api.visitorgeo.com/v1/YOUR_KEY
The key is the 16-character key issued at signup. The response describes the caller of the request — i.e. the browser or server that made the GET. Call it from your visitor’s browser to geolocate that visitor.
Response fields
All fields are optional: any value Cloudflare cannot resolve for a given IP
is omitted from the JSON rather than returned empty.
estimated is always present and always true.
| Field | Type | Notes |
|---|---|---|
estimated | boolean | Always true. All data is an IP-derived estimate. |
ip | string | The caller’s IP address. |
country | string | ISO 3166-1 alpha-2 country code, e.g. US. |
city | string | Best-guess city name. |
region | string | First-level subdivision (state/province) name. |
region_code | string | Subdivision code, e.g. CA. |
postal_code | string | Postal/ZIP code for the IP’s area. |
metro_code | string | DMA/metro code (US only, when available). |
latitude | number | Area centroid latitude. Not a GPS fix — accuracy is city/region level. |
longitude | number | Area centroid longitude. Same caveat as latitude. |
timezone | string | IANA timezone, e.g. America/Los_Angeles. |
continent | string | Two-letter continent code. |
asn | number | Autonomous System Number of the IP’s network. |
as_organization | string | Name of the network operator. |
colo | string | Cloudflare data center (IATA code) that served the request. |
CORS
Every response sends Access-Control-Allow-Origin: *, so you can
call the API directly from browser JavaScript on any origin. Preflight
OPTIONS requests are answered with 204. All responses
send Cache-Control: no-store.
Error codes
| Status | Body | Meaning |
|---|---|---|
403 | {"error":"unknown or disabled account key"} | The key is not recognized or has been disabled. |
404 | {"error":"not found"} | Bad path, or a malformed key (must be 12–24 lowercase alphanumeric characters). |
Fair use
Keys are metered per lookup. Please don’t share a key across unrelated properties or attempt to defeat metering — usage that looks abusive may have its key disabled. Billing is $1 per million lookups with the first 100,000 lookups each month free; see pricing.