# Domain and IP Extractor

Extracts domain names and IP addresses from a block of text in one call: domains holds the names (public-suffix list only), ips the IPv4 and IPv6 addresses.

Source: https://docs.deepinfo.com/reference/utilities/domain-and-ip-extractor/

Last updated: 2026-12-05

---
`POST https://api.deepinfo.com/v1/tools/domain-ip-extractor`

Extracts domain names and IP addresses from a block of text in one call: `domains` holds the names (public-suffix list only), `ips` the IPv4 and IPv6 addresses.

## Authentication

Send your API key in the `apikey` request header.

## Request Body

| Parameter | Type | Required | Description |
|---|---|---|---|
| `text` | string | Required | Text to scan. Limited to 1,000,000 characters and 10,000 lines. |

```json
{
  "text": "Indicators seen in the leak: 198.51.100.7, 203.0.113.10 and 198.51.100.7 again, plus 2001:db8::1.\nHosts: www.example.com, mail.example.org, shop.example.co.uk, xn--mteri-h9ac.example.com.\nNot hosts: bad..name, host.invalid, 10.0.0.1, user@example.org"
}
```

## Response Fields

| Field | Type | Description |
|---|---|---|
| `domains` | array of string | The unique domain names found. |
| `ips` | array of string | The unique IP addresses found, IPv4 and IPv6. |

## Response Schema

| Field | Type |
|---|---|
| `domains` | array<string> |
| `ips` | array<string> |

## Examples

### 200 · OK

```bash
curl -X POST 'https://api.deepinfo.com/v1/tools/domain-ip-extractor' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "text": "Indicators seen in the leak: 198.51.100.7, 203.0.113.10 and 198.51.100.7 again, plus 2001:db8::1.\nHosts: www.example.com, mail.example.org, shop.example.co.uk, xn--mteri-h9ac.example.com.\nNot hosts: bad..name, host.invalid, 10.0.0.1, user@example.org"
}'
```

`Content-Type: application/json` · `deepinfo-request-id: 5f0c6a8e-1b2d-4c3e-9f4a-7b8c9d0e1f2a`

```json
{
  "domains": [
    "www.example.com",
    "mail.example.org"
  ],
  "ips": [
    "198.51.100.7",
    "203.0.113.10"
  ]
}
```

### 400 · Validation Error (text over 10,000 lines)

```bash
curl -X POST 'https://api.deepinfo.com/v1/tools/domain-ip-extractor' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "text": "198.51.100.7\n198.51.100.7\n198.51.100.7\n198.51.100.7\n198.51.100.7\n198.51.100.7\n198.51.100.7\n198.51.100.7\n198.51.100.7 …"
}'
```

Shortened for this page: the saved request sends a `text` of 130,012 characters on 10,001 lines.

`Content-Type: application/json` · `deepinfo-request-id: 5f0c6a8e-1b2d-4c3e-9f4a-7b8c9d0e1f2a`

```json
{
  "code": 10400,
  "parameters": [
    {
      "details": [
        "Maximum text lines is 10.000."
      ],
      "subcode": 19005
    }
  ],
  "solution": "https://docs.deepinfo.com/reference/"
}
```
