> ## 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.

# Ipregistry

> IP geolocation with connection, company, carrier, time zone, currency and security data (proxy, Tor, VPN, threat), Autonomous System lookups and User-Agent parsing.

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

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

Needs&#x20;

`IPREGISTRY_API_KEY`

Endpoints

3

Auth

Key in header

[Vendor docs](https://ipregistry.co/docs)

&#x20;·&#x20;

[Pricing](https://ipregistry.co/pricing)

## Setup

| Variable | | What it is |
| - | - | - |
| `IPREGISTRY_API_KEY` | required | An Ipregistry API key (Ipregistry dashboard). Sent in the Authorization header as 'ApiKey \<key>'. |
| `IPREGISTRY_API_HOST` | optional | API host: the default, eu.api.ipregistry.co to keep requests on EU nodes, or gb.api.ipregistry.co for UK nodes only. Default `api.ipregistry.co`. One of `api.ipregistry.co`, `eu.api.ipregistry.co`, `gb.api.ipregistry.co`. |

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

## Notes

* Billing is in credits: 1 per single lookup; a batch costs one per value plus one per request (3 addresses cost 4).
* Every endpoint takes fields to trim the response: comma-separated, dot syntax for nested fields (security.is\_tor), a leading minus to exclude.
* Batch lookups by POSTing a JSON array are not in this entry; comma-separated values in the path do the same over GET.

## Endpoints

GET

Look up one or more IP addresses

Location, connection (ASN, ISP, type), company, carrier, time zone, currency and security flags for an IPv4 or IPv6 address, or up to 1,024 comma-separated addresses.

[Open](#ipregistry-ip-lookup)

GET

Look up one or more Autonomous Systems

Details of an Autonomous System by number, or of up to 16 comma-separated AS numbers.

[Open](#ipregistry-asn-lookup)

GET

Parse a User-Agent string

Browser, device and operating system behind a User-Agent string.

[Open](#ipregistry-user-agent-parse)

### Look up one or more IP addresses

GET

`/{ip}`

`ipregistry.ip.lookup`

Location, connection (ASN, ISP, type), company, carrier, time zone, currency and security flags for an IPv4 or IPv6 address, or up to 1,024 comma-separated addresses.

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>An IPv4 or IPv6 address, or up to 1,024 comma-separated addresses. Example `66.165.2.7`</td></tr>
    <tr><td>`fields`</td><td>string</td><td>query</td><td>Fields to return, e.g. location.country.name,security. Example `connection,security`</td></tr>

    <tr>
      <td>
        `hostname`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        Also resolve the address's hostname; slows the response.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://ipregistry.co/docs/endpoints) · 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), [ipdata](https://docs.webrouter.net/data-apis/ipdata.md#ipdata-ip-lookup)

```python Python theme={null}
router.call_data_api("ipregistry.ip.lookup", {'ip': '66.165.2.7', 'fields': 'connection,security'})
```

```text MCP theme={null}
call_data_api(endpoint="ipregistry.ip.lookup", params={"ip": "66.165.2.7", "fields": "connection,security"})
```

> [!NOTE]
>
> * 1 credit for one address; n + 1 for a batch, whose answers come wrapped in a results array.

### Look up one or more Autonomous Systems

GET

`/{asn}`

`ipregistry.asn.lookup`

Details of an Autonomous System by number, or of up to 16 comma-separated AS numbers.

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>An AS number prefixed with AS, or up to 16 comma-separated ones. Example `AS42`</td></tr>

    <tr>
      <td>
        `fields`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Fields to return.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://ipregistry.co/docs/endpoints) · 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), [ipdata](https://docs.webrouter.net/data-apis/ipdata.md#ipdata-asn-get)

```python Python theme={null}
router.call_data_api("ipregistry.asn.lookup", {'asn': 'AS42'})
```

```text MCP theme={null}
call_data_api(endpoint="ipregistry.asn.lookup", params={"asn": "AS42"})
```

> [!NOTE]
>
> * 1 credit for one AS; n + 1 for a batch.

### Parse a User-Agent string

GET

`/user_agent`

`ipregistry.user_agent.parse`

Browser, device and operating system behind a User-Agent string.

Input

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

      <th>
        Type
      </th>

      <th>
        In
      </th>

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

  <tbody>
    <tr><td>`ua`</td><td>string</td><td>query</td><td>The User-Agent to parse; without it the caller's own HTTP client is parsed. Example `Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0`</td></tr>
  </tbody>
</table>

[Vendor docs](https://ipregistry.co/docs/endpoints)

```python Python theme={null}
router.call_data_api("ipregistry.user_agent.parse", {'ua': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0'})
```

```text MCP theme={null}
call_data_api(endpoint="ipregistry.user_agent.parse", params={"ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0"})
```

> [!NOTE]
>
> * 1 credit.


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