# Domain WHOIS API

> Returns the WHOIS record of a domain under any TLD, from RDAP or port-43 WHOIS, and checks whether names are free to register across many extensions at once.

Category: Utilities. Region: global. 5 endpoints at `https://api.hoshime.com/v1/domain/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/domain
## GET /v1/domain/whois

WHOIS record of a domain under any TLD: registrar, dates, status and name servers, from RDAP or port-43 WHOIS.

Scope: `social:read` · Units: 1 · Cached: 360 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `name` | string | yes | Registered domain name, such as google.de or tokopedia.co.id. (e.g. google.id) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `createdAt` (string), `dnssec` (boolean), `domain` (string), `expiresAt` (string), `nameservers` (string[]), `raw` (string), `registrar` (string), `registrarUrl` (string), `server` (string), `source` (string), `status` (string[]), `updatedAt` (string)

```bash
curl "https://api.hoshime.com/v1/domain/whois?name=google.id" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/domain/availability

Whether domain names are free to register: one name, or one label under many TLDs at once.

Scope: `social:read` · Units: 1 · Cached: 10 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `name` | string | yes | A domain such as example.com, or a bare label such as example to check under each of tlds. (e.g. google) |
| `tlds` | string | no | Comma-separated extensions to check a bare label under, up to 25, such as com,io,co.id. Default com,net,org,io,co,ai,app,dev,id,co.id,xyz,me. (e.g. com,de,id) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `available` (boolean), `domain` (string), `source` (string), `status` (string)

```bash
curl "https://api.hoshime.com/v1/domain/availability?name=google&tlds=com%2Cde%2Cid" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/domain/tld

Where a TLD publishes registration data: its RDAP service and WHOIS server, and which one whois reads.

Scope: `social:read` · Units: 1 · Cached: 1440 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `name` | string | yes | Top-level domain, with or without the dot, such as de or .co.id (its last label is used). (e.g. de) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `rdapUrl` (string), `source` (string), `tld` (string), `whoisServer` (string)

```bash
curl "https://api.hoshime.com/v1/domain/tld?name=de" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/domain/certificates

TLS certificates logged for a domain in certificate transparency, newest first: issuer, validity and the names each covers.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `name` | string | yes | Domain name, such as example.com. Subdomains are not included; see subdomains. (e.g. example.com) |
| `limit` | integer | no | Number of certificates, from 1 to 100. (default 20) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `commonName` (string), `id` (string), `issuer` (string), `names` (string[]), `notAfter` (string), `notBefore` (string)

```bash
curl "https://api.hoshime.com/v1/domain/certificates?name=example.com" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/domain/subdomains

Subdomains of a domain found in TLS certificates logged in certificate transparency, such as api.example.com, sorted by name.

Scope: `social:read` · Units: 1 · Cached: 360 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `name` | string | yes | Domain name, such as example.com. (e.g. example.com) |
| `limit` | integer | no | Number of subdomains, from 1 to 1000. (default 100) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `name` (string)

```bash
curl "https://api.hoshime.com/v1/domain/subdomains?name=example.com" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
