GeoJS API

⭐ Beginner's Pick Geocoding / No Auth Required Beginner HTTPS CORS
Free to Use Varies (check documentation)

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.

Available Data

IP address details
latitude and longitude
city and country
timezone
ISP information
IP address information

Example Response

JSON Response
{
  "ip": "203.0.113.42",
  "city": "San Francisco",
  "region": "California",
  "country_code": "US",
  "latitude": 37.7749,
  "longitude": -122.4194,
  "timezone": "America/Los_Angeles",
  "isp": "Example ISP"
}

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

const url = "https://www.geojs.io/";
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.

Common Errors & Troubleshooting

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.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 20/20
🔒 Security 15/15
🛠 Developer XP 20/20
✓ Reliability 7/15
Response Time 101ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Category Geocoding
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →