Developer-first IP context API

ExplainIP API documentation

This page describes the public HTTP API for ExplainIP: request format, response schema, authentication and rate limits. For a marketing overview and pricing, see the main page.

  • One GET endpoint → one stable response schema with both nested and flat.* fields.
  • Same JSON on every plan – only rate limits change as you upgrade.
  • Free anonymous usage up to 1,000 requests/day, drop-in for curl, PHP, Node, Python and more.

Live demo

This is the real ExplainIP API. We detect your IP, call the API and show the response. You can also type any other IP address and hit lookup.

Waiting for lookup…
–
IP · Type
–
City · Region · Country
–
Currency · EU / non-EU
–
Coordinates
–
Languages
–
Calling code · TLD
JSON response
{}

This is the same response shape you get from the Quick start examples below.

Quick start

GET https://api.explainip.com/

Call https://api.explainip.com/ with an optional ip query parameter. If you omit ip, ExplainIP will use the caller's IP from the request.

Request

Response fields

Each lookup returns a small JSON with a few nested sections. These are the fields you'll use most often.

Field Type Description
ip string IP address ExplainIP resolved for this request (param or caller IP).
type string ipv4 or ipv6.
location.latitude, location.longitude number Approximate coordinates for this IP (suitable for maps and region logic).
city.name string City name, if available.
city.region_name string Region / state / subdivision name.
country.country_code string ISO 3166-1 alpha-2 country code (e.g. LT).
country.country_name string English country name.
country.is_eu boolean Whether this country is part of the European Union.
country.languages array List of language objects: code, name, native.
currency.code string ISO 4217 currency code (e.g. EUR).
hints.vat_region string High-level VAT region: EU or Non-EU.
hints.primary_language_code string Main language code you can use for UI / localization.
flat.* object Convenience copy of the most common fields (e.g. flat.country_code, flat.currency_code, flat.calling_code, flat.tld).

Response format is stable. If we add new fields, we only ever add them – we don't break existing ones.

Want to see a real JSON from your own IP? Open live demo JSON tab.

Authentication & rate limits

ExplainIP supports two usage modes: anonymous (no account) and authenticated (with API key).

Anonymous usage

Anonymous usage is great for quick tests, prototypes and internal tools. Just call the endpoint without any authentication header:

curl "https://api.explainip.com/"

Limits: up to 1,000 requests/day per IP address. Best-effort uptime, no support.

Authenticated usage (with API key)

For real projects, create an account, generate an API key, and send it via the Authorization: Bearer header. You can still omit ip to use the caller IP, or pass it explicitly:

curl "https://api.explainip.com/?ip=8.8.8.8" \
  -H "Authorization: Bearer sk_live_xxx"

Authenticated limits depend on your plan. If you hit the rate limit, ExplainIP returns HTTP 429 Too Many Requests.

Pricing & plans

ExplainIP has a Free plan for up to 1,000 requests/day, plus paid plans with higher limits.

For full plan details and prices, see the main site: Open pricing page.