GeoJS API

Beginner's Pick Geocoding / No Auth Required Beginner HTTPS CORS
Free to Use
82 A
Measured Score 0 50 100 Speed 26/30 Consistency 13/20 Security 20/20 Browser access 15/15 Transparency 8/15 TESTED 2026-08-10

Overview

GeoJS is a free, no-auth-required IP geolocation API that returns the approximate location of any IP address, including country, city, latitude, and longitude. It also supports ChatOps integrations for use in Slack or similar tools. Because it requires no API key, you can start using it immediately in any project.

Beginner Tip

Calling the /v1/ip/geo.json endpoint without specifying an IP address automatically geolocates the caller, which is perfect for detecting a visitor country on a website.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET https://get.geojs.io/v1/ip/geo.json
Result
HTTP 200 · application/json · 328 bytes · compressed
Response time
42 ms (median of 3) · fastest 36 ms
Transport
TLSv1.3 · TLS_AES_256_GCM_SHA384 · certificate issued by Google Trust Services
Browser CORS
Allowed — Access-Control-Allow-Origin: *
Served by
cloudflare
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
accuracy integer 50
area_code string 0
asn integer 9824
city string Chūō
continent_code string AS
country string Japan
country_code string JP
country_code3 string JPN
ip string 119.170.249.193
latitude string 33.8692
longitude string 130.8445
organization string AS9824 JCOM Co., Ltd.
organization_name string JCOM Co., Ltd.
region string Fukuoka

Captured Response

Captured from a real request to https://get.geojs.io/v1/ip/geo.json on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
{
  "accuracy": 50,
  "area_code": "0",
  "asn": 9824,
  "city": "Chūō",
  "continent_code": "AS",
  "country": "Japan",
  "country_code": "JP",
  "country_code3": "JPN",
  "ip": "119.170.249.193",
  "latitude": "33.8692",
  "longitude": "130.8445",
  "organization": "AS9824 JCOM Co., Ltd.",
  "organization_name": "JCOM Co., Ltd.",
  "region": "Fukuoka",
  "…": "(1 more fields)"
}

Field Reference

ip The IP address that was geolocated.
country Full country name associated with the IP address.
country_code ISO 3166-1 alpha-2 two-letter country code.
city Approximate city name for the IP address.
latitude Approximate latitude of the IP address location.
longitude Approximate longitude of the IP address location.

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://get.geojs.io/v1/ip/geo.json";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

How This API Fails

We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.

HTTP 404 Requesting a path that does not exist text/html

Returned an HTML error page rather than JSON — worth knowing if your client assumes every response can be parsed as JSON.

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

Inaccurate or missing city/region IP geolocation databases are not 100% accurate, especially for mobile or VPN users.
Use the country-level data for highest accuracy; city-level data may be off by hundreds of kilometers.
Incorrect location for a known IP The GeoJS database may be outdated for that IP block.
This is a known limitation of IP geolocation. Consider supplementing with the browser Geolocation API for higher precision.
429 Too Many Requests Excessive request rate from the same IP.
Cache the geolocation result on the server side and reuse it within a session rather than calling the API on every page load.

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 26/30
Consistency 13/20
Security 20/20
Browser access 15/15
Transparency 8/15
Endpoint Response Time 42ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Category Geocoding
Difficulty Beginner
Endpoint last called: 2026-08-10

Similar APIs

View All →