# Fully Qualified Domain API

> Fully Qualified Domain resolves an IP address to its fully qualified domain name using reverse DNS PTR records. It returns the host FQDN, base domain, TLD, subdomain, and domain level count.

**Endpoint:** `GET https://api.apiverve.com/v1/fullyqualifieddomain`  
**Category:** Domain Data  
**Cost:** 2 credits per call  
**Canonical page:** https://apiverve.com/marketplace/fullyqualifieddomain

## Overview

Fully Qualified Domain Name works by analyzing the IP address provided and getting the fully qualified domain name (FQDN). It uses DNS lookup to get the FQDN of the IP and returns the FQDN.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/fullyqualifieddomain?ip=199.30.24.0" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `ip` | string | Yes | The IP address to get the fully qualified domain name of. ip |

## Response fields

- `ip` — string · The IP address that was looked up
- `baseDomain` — string · The last two labels of the FQDN
- `fqdn` — string · The fully qualified domain name from the reverse DNS (PTR) record
- `tld` — string · The top-level domain (e.g., com, net, org)
- `subdomain` — string · The subdomain portion of the FQDN, if any
- `domainLevels` — number · Number of domain levels in the FQDN
- `detected` — boolean · Whether a domain name was found for the IP address

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "ip": "199.30.24.0",
    "baseDomain": "msn.com",
    "fqdn": "msnbot-199-30-24-0.search.msn.com",
    "tld": "com",
    "subdomain": "msnbot-199-30-24-0.search",
    "domainLevels": 5,
    "detected": true
  }
}
```

## Use cases

- **SIEM Log Enrichment** — Security analysts resolve raw source IP addresses in firewall logs to identify hostnames, base domains, and top-level domains during triage.
- **Web Crawler Verification** — To identify verified search engines, web servers check reverse DNS hostnames on incoming crawler IPs before granting rate limit exemptions.
- **Mail Server PTR Checks** — Mail transfer agents verify incoming connection IP addresses against PTR domain levels and base domains to reject unconfigured relay servers.
- **Cloud Tenant Identification** — Network engineers inspect resolved hostnames and subdomain structures from external server IPs to catalog multi-tenant infrastructure dependencies.

## SDKs

- **npm** — `npm install @apiverve/fullyqualifieddomain` (https://www.npmjs.com/package/@apiverve/fullyqualifieddomain)
- **PyPI** — `pip install apiverve-fullyqualifieddomain` (https://pypi.org/project/apiverve-fullyqualifieddomain/)
- **NuGet** — `dotnet add package APIVerve.API.FullyQualifiedDomain` (https://www.nuget.org/packages/APIVerve.API.FullyQualifiedDomain)
- **Source** — https://github.com/apiverve/fullyqualifieddomain-api

## More

- Full reference: https://docs.apiverve.com/ref/fullyqualifieddomain
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
