> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webrouter.net/llms.txt
> Use this file to discover all available pages before exploring further.

# ipdata

> IP geolocation with ASN, company, mobile carrier, time zone, currency and threat data (Tor, proxy, VPN, datacenter, known attacker or abuser, blocklists), plus detailed ASN records.

![](https://mintcdn.com/webrouter/JBFYvcRI1PVnd4YX/logo/data-apis/ipdata.webp?fit=max\&auto=format\&n=JBFYvcRI1PVnd4YX\&q=85\&s=d94b9cdf512cf31084ce0e338378efed)

[Web Catalog · Maps](https://docs.webrouter.net/data-apis.md?category=maps)

Needs&#x20;

`IPDATA_API_KEY`

Endpoints

3

Auth

Key in query

[Vendor docs](https://docs.ipdata.co/docs/getting-started)

&#x20;·&#x20;

[Pricing](https://ipdata.co/pricing.html)

## Setup

| Variable | | What it is |
| - | - | - |
| `IPDATA_API_KEY` | required | An ipdata API key (ipdata.co dashboard). Sent as the api-key query parameter. |
| `IPDATA_API_HOST` | optional | API host: the default, or eu-api.ipdata.co to keep requests on EU servers only. Default `api.ipdata.co`. One of `api.ipdata.co`, `eu-api.ipdata.co`. |

Put them in your environment or `.env`; [Data APIs](https://docs.webrouter.net/vendors.md) covers the other ways.

## Notes

* A free key allows 1,500 requests a day, with commercial use restricted; quotas reset at 00:00 UTC. Past the free quota requests are blocked.
* Private and reserved addresses return 400 with a message, not a result.
* Bulk lookup (POST /bulk with a JSON array of up to 100 IPs, paid plans only, one credit per IP) is not in this entry.

## Endpoints

GET

Look up an IP's location, network and threat profile

City, region, country, coordinates, postal code, ASN, company, carrier, languages, currency, time zone, threat flags and anycast/satellite/leased flags for an IP.

[Open](#ipdata-ip-lookup)

GET

Get one section of an IP's record

A single field of an IP's record, such as threat, company, carrier, asn, time\_zone or country\_name.

[Open](#ipdata-ip-field)

GET

Get an ASN's details

Owner name, domain, usage type, IPv4 and IPv6 prefixes, IP count, registry, country, assignment date, status and upstream, downstream and peer ASNs.

[Open](#ipdata-asn-get)

### Look up an IP's location, network and threat profile

GET

`/{ip}`

`ipdata.ip.lookup`

City, region, country, coordinates, postal code, ASN, company, carrier, languages, currency, time zone, threat flags and anycast/satellite/leased flags for an IP.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`ip` required</td><td>string</td><td>path</td><td>IPv4 or IPv6 address. Example `8.8.8.8`</td></tr>
    <tr><td>`fields`</td><td>string</td><td>query</td><td>Comma-separated top-level fields to return, e.g. ip,city,country\_name,threat. Example `ip,city,region,country_name,carrier`</td></tr>
  </tbody>
</table>

[Vendor docs](https://docs.ipdata.co/docs/getting-started) · Same job: [Abstract API](https://docs.webrouter.net/data-apis/abstract-api.md#abstract-api-ip-lookup), [API Ninjas](https://docs.webrouter.net/data-apis/apininjas.md#apininjas-ip-lookup), [InternetData](https://docs.webrouter.net/data-apis/internetdata.md#internetdata-ip-lookup), [IP2Location.io](https://docs.webrouter.net/data-apis/ip2location-io.md#ip2location-io-ip-lookup), [ipapi.is](https://docs.webrouter.net/data-apis/ipapiis.md#ipapiis-ip-lookup), [IPinfo](https://docs.webrouter.net/data-apis/ipinfo.md#ipinfo-lite-lookup)

```python Python theme={null}
router.call_data_api("ipdata.ip.lookup", {'ip': '8.8.8.8', 'fields': 'ip,city,region,country_name,carrier'})
```

```text MCP theme={null}
call_data_api(endpoint="ipdata.ip.lookup", params={"ip": "8.8.8.8", "fields": "ip,city,region,country_name,carrier"})
```

> [!NOTE]
>
> * One request from the daily quota. threat.is\_vpn is filled only on Business and Enterprise plans.

### Get one section of an IP's record

GET

`/{ip}/{field}`

`ipdata.ip.field`

A single field of an IP's record, such as threat, company, carrier, asn, time\_zone or country\_name.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`ip` required</td><td>string</td><td>path</td><td>IPv4 or IPv6 address. Example `45.148.10.240`</td></tr>
    <tr><td>`field` required</td><td>string</td><td>path</td><td>The field to return. One of `ip`, `is_eu`, `city`, `region`, `region_code`, `country_name`, `country_code`, `continent_name`, `continent_code`, `latitude`, `longitude`, `asn`, `company`, `postal`, `calling_code`, `flag`, `emoji_flag`, `emoji_unicode`, `carrier`, `languages`, `currency`, `time_zone`, `threat`, `count`, `is_anycast`, `is_satellite`, `is_leased` Example `threat`</td></tr>
  </tbody>
</table>

[Vendor docs](https://docs.ipdata.co/docs/filtering-response-fields) · Same job: [Abstract API](https://docs.webrouter.net/data-apis/abstract-api.md#abstract-api-ip-lookup), [API Ninjas](https://docs.webrouter.net/data-apis/apininjas.md#apininjas-ip-lookup), [InternetData](https://docs.webrouter.net/data-apis/internetdata.md#internetdata-ip-lookup), [IP2Location.io](https://docs.webrouter.net/data-apis/ip2location-io.md#ip2location-io-ip-lookup), [ipapi.is](https://docs.webrouter.net/data-apis/ipapiis.md#ipapiis-ip-lookup), [IPinfo](https://docs.webrouter.net/data-apis/ipinfo.md#ipinfo-lite-lookup)

```python Python theme={null}
router.call_data_api("ipdata.ip.field", {'ip': '45.148.10.240', 'field': 'threat'})
```

```text MCP theme={null}
call_data_api(endpoint="ipdata.ip.field", params={"ip": "45.148.10.240", "field": "threat"})
```

> [!NOTE]
>
> * A plain field such as country\_name comes back as bare text, not JSON. threat holds is\_tor, is\_vpn, is\_icloud\_relay, is\_proxy, is\_datacenter, is\_anonymous, is\_known\_attacker, is\_known\_abuser, is\_threat, is\_bogon, blocklists and scores.

### Get an ASN's details

GET

`/{asn}/`

`ipdata.asn.get`

Owner name, domain, usage type, IPv4 and IPv6 prefixes, IP count, registry, country, assignment date, status and upstream, downstream and peer ASNs.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`asn` required</td><td>string</td><td>path</td><td>The AS number with its AS prefix. Example `AS2`</td></tr>
  </tbody>
</table>

[Vendor docs](https://docs.ipdata.co/docs/asn-api) · Same job: [InternetData](https://docs.webrouter.net/data-apis/internetdata.md#internetdata-asn-lookup), [ipapi.is](https://docs.webrouter.net/data-apis/ipapiis.md#ipapiis-asn-lookup), [Ipregistry](https://docs.webrouter.net/data-apis/ipregistry.md#ipregistry-asn-lookup)

```python Python theme={null}
router.call_data_api("ipdata.asn.get", {'asn': 'AS2'})
```

```text MCP theme={null}
call_data_api(endpoint="ipdata.asn.get", params={"asn": "AS2"})
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.