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

# WhoisXML API

> Domain and IP registration intelligence: live WHOIS and RDAP records, WHOIS history, reverse WHOIS by registrant terms, DNS lookups and subdomain discovery.

![](https://mintcdn.com/webrouter/8QP9EZc8V07Kl-0I/logo/data-apis/whoisxml-api.webp?fit=max\&auto=format\&n=8QP9EZc8V07Kl-0I\&q=85\&s=0821caa19491e5783510a3a65183da66)

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

Needs&#x20;

`WHOISXML_API_KEY`

Endpoints

6

Auth

Key in header and query

[Vendor docs](https://whois.whoisxmlapi.com/documentation/making-requests)

&#x20;·&#x20;

[Pricing](https://whois.whoisxmlapi.com/pricing)

## Setup

| Variable | | What it is |
| - | - | - |
| `WHOISXML_API_KEY` | required | A WhoisXML API key (My products page). Sent as Authorization: Bearer, which the WHOIS API accepts. |
| `WHOISXML_API_KEY` | required | The same key, sent in the X-Authentication-Token header that WHOIS history and reverse WHOIS accept. |
| `WHOISXML_API_KEY` | required | The same key, sent as the apiKey query parameter: the only way the DNS, subdomains and balance docs give. |

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

## Notes

* Two credit pools: WHOIS credits (WHOIS API) and Domain Research Suite credits (history, reverse WHOIS, subdomains and more). A free account gets 500 of each kind; account.balance shows what is left.
* Rate limits: the WHOIS API allows 200 requests per second; DNS, history, reverse WHOIS and subdomains 30. Over it is a 429 (Retry-After on the WHOIS API).
* A new key takes up to a minute to activate.

## Endpoints

GET

Get WHOIS or RDAP for a domain, IP or email

The parsed registration record (registrar, dates, contacts, name servers, status, availability) of a domain, IPv4, IPv6 or email address.

[Open](#whoisxml-api-whois-get)

GET

Get a domain's WHOIS history

Every historical WHOIS record held for a domain, or only how many there are.

[Open](#whoisxml-api-whois-history)

POST

Find domains by WHOIS terms

Domains whose current or historical WHOIS records contain all the include terms and none of the exclude terms.

[Open](#whoisxml-api-whois-reverse)

GET

Look up DNS records

Current DNS records of one name, for one, several or all record types.

[Open](#whoisxml-api-dns-lookup)

GET

List a domain's subdomains

Known subdomains of a domain, up to 10,000 per page.

[Open](#whoisxml-api-subdomains-list)

GET

Get account balance

Remaining credits per WhoisXML product.

[Open](#whoisxml-api-account-balance)

### Get WHOIS or RDAP for a domain, IP or email

GET

`/whoisserver/WhoisService`

`whoisxml-api.whois.get`

The parsed registration record (registrar, dates, contacts, name servers, status, availability) of a domain, IPv4, IPv6 or email address.

Input

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

      <th>
        Type
      </th>

      <th>
        In
      </th>

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

  <tbody>
    <tr><td>`domainName` required</td><td>string</td><td>query</td><td>Domain, IPv4, IPv6 or email address. Example `google.com`</td></tr>
    <tr><td>`outputFormat`</td><td>string</td><td>query</td><td>JSON or XML; default XML. One of `JSON`, `XML`</td></tr>
    <tr><td>`rdap`</td><td>integer</td><td>query</td><td>0 auto (default), 1 RDAP, 2 WHOIS. One of `0`, `1`, `2`</td></tr>

    <tr>
      <td>
        `maxCacheAgeHours`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Oldest acceptable cached record, in hours (default 168; -1 any age; 0 to 47 costs 5 credits).
      </td>
    </tr>

    <tr><td>`preferFresh`</td><td>integer</td><td>query</td><td>1 limits the cache age to 48 hours at 1 credit; not with \_hardRefresh. One of `0`, `1`</td></tr>
    <tr><td>`_hardRefresh`</td><td>integer</td><td>query</td><td>1 fetches a fresh record (cache age 24 hours) for 5 credits; not with preferFresh. One of `0`, `1`</td></tr>
    <tr><td>`_dbOnly`</td><td>integer</td><td>query</td><td>1 reads cache only, erroring with WHOIS\_03 when nothing is cached. One of `0`, `1`</td></tr>
    <tr><td>`ignoreRawTexts`</td><td>integer</td><td>query</td><td>1 strips raw WHOIS text from the answer. One of `0`, `1`</td></tr>
    <tr><td>`exactMatch`</td><td>integer</td><td>query</td><td>IP lookups only: 1 for an RPSL exact match. One of `0`, `1`</td></tr>
  </tbody>
</table>

[Vendor docs](https://whois.whoisxmlapi.com/documentation/making-requests) · Same job: [API Ninjas](https://docs.webrouter.net/data-apis/apininjas.md#apininjas-whois), [IP2Location.io](https://docs.webrouter.net/data-apis/ip2location-io.md#ip2location-io-domain-whois), [Public Interest Registry RDAP (.org)](https://docs.webrouter.net/data-apis/pir-rdap.md#pir-rdap-domain-get), [SecurityTrails](https://docs.webrouter.net/data-apis/securitytrails.md#securitytrails-domain-whois), [Verisign RDAP (.com, .net)](https://docs.webrouter.net/data-apis/verisign-rdap.md#verisign-rdap-domain-get)

```python Python theme={null}
router.call_data_api("whoisxml-api.whois.get", {'domainName': 'google.com'})
```

```text MCP theme={null}
call_data_api(endpoint="whoisxml-api.whois.get", params={"domainName": "google.com"})
```

> [!NOTE]
>
> * Costs 1 WHOIS credit (preferFresh=1 too); a fresh lookup, \_hardRefresh=1 or maxCacheAgeHours 0 to 47, costs 5 credits.
> * The default output is XML: pass outputFormat=JSON.
> * WhoisXML recommends a 100-second request timeout, longer than call\_vendor's 60 seconds, so a slow live lookup can time out here; \_dbOnly=1 answers from the cache only.

### Get a domain's WHOIS history

GET

`/api/v1`

`whoisxml-api.whois.history`

Every historical WHOIS record held for a domain, or only how many there are.

Input

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

      <th>
        Type
      </th>

      <th>
        In
      </th>

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

  <tbody>
    <tr><td>`domainName` required</td><td>string</td><td>query</td><td>Domain. Example `google.com`</td></tr>
    <tr><td>`mode`</td><td>string</td><td>query</td><td>preview (default, 1 DRS credit) returns only the record count; purchase (50 DRS credits) returns the records. One of `preview`, `purchase` Example `preview`</td></tr>
    <tr><td>`outputFormat`</td><td>string</td><td>query</td><td>JSON or XML; default JSON. One of `JSON`, `XML`</td></tr>
    <tr><td>`skipLiveWhois`</td><td>integer</td><td>query</td><td>1 skips the live lookup for the latest record (faster, may miss it). One of `0`, `1`</td></tr>

    <tr>
      <td>
        `sinceDate`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        YYYY-MM-DD: only changes detected since then.
      </td>
    </tr>

    <tr>
      <td>
        `createdDateFrom`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        YYYY-MM-DD: created after.
      </td>
    </tr>

    <tr>
      <td>
        `createdDateTo`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        YYYY-MM-DD: created before.
      </td>
    </tr>

    <tr>
      <td>
        `updatedDateFrom`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        YYYY-MM-DD: updated after.
      </td>
    </tr>

    <tr>
      <td>
        `updatedDateTo`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        YYYY-MM-DD: updated before.
      </td>
    </tr>

    <tr>
      <td>
        `expiredDateFrom`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        YYYY-MM-DD: expired after.
      </td>
    </tr>

    <tr>
      <td>
        `expiredDateTo`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        YYYY-MM-DD: expired before.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://whois-history.whoisxmlapi.com/api/documentation/making-requests) · Same job: [SecurityTrails](https://docs.webrouter.net/data-apis/securitytrails.md#securitytrails-history-whois)

```python Python theme={null}
router.call_data_api("whoisxml-api.whois.history", {'domainName': 'google.com', 'mode': 'preview'})
```

```text MCP theme={null}
call_data_api(endpoint="whoisxml-api.whois.history", params={"domainName": "google.com", "mode": "preview"})
```

> [!NOTE]
>
> * Costs 1 DRS credit in mode=preview (the default: the record count only) and 50 DRS credits in mode=purchase (the records): call preview first. The live lookup for the latest record (skipLiveWhois=0, the default) has no separate documented price.

### Find domains by WHOIS terms

POST

`/api/v2`

`whoisxml-api.whois.reverse`

Domains whose current or historical WHOIS records contain all the include terms and none of the exclude terms.

Input

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

      <th>
        Type
      </th>

      <th>
        In
      </th>

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

  <tbody>
    <tr><td>`basicSearchTerms` required</td><td>object</td><td>body</td><td>\{include: \[up to 4 terms, all required], exclude: \[up to 4 terms]}; case-insensitive, matched in any WHOIS field. Example `{"include": ["Airbnb, Inc."], "exclude": ["EU"]}`</td></tr>
    <tr><td>`searchType`</td><td>string</td><td>body</td><td>current (default) or historic records too. One of `current`, `historic`</td></tr>
    <tr><td>`mode`</td><td>string</td><td>body</td><td>preview (default, free) returns only the count; purchase returns up to 10,000 domains for 1 DRS credit. One of `preview`, `purchase` Example `preview`</td></tr>

    <tr>
      <td>
        `punycode`
      </td>

      <td>
        boolean
      </td>

      <td>
        body
      </td>

      <td>
        Punycode-encode returned names; default true.
      </td>
    </tr>

    <tr>
      <td>
        `includeAuditDates`
      </td>

      <td>
        boolean
      </td>

      <td>
        body
      </td>

      <td>
        Return objects with audit dates instead of bare names.
      </td>
    </tr>

    <tr><td>`responseFormat`</td><td>string</td><td>body</td><td>json (default) or xml. One of `json`, `xml`</td></tr>

    <tr>
      <td>
        `createdDateFrom`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        YYYY-MM-DD: created after.
      </td>
    </tr>

    <tr>
      <td>
        `createdDateTo`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        YYYY-MM-DD: created before.
      </td>
    </tr>

    <tr>
      <td>
        `updatedDateFrom`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        YYYY-MM-DD: updated after.
      </td>
    </tr>

    <tr>
      <td>
        `updatedDateTo`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        YYYY-MM-DD: updated before.
      </td>
    </tr>

    <tr>
      <td>
        `expiredDateFrom`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        YYYY-MM-DD: expired after.
      </td>
    </tr>

    <tr>
      <td>
        `expiredDateTo`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        YYYY-MM-DD: expired before.
      </td>
    </tr>

    <tr>
      <td>
        `searchAfter`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        nextPageSearchAfter from the previous answer, for the next 10,000.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://reverse-whois.whoisxmlapi.com/api/documentation/making-requests)

```python Python theme={null}
router.call_data_api("whoisxml-api.whois.reverse", {'basicSearchTerms': {'include': ['Airbnb, Inc.'], 'exclude': ['EU']}, 'mode': 'preview'})
```

```text MCP theme={null}
call_data_api(endpoint="whoisxml-api.whois.reverse", params={"basicSearchTerms": {"include": ["Airbnb, Inc."], "exclude": ["EU"]}, "mode": "preview"})
```

> [!NOTE]
>
> * Free in mode=preview (the default: the count only); mode=purchase costs 1 DRS credit for up to 10,000 domains: size a search with preview first.
> * A read over POST: the search terms go in a JSON body.

### Look up DNS records

GET

`/whoisserver/DNSService`

`whoisxml-api.dns.lookup`

Current DNS records of one name, for one, several or all record types.

Input

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

      <th>
        Type
      </th>

      <th>
        In
      </th>

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

  <tbody>
    <tr><td>`domainName` required</td><td>string</td><td>query</td><td>The exact name to query; subdomains such as \_dmarc.example.com are queried on their own. Example `bbc.com`</td></tr>
    <tr><td>`type` required</td><td>string</td><td>query</td><td>Record type name or code, comma-separated for several, or \_all. Example `_all`</td></tr>
    <tr><td>`outputFormat`</td><td>string</td><td>query</td><td>JSON or XML; default XML. One of `JSON`, `XML`</td></tr>
  </tbody>
</table>

[Vendor docs](https://dns-lookup.whoisxmlapi.com/api/documentation/making-requests) · Same job: [API Ninjas](https://docs.webrouter.net/data-apis/apininjas.md#apininjas-dns), [InternetData](https://docs.webrouter.net/data-apis/internetdata.md#internetdata-domain-lookup), [Public Interest Registry RDAP (.org)](https://docs.webrouter.net/data-apis/pir-rdap.md#pir-rdap-nameserver-get), [SecurityTrails](https://docs.webrouter.net/data-apis/securitytrails.md#securitytrails-domain-get), [Shodan](https://docs.webrouter.net/data-apis/shodan.md#shodan-dns-domain), [Verisign RDAP (.com, .net)](https://docs.webrouter.net/data-apis/verisign-rdap.md#verisign-rdap-nameserver-get)

```python Python theme={null}
router.call_data_api("whoisxml-api.dns.lookup", {'domainName': 'bbc.com', 'type': '_all'})
```

```text MCP theme={null}
call_data_api(endpoint="whoisxml-api.dns.lookup", params={"domainName": "bbc.com", "type": "_all"})
```

> [!NOTE]
>
> * The default output is XML: pass outputFormat=JSON.

### List a domain's subdomains

GET

`/api/v2`

`whoisxml-api.subdomains.list`

Known subdomains of a domain, up to 10,000 per page.

Input

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

      <th>
        Type
      </th>

      <th>
        In
      </th>

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

  <tbody>
    <tr><td>`domainName` required</td><td>string</td><td>query</td><td>Domain. Example `amazon.com`</td></tr>

    <tr>
      <td>
        `searchAfter`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        nextPageSearchAfter from the previous answer.
      </td>
    </tr>

    <tr><td>`outputFormat`</td><td>string</td><td>query</td><td>JSON or XML; default JSON. One of `JSON`, `XML`</td></tr>
  </tbody>
</table>

[Vendor docs](https://subdomains.whoisxmlapi.com/api/documentation/making-requests) · Same job: [SecurityTrails](https://docs.webrouter.net/data-apis/securitytrails.md#securitytrails-domain-subdomains), [Wappalyzer](https://docs.webrouter.net/data-apis/wappalyzer.md#wappalyzer-subdomains)

```python Python theme={null}
router.call_data_api("whoisxml-api.subdomains.list", {'domainName': 'amazon.com'})
```

```text MCP theme={null}
call_data_api(endpoint="whoisxml-api.subdomains.list", params={"domainName": "amazon.com"})
```

### Get account balance

GET

`/user-service/account-balance`

`whoisxml-api.account.balance`

Remaining credits per WhoisXML product.

Input

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

      <th>
        Type
      </th>

      <th>
        In
      </th>

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

  <tbody>
    <tr>
      <td>
        `productId`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Only this product's balance (IDs are in the answer).
      </td>
    </tr>

    <tr><td>`outputFormat`</td><td>string</td><td>query</td><td>JSON or XML; default JSON. One of `JSON`, `XML`</td></tr>
  </tbody>
</table>

[Vendor docs](https://whois.whoisxmlapi.com/documentation/balance-information)

```python Python theme={null}
router.call_data_api("whoisxml-api.account.balance")
```

```text MCP theme={null}
call_data_api(endpoint="whoisxml-api.account.balance")
```


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