ipapi.co API

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

Overview

ipapi.co is a simple REST API that returns the geolocation of any IP address, including country, city, and currency. It requires no authentication for up to 30,000 requests per day, making it ideal for quick prototypes. Just call the URL with an IP or leave it blank to look up the caller own address.

💡

Beginner Tip

To get your own IP location, call https://ipapi.co/json/ with no IP in the URL and the API automatically detects the caller. For production use, add your API key to avoid rate limits.

Available Data

IP address information
geographic location
ASN and ISP data

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from ipapi.co",
    "description": "Find IP address location information",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

ip The IP address that was looked up.
country_name Full name of the country, e.g. United States.
city Name of the city associated with the IP address.
timezone IANA time zone string such as America/Chicago.
currency Three-letter ISO 4217 currency code for the country, e.g. USD.
org Organization or ISP name associated with the IP, often prefixed by AS number.

Implementation Example

// ⚠️ Note: This URL may be a documentation page. Check official docs for actual API endpoint.
const url = "https://ipapi.co/api/";
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

429 RateLimited You have exceeded 30,000 requests per day on the free unauthenticated tier.
Add your API key as a query parameter: ?key=YOUR_API_KEY to increase your limit.
Reserved IP Address You passed a private IP like 127.0.0.1 or 192.168.x.x.
Use a publicly routable IP address. For self-testing omit the IP to auto-detect your own.
Field is null Some fields like org or timezone may be missing for certain IPs.
Always check for null before using a field value in your application.

Matrix Score Breakdown

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

Fully tested on Apr 5, 2026

Technical Specifications

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

Alternatives to ipapi.co

Technical alternatives for different use cases.

Basic IP geolocation with free tier

Better For

Budget-friendly IP geolocation

Trade-off

Data accuracy and field coverage

Free tier without API key for basic lookups

Better For

Bulk lookups and enterprise-grade reliability

Trade-off

No-signup IP geolocation for prototyping

More data fields including security and connection info

Better For

Comprehensive IP intelligence with security data

Trade-off

Free no-auth lookups for quick prototyping

Similar APIs

View All →