Overview

GeoJS provides a set of APIs for IP-based geolocation, allowing developers to retrieve geographical information associated with an IP address. This includes data such as country, city, latitude, and longitude. Established in 2011, GeoJS focuses on delivering a simple, accessible service for obtaining geodata. The API is designed for ease of integration, featuring a RESTful interface that does not require complex authentication for standard usage, making it suitable for rapid development and deployment.

The primary use cases for GeoJS involve scenarios where an application needs to determine a user's approximate location without requiring explicit location permissions or GPS data. This can be valuable for purposes such as displaying localized content, implementing geographical access restrictions, analyzing traffic origins, or pre-filling forms with country information. For instance, an e-commerce site might use GeoJS to suggest the local currency or display relevant product recommendations based on the user's inferred country. Similarly, content providers might use it to enforce regional content licensing agreements.

GeoJS is particularly well-suited for small to medium-sized projects or individual developers who need a reliable and cost-effective solution for basic IP geolocation lookups. Its free tier, which offers 1,500 requests per hour, supports development and low-volume applications. The service is built to be straightforward, minimizing the learning curve and enabling developers to quickly add geolocation capabilities to their web or mobile applications. While it provides essential geographical data, it does not offer advanced features like reverse geocoding (converting coordinates to addresses) or detailed street-level mapping, distinguishing it from more comprehensive geospatial platforms like the ArcGIS Geocoding Service.

The API's simplicity extends to its documentation, which offers clear examples across multiple programming languages, ensuring developers can implement the service efficiently. GeoJS's core offerings include an IP Geolocation API that returns detailed location information and an IP Address Lookup API that can validate and provide basic details about an IP. The service emphasizes quick integration, making it a practical choice for developers prioritizing speed and simplicity over extensive geospatial feature sets.

Key features

  • IP Geolocation API: Provides detailed geographical data including country, city, region, latitude, longitude, and ISP information based on an IP address. This allows applications to tailor content or services to specific locations.
  • IP Address Lookup API: A specialized endpoint for validating IP addresses and retrieving basic network information, useful for security monitoring or network analysis.
  • GeoLocation Lookup API: An alternative endpoint that bundles the core geolocation data into a single, easy-to-parse response, simplifying integration for common use cases.
  • RESTful Interface: The API uses standard HTTP methods (GET) and returns data in JSON format, aligning with modern web development practices and ensuring compatibility across various platforms.
  • CORS Support: Enables direct client-side integration from web browsers, allowing JavaScript applications to make requests without proxying through a backend server, which streamlines development.
  • Free Tier Availability: Offers a generous free tier of 1,500 requests per hour, making it accessible for testing, development, and low-volume production applications.
  • Multi-language Examples: Documentation includes code examples for popular languages such as JavaScript, Python, PHP, Ruby, and Go, facilitating quick adoption by developers regardless of their preferred stack.

Pricing

GeoJS offers a free tier and several paid plans scaled by request volume. Pricing is current as of May 2026.

Plan Monthly Requests Price Per Month Features
Free Up to 1,500/hour (approx. 1,080,000/month) $0 Standard IP geolocation, CORS support
Pro 500,000 $10 Includes standard features, suitable for small applications
Business 2,000,000 $30 Enhanced rate limits, priority support
Enterprise Custom Contact for quote High volume, dedicated support, custom solutions

For detailed and up-to-date pricing information, refer to the GeoJS pricing page.

Common integrations

GeoJS's simple RESTful API design allows integration with virtually any platform capable of making HTTP requests. Common integration patterns include:

  • Web Applications (Client-side JavaScript): Directly integrate into front-end JavaScript code to fetch user location data for personalization or analytics, leveraging CORS support.
  • Backend Services (Python, Node.js, PHP, Go, Ruby): Incorporate into server-side logic to process IP addresses from incoming requests, enriching data before storage or further processing.
  • Marketing and Analytics Platforms: Integrate with custom scripts on websites to enhance visitor data with geographical context for more targeted marketing campaigns or detailed analytics reports.
  • Content Delivery Networks (CDNs): While CDNs often have their own geolocation capabilities, GeoJS can serve as a supplementary or fallback option for specific edge cases or custom routing logic.
  • Security and Fraud Detection Systems: Use IP geolocation to flag suspicious activity originating from unexpected regions or to enforce geographical access policies within custom security solutions.

Alternatives

  • IPinfo: Offers comprehensive IP data including geolocation, ASN, company, and more, with a focus on data accuracy and developer tools.
  • Abstract API: Provides a suite of APIs, including a dedicated IP Geolocation API, known for its ease of use and consistent data.
  • Geoapify: A comprehensive location platform offering geocoding, reverse geocoding, routing, and maps, alongside IP geolocation, for a wider range of geospatial needs.
  • Google Maps Geolocation API: Part of the Google Maps Platform, providing location detection based on cell towers and WiFi nodes, in addition to IP addresses, for higher accuracy in certain contexts.

Getting started

To begin using GeoJS, you can make a simple HTTP GET request to its API endpoints. The following example demonstrates how to retrieve geolocation data for the requesting IP address using cURL, a common command-line tool for making network requests. This basic request will return a JSON object containing details such as country, city, and coordinates.

curl -s https://get.geojs.io/v1/ip/geo.json

The response will be a JSON object similar to this (values will vary based on IP address):

{
  "accuracy": 100,
  "latitude": "34.0522",
  "longitude": "-118.2437",
  "asn": "AS39600",
  "organization_name": "Google LLC",
  "country": "United States",
  "region": "California",
  "city": "Los Angeles",
  "timezone": "America/Los_Angeles",
  "ip": "8.8.8.8",
  "country_code": "US"
}

For integration into a web application using JavaScript, you can use the fetch API:

fetch('https://get.geojs.io/v1/ip/geo.json')
  .then(response => response.json())
  .then(data => {
    console.log('Your IP is:', data.ip);
    console.log('You are in:', data.city + ', ' + data.country);
  })
  .catch(error => console.error('Error fetching geolocation:', error));

This JavaScript snippet fetches the geolocation data and logs the IP address and inferred location to the console. The GeoJS API reference provides additional details on available endpoints and response formats.