Copies a setup prompt for your AI coding tool
Set up with your AI agent. Works with Claude Code, Cursor, Codex, VS Code and any agent that can run commands

AI coding agents: run curl -s https://ipbase.com/agents.md and follow it (API key, first call, plans).

IP Geolocation API for IP lookup and VPN detection

Send any IPv4 or IPv6 address and get its country, city, coordinates, time zone, ISP and ASN back as JSON. VPN, proxy and Tor flags with a threat score from the Medium plan.

150 free requests a month. No credit card.

Your first request
curl "https://api.ipbase.com/v2/info?ip=1.1.1.1" \
  -H "apikey: YOUR_API_KEY"

What the API returns for your IP address. Try any other:

Just one address? Look up any IP for free, no sign-up.

Trusted by tech companies around the world

Customer logos: SAP, Accenture, Heineken, Oracle, Microsoft and Volkswagen

Start free, pay when you grow

Every plan returns location, connection, time zone and currency data and takes batch requests. VPN, proxy and Tor detection is on the Medium plan and above. Prices per month in US dollars, excl. VAT; yearly billing gives 2 months free.

Free

$0 /month

150 requests a month

  • – No VPN or proxy data
  • – No ASN API
  • ✓ No credit card
Get a free API key

Small

$9.99 /month

65,000 requests a month

  • – No VPN or proxy data
  • ✓ ASN API
Choose Small

Medium VPN detection

$39.99 /month

650,000 requests a month

  • ✓ VPN, proxy and threat data
  • ✓ ASN API
Choose Medium

Large

$89.99 /month

2,500,000 requests a month

  • ✓ VPN, proxy and threat data
  • ✓ ASN API
Choose Large

Business

$199 /month

6,000,000 requests a month

  • ✓ VPN, proxy and threat data
  • ✓ ASN API
Choose Business

Compare every plan and feature · More than 6,000,000 requests a month? Ask us about Enterprise

What the IP geolocation API returns

One call to /v2/info returns these objects for an IPv4 or IPv6 address. Try it on any address with the free IP lookup.

location.country
Country name, ISO alpha-2 and alpha-3 codes, calling codes, flag emoji and EU membership.
location.region, location.city, location.zip
Region (with ISO code), city and postal code.
location.latitude, location.longitude
Coordinates of the location.
location.continent
Continent code and name.
connection
ASN, organization, ISP and the network range of the address.
timezone
Time zone ID, current local time, abbreviation, UTC offset and daylight saving.
security
VPN, proxy, Tor, data center and abuse flags with a threat score (Medium plan and above).

Related APIs: IP lookup API · VPN & proxy detection API · ASN API · Reverse IP API

Built for developers

Plain REST and JSON, code examples, client libraries and an OpenAPI spec. Load the spec into your API client to try every endpoint before you write a line of code.

Integration Documentation

Why use ipbase.com?

database

Global coverage

We rebuild our IP data regularly from several sources, for IPv4 and IPv6 addresses.

fast

Fast at any scale

Our infrastructure serves requests with industry-leading uptime. Location, network and security data are read from a local copy of the IP data, not from a third-party API. See the live uptime on our status page.

reliable

Quick to integrate

A plain REST API with thorough documentation, so integration takes minutes, not days.

Free IP tools

Look up an address, see your own IP and provider, or work out subnets and CIDR blocks in your browser. No sign-up needed. The lookups show VPN, proxy and Tor flags, ASN data and hosted domains too.

All free tools · Cloud and crawler IP ranges

Guides for developers

All guides · API comparisons · Cloud and crawler IP ranges

IP geolocation API: FAQ

What is an IP geolocation API?

An API that returns the location of an IP address, such as its country, region, city and coordinates, usually together with the network that owns it. ipbase also returns the time zone and, on the Medium plan and above, VPN, proxy and Tor flags.

How do I look up the location of an IP address?

Send GET https://api.ipbase.com/v2/info?ip=1.1.1.1 with your API key in the apikey header. Leave out the ip parameter to look up the address the request comes from.

Does the API support IPv6?

Yes. /v2/info accepts IPv4 and IPv6 addresses.

Can I look up many IP addresses at once?

Yes. POST /v2/batch looks up to 1,000 IP addresses per request with an API key (100 in a GET query string); each address counts as one request of your quota.

Is the IP geolocation API free?

Yes. The free plan includes 150 requests a month with location data and batch lookups, limited to 10 requests a minute. No credit card is required.

Does the free plan include VPN detection?

No. VPN, proxy and Tor detection starts on the Medium plan ($39.99 a month). A free key gets the security object with every field set to null, so you can build against the response before you upgrade.

What happened to freegeoip.app?

freegeoip.app is now ipbase, and freegeoip.app redirects here. The IP geolocation API answers at https://api.ipbase.com/v2/info: create a free API key and send it in the apikey header.

Get started for free

150 free requests every month. Sign up, copy your API key and make your first call in a minute. No credit card required.