# Domain Parser API
> Parse any hostname or URL with the Public Suffix List. Split a domain into its subdomain, registrable domain (eTLD+1) and public suffix (eTLD), or fetch just the suffix or just the registrable domain. Handles full URLs, internationalized (punycode) domains, IP addresses, multi-level suffixes like co.uk and com.au, and — when you ask for it — private suffixes such as github.io and s3 buckets. Built on an always-current Public Suffix List and served entirely in-memory, so responses are instant and the service is always available. Ideal for cookie and domain scoping, analytics attribution, email and link validation, security and anti-abuse, and devops tooling.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/domain-api/..."
```

## Pricing
- **Free** (Free) — 5,000 calls/Mo, 5 req/s
- **Basic** ($3/Mo) — 150,000 calls/Mo, 20 req/s
- **Pro** ($9/Mo) — 1,000,000 calls/Mo, 50 req/s
- **Mega** ($25/Mo) — 6,000,000 calls/Mo, 150 req/s

## Endpoints

### Domain

#### `GET /v1/parse` — Full domain breakdown

**Parameters:**
- `domain` (query, required, string) — Hostname or URL Example: `www.example.co.uk`
- `private` (query, optional, string) — Treat private suffixes (github.io, etc.) as public (true/false) Example: `false`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/domain-api/v1/parse?domain=www.example.co.uk&private=false"
```

**Response:**
```json
{
    "data": {
        "input": "www.example.co.uk",
        "is_ip": false,
        "domain": "example.co.uk",
        "hostname": "www.example.co.uk",
        "is_icann": true,
        "subdomain": "www",
        "is_private": false,
        "public_suffix": "co.uk",
        "domain_without_suffix": "example",
        "parse_private_domains": false
    },
    "meta": {
        "timestamp": "2026-05-30T18:16:48.621Z",
        "request_id": "4d193905-3982-4d6f-8744-1542b8cd8dca"
    },
    "status": "ok",
    "message": "Domain parsed",
    "success": true
}
```

#### `GET /v1/registrable` — Registrable domain (eTLD+1)

**Parameters:**
- `domain` (query, required, string) — Hostname or URL Example: `a.b.c.example.org`
- `private` (query, optional, string) — Treat private suffixes (github.io, etc.) as public (true/false) Example: `false`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/domain-api/v1/registrable?domain=a.b.c.example.org&private=false"
```

**Response:**
```json
{
    "data": {
        "input": "a.b.c.example.org",
        "hostname": "a.b.c.example.org",
        "subdomain": "a.b.c",
        "public_suffix": "org",
        "registrable_domain": "example.org"
    },
    "meta": {
        "timestamp": "2026-05-30T18:16:48.709Z",
        "request_id": "7f4e9b7e-9cc2-490a-aa02-c8fec473eb82"
    },
    "status": "ok",
    "message": "Registrable domain retrieved",
    "success": true
}
```

#### `GET /v1/suffix` — Public suffix (eTLD)

**Parameters:**
- `domain` (query, required, string) — Hostname or URL Example: `example.com.au`
- `private` (query, optional, string) — Treat private suffixes (github.io, etc.) as public (true/false) Example: `false`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/domain-api/v1/suffix?domain=example.com.au&private=false"
```

**Response:**
```json
{
    "data": {
        "input": "example.com.au",
        "hostname": "example.com.au",
        "is_icann": true,
        "is_private": false,
        "public_suffix": "com.au"
    },
    "meta": {
        "timestamp": "2026-05-30T18:16:48.782Z",
        "request_id": "2b7fc734-d8b4-4913-81da-4d915dda770e"
    },
    "status": "ok",
    "message": "Suffix retrieved",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/domain-api
OpenAPI spec: https://www.oanor.com/api/domain-api/openapi.json
