# IP Lookup API

> IP Lookup is an IP address location API that resolves any IP to its country, region, timezone and continent, with the country's currency, calling code, languages and flag and the local time there. Private and reserved addresses are labelled instead of failing. Paid plans add city, coordinates, postal code, an accuracy radius, an EU-membership flag, ASN and the reverse DNS hostname.

**Endpoint:** `GET https://api.apiverve.com/v1/iplookup`  
**Category:** Networking  
**Cost:** 10 credits per call  
**Canonical page:** https://apiverve.com/marketplace/iplookup

## Overview

IP Lookup is an IP location API for IPv4 and IPv6 addresses: the IP checker, IP-to-country, geo IP or IP address lookup behind localisation, fraud checks and compliance routing. Send an IP and every plan returns its country, region, continent and IANA timezone as JSON. Paid plans add city, coordinates, postal code, the accuracy radius of those coordinates, whether the country is in the European Union, and the ASN announcing the address.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/iplookup?ip=173.172.81.20" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `ip` | string | Yes | The IP address for which you want to get the location data (e.g., 173.172.81.20). ip |

## Response fields

- `ip` — string · The IP address that was looked up
- `country` — string · ISO 3166-1 alpha-2 country code
- `countryName` — string · Full country name
- `region` — string · State/region code
- `regionName` — string · Full state/region name
- `city` — string · City name · (premium)
- `continent` — string · Continent code (e.g. NA, EU, AS)
- `continentName` — string · Full continent name
- `timezone` — string · IANA timezone of the IP location
- `coordinates` — array · Latitude and longitude · (premium)
- `postalCode` — string · Postal/ZIP code of the IP location · (premium)
- `accuracyRadius` — number · Approximate accuracy radius of the coordinates, in kilometers (lower is more precise) · (premium)
- `isEU` — boolean · Whether the country is a member of the European Union — useful for GDPR/compliance routing · (premium)
- `asn` — string · Autonomous System Number announcing the IP (e.g., AS15169); null if unrouted · (premium)
- `asnName` — string · Registered name of that AS (e.g., GOOGLE), not always the company name · (premium)
- `ipVersion` — number · IP version of the address, 4 or 6
- `isPublic` — boolean · Whether the address is publicly routable. Private and reserved addresses return 200 with location fields null
- `reservedType` — object · Why a non-public address is reserved: private, loopback, link-local, cgnat, multicast, documentation, benchmarking, unspecified or reserved; null for public addresses
- `countryCode3` — string · ISO 3166-1 alpha-3 country code (e.g., USA)
- `capital` — string · Capital city of the country
- `callingCode` — string · International dialling code of the country (e.g., +1)
- `currency` — object · Main currency of the country
  - `currency.code` — string · ISO 4217 currency code (e.g., USD)
  - `currency.name` — string · Currency name
  - `currency.symbol` — string · Currency symbol (e.g., $)
- `languages` — array · Official or main languages of the country
- `flag` — string · Flag emoji of the country
- `tld` — string · Country code top-level domain (e.g., .us)
- `utcOffset` — string · Current offset of the IP timezone from UTC (e.g., -05:00)
- `localTime` — string · Current local time in the IP timezone, ISO 8601 with offset
- `isDst` — boolean · Whether the IP timezone is currently on daylight saving time
- `hostname` — string · Reverse DNS (PTR) hostname of the IP, or null when it has none · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "ip": "173.172.81.20",
    "country": "US",
    "countryName": "United States",
    "region": "NE",
    "regionName": "Nebraska",
    "city": "Lincoln",
    "continent": "NA",
    "continentName": "North America",
    "timezone": "America/Chicago",
    "coordinates": [
      40.7579,
      -96.6962
    ],
    "postalCode": "68512",
    "accuracyRadius": 20,
    "isEU": false,
    "asn": "AS11427",
    "asnName": "TWC-11427-TEXAS",
    "ipVersion": 4,
    "isPublic": true,
    "reservedType": null,
    "countryCode3": "USA",
    "capital": "Washington D.C.",
    "callingCode": "+1",
    "currency": {
      "code": "USD",
      "name": "United States dollar",
      "symbol": "$"
    },
    "languages": [
      "English"
    ],
    "flag": "🇺🇸",
    "tld": ".us",
    "utcOffset": "-05:00",
    "localTime": "2026-10-26T20:28:33-05:00",
    "isDst": true,
    "hostname": "syn-173-172-081-020.res.spectrum.com"
  }
}
```

## Use cases

- **Localized Content Routing** — E-commerce storefronts inspect incoming visitor IP addresses to set default languages and display regional offers matched to the country and timezone.
- **Account Takeover Detection** — To flag suspicious logins, fraud engines compare the incoming IP's country and autonomous system number against the customer's known sign-in history.
- **Geo-Restricted Media Delivery** — When a viewer requests video playback, streaming services read the country code to enforce territorial broadcasting rights and block unauthorized regions.
- **Ad Click Verification** — Audit advertising traffic by matching visitor coordinates and autonomous system details against publisher placement records to filter bot farm activity.

## SDKs

- **npm** — `npm install @apiverve/iplookup` (https://www.npmjs.com/package/@apiverve/iplookup)
- **PyPI** — `pip install apiverve-iplookup` (https://pypi.org/project/apiverve-iplookup/)
- **NuGet** — `dotnet add package APIVerve.API.IPLookup` (https://www.nuget.org/packages/APIVerve.API.IPLookup)
- **Source** — https://github.com/apiverve/iplookup-api

## More

- Full reference: https://docs.apiverve.com/ref/iplookup
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
