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

# IP2WHOIS API reference

> API reference for the IP2WHOIS plugin in Corsair: every `ip2whois.api.*` operation with its input and output types, taken from the plugin's Zod schemas.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Domain

### lookup

`domain.lookup`

Look up WHOIS registration data for a domain.

**Risk:** `read`

```ts theme={null}
await corsair.ip2whois.api.domain.lookup({ domain: 'example.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `domain` | `string` | Yes | Domain name, without a scheme or [www](http://www). |

Pass the registrable domain, without a scheme or [www](http://www). The response includes the registrar and the registrant, admin, tech and billing contacts as the registry publishes them (often redacted). Only the registration fields are saved to the `domains` table, not the contacts.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `domain` | `string` | Yes | — |
| `domain_id` | `string` | No | — |
| `status` | `string` | No | — |
| `create_date` | `string` | No | — |
| `update_date` | `string` | No | — |
| `expire_date` | `string` | No | — |
| `domain_age` | `number` | No | — |
| `whois_server` | `string` | No | — |
| `nameservers` | `string[]` | No | — |
| `registrar` | `object` | No | — |
| `registrant` | `object` | No | — |
| `admin` | `object` | No | — |
| `tech` | `object` | No | — |
| `billing` | `object` | No | — |

> [accordion] registrar full type
>
> ```ts theme={null}
> {
>   iana_id?: string,
>   name?: string,
>   url?: string
> }
> ```

> [accordion] registrant full type
>
> ```ts theme={null}
> {
>   name?: string,
>   organization?: string,
>   street_address?: string,
>   city?: string,
>   region?: string,
>   zip_code?: string,
>   country?: string,
>   phone?: string,
>   fax?: string,
>   email?: string
> }
> ```

> [accordion] admin full type
>
> ```ts theme={null}
> {
>   name?: string,
>   organization?: string,
>   street_address?: string,
>   city?: string,
>   region?: string,
>   zip_code?: string,
>   country?: string,
>   phone?: string,
>   fax?: string,
>   email?: string
> }
> ```

> [accordion] tech full type
>
> ```ts theme={null}
> {
>   name?: string,
>   organization?: string,
>   street_address?: string,
>   city?: string,
>   region?: string,
>   zip_code?: string,
>   country?: string,
>   phone?: string,
>   fax?: string,
>   email?: string
> }
> ```

> [accordion] billing full type
>
> ```ts theme={null}
> {
>   name?: string,
>   organization?: string,
>   street_address?: string,
>   city?: string,
>   region?: string,
>   zip_code?: string,
>   country?: string,
>   phone?: string,
>   fax?: string,
>   email?: string
> }
> ```

***

## Hosted

### lookup

`hosted.lookup`

List domains hosted on an IP address.

**Risk:** `read`

```ts theme={null}
await corsair.ip2whois.api.hosted.lookup({ ip: '8.8.8.8', page: 1 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ip` | `string` | Yes | IPv4 or IPv6 address. |
| `page` | `number` | No | Page number, starting at 1. |

Pass an IPv4 or IPv6 address. `domains` is a list of domain names. Page size depends on the plan: 1 domain per page on the free plan, up to 100 on Security. Page starts at 1.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ip` | `string` | Yes | — |
| `total_domains` | `number` | Yes | — |
| `page` | `number` | Yes | — |
| `per_page` | `number` | Yes | — |
| `total_pages` | `number` | Yes | — |
| `domains` | `string[]` | Yes | — |

***


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