Country · Network · Connection context

IP geolocation API

Put an IP in context.

Turn an IP address into country and network data for your app. Suggest a country, understand your traffic, or add location and network flags with Deep.

99.9841%routed IPv4 country coverage

IPv4 and IPv6. Start with a free API key.

Try it

Example response/ip/52.94.76.10?deep=true
{
  "ip": "52.94.76.10",
  "country": "US",
  "country_name": "United States",
  "continent": "NA",
  "asn": "AS16509",
  "asn_name": "Amazon.com, Inc.",
  ?deep=true
    "city": "Boardman",
    "state": "OR",
    "census_division": "Pacific",
    "census_region": "West",
    "registry": "arin",
    "datacenter": true,
    "relay": false,
    "tor": false,
    "vpn": false,
    "provider": "aws"
  }
}

From address to answer

Useful context.
Complete JSON.

Start with country and network. Add Deep when your app needs more detail, with the same endpoint and API key.

Country and network in one call.

Use the country code for a suggestion and the network name for traffic context.

Request

curl "https://api.parseapi.com/ip/52.94.76.10?deep=true" \
  -H "X-API-Key: YOUR_API_KEY"

Example response

JSON200 OK
{
  "ip": "52.94.76.10",
  "country": "US",
  "country_name": "United States",
  "continent": "NA",
  "asn": "AS16509",
  "asn_name": "Amazon.com, Inc.",
  
    "city": "Boardman",
    "state": "OR",
    "census_division": "Pacific",
    "census_region": "West",
    "registry": "arin",
    "datacenter": true,
    "relay": false,
    "tor": false,
    "vpn": false,
    "provider": "aws"
  }
}

Full API reference

Optional Deep on paid plans

Understand the connection.

Group traffic by available city and state. Read network flags to see whether an address matches known datacenter, VPN, Tor or privacy relay records.

Explore the Deep fields
Location where available
City and state are partial estimates. Missing details stay null so your app can fall back to country.
Flags for your own rules
Use the flags as context for traffic analysis or review. A false value means no matching record, not proof of a residential or safe connection.
Same request allowance
Add ?deep=true to the lookup. Paid Deep uses the same single API request, with no separate verification charge.

IP → Country · Language

Suggest a region. Keep the choice theirs.

Use the IP country as an editable starting point. Country supplies regional settings and language codes; Language supplies labels people recognize.

Read the IP’s country estimate

/ip/52.94.76.10

Fields from the response

{
  "country": "US"
}

This recorded example returns country US. An IP estimate can differ from a visitor’s location or preferred region.

  • Use country

    Load the selected country’s settings

    /country/US

    After the person confirms or changes the country, use its code for currency, calling code and recorded language codes.

    After the person confirms or changes the suggested country

  • Use languages[]

    Name the language choices

    /language/en

    Use a returned language code, such as en, for readable and native language names. Let the person choose their preferred language.

    After loading the confirmed country's settings

Use this in your app
JavaScript
// Run on your server with PARSEAPI_KEY in the environment.
const key = process.env.PARSEAPI_KEY;
if (!key) throw new Error('Set PARSEAPI_KEY on your server.');
const segment = value => encodeURIComponent(value);
const timezonePath = zone => zone.split('/').map(segment).join('/');

async function lookup(path, query = {}) {
  const url = new URL(path, 'https://api.parseapi.com');
  url.search = new URLSearchParams(query).toString();
  const response = await fetch(url, {
    headers: { 'X-API-Key': key, 'Parse-Version': '2.0.0' },
    signal: AbortSignal.timeout(10000),
  });
  if (!response.ok) {
    const error = await response.json().catch(() => null);
    throw new Error(error?.message ?? 'ParseAPI returned HTTP ' + response.status);
  }
  return response.json();
}

const ip = await lookup('/ip/' + segment('52.94.76.10'));
console.log({ suggestedCountry: ip.country });

// Call with the country the person confirms or chooses in your interface.
async function loadConfirmedCountry(selectedCountryCode) {
  if (!selectedCountryCode) return null;
  const country = await lookup('/country/' + segment(selectedCountryCode));
  const codes = Array.isArray(country.languages)
    ? country.languages.filter(code => typeof code === 'string' && code.length > 0)
    : [];
  const languages = await Promise.all(codes.map(code => lookup('/language/' + segment(code))));
  return { country, languages }; // Let the person choose their preferred language.
}

Country coverage

Country data.
Worldwide.

Country data for your app. Available on every plan.

What country coverage measures
The share of routed public IPv4 addresses in our dataset with country data. This measures availability; location accuracy and city or state coverage vary by network.
Suggest, then let people confirm
IP location estimates the connection, especially on mobile and shared networks. Use it to suggest a country or add traffic context. Unavailable values remain null.
Changes take time to reach the answer
IPv4 and IPv6 data follow a daily update schedule. Updates follow available records and cached responses. Private, loopback and documentation addresses return null geography and network fields.

From the first request to your app

One key.
Your next lookup.

Use HTTP or a supported SDK to look up an address. MCP exposes the IP lookup to your agent workflow. The same key works across ParseAPI products.

To read the connection making the request, use GET /ip without a key. A server call reports the server connection.

HTTP, SDKs and MCP

Copy a request above or follow the IP reference for parameters, complete responses and errors. Choose a client library for your app or connect MCP.

Read your connection in What is my IP?, or follow the tutorial to suggest a visitor's country.

Before you build.

How precise is IP geolocation?

IP location describes an internet connection. It is an estimate, especially for shared, mobile, VPN and relay connections. Country can help suggest a setting. City and state coverage is partial and unavailable values remain null. Let people confirm their location.

What does Deep add?

On paid plans, deep=true adds available state and city, registry, datacenter, relay, Tor, VPN and provider details. US census region or division can also appear when known. Core values stay the same. Free plans return deep: {}.

Does a false VPN flag prove a home connection?

No. A false flag means the address is not in the maintained matching records. VPN, datacenter, Tor and relay flags give network context, not an identity, safety or fraud verdict.

Can I look up the address making the request?

Yes. GET /ip returns the caller address without an API key. GET /ip/me is also supported. From a browser this is its public connection address. From a server it is the server connection address.

What happens with missing or invalid data?

Unavailable fields stay null. Private, loopback and documentation addresses return 200 with null geography and network fields. A public address with no record returns 404. Malformed addresses return 400.

How often does IP data change?

IP data follows a daily update schedule. Each answer reflects the records available to that lookup; updates can take time to reach cached responses. Save your lookup time when keeping a record for a report.

How is an IP lookup billed?

An authenticated IP lookup uses one API request from your monthly allowance, shared across ParseAPI products. Paid Deep is included without a separate lookup charge. The keyless GET /ip request does not use an authenticated allowance.

IP API pricing

Start building.

Your API request allowance is shared across ParseAPI products. Country and network are on every plan. Paid plans include Deep.

Free

Start free

Try an IP lookup with a free API key.

Room to grow

See plans

Choose the volume your app needs.