# DNS on Onekey > 7 endpoints for DNS (7 stable, 0 beta), 1 credit each. Category: Web tools. One key, one JSON shape. Base URL: https://api.onekey.dev Auth: header `x-api-key: `. Call shape: `GET /v1/{platform}/{endpoint}?{params}`. Every response is `{success, data, metadata, error}`; check `success` first. Cost is in `metadata.credits_charged`. Free when served from cache (0.2 credit for a cached response over 100 KB). Failed and not-found calls are refunded. Status: stable = verified against the live source; beta = not yet verified, fields may be missing. Page: https://onekey.dev/platforms/dns Reference (Markdown): https://onekey.dev/docs/api/dns.md All docs: https://onekey.dev/llms.txt ## Canonical fields returned Unified-schema fields (same names on every platform), with how many of the 7 mapped DNS endpoints return each: - `entity.name` (string): 7 - `entity.type` (string): 7 - plus 2 platform-specific fields under `ext.` ## Endpoints ### dns.a DNS IPv4 addresses (A) of a name via DNS-over-HTTPS (Cloudflare, Google fallback). - Price: 1 credit per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/dns/a?name=example.com` with header `x-api-key: YOUR_API_KEY` - Parameters: - `name` (string, required): Domain name (underscore labels allowed, e.g. _dmarc.example.com) - Fields returned: `entity.name`, `entity.type`, `ext.ttl`, `ext.value` - Reference: https://onekey.dev/docs/api/dns/a.md ### dns.aaaa DNS IPv6 addresses (AAAA) of a name via DNS-over-HTTPS (Cloudflare, Google fallback). - Price: 1 credit per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/dns/aaaa?name=example.com` with header `x-api-key: YOUR_API_KEY` - Parameters: - `name` (string, required): Domain name (underscore labels allowed, e.g. _dmarc.example.com) - Fields returned: `entity.name`, `entity.type`, `ext.ttl`, `ext.value` - Reference: https://onekey.dev/docs/api/dns/aaaa.md ### dns.cname DNS canonical name (CNAME) of a name via DNS-over-HTTPS (Cloudflare, Google fallback). - Price: 1 credit per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/dns/cname?name=www.github.com` with header `x-api-key: YOUR_API_KEY` - Parameters: - `name` (string, required): Domain name (underscore labels allowed, e.g. _dmarc.example.com) - Fields returned: `entity.name`, `entity.type`, `ext.ttl`, `ext.value` - Reference: https://onekey.dev/docs/api/dns/cname.md ### dns.lookup Generic DNS lookup for any common record type via DNS-over-HTTPS. - Price: 1 credit per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/dns/lookup?name=example.com&type=a` with header `x-api-key: YOUR_API_KEY` - Parameters: - `name` (string, required): Domain name - `type` (string, optional, default a): Record type - Fields returned: `entity.name`, `entity.type`, `ext.ttl`, `ext.value` - Reference: https://onekey.dev/docs/api/dns/lookup.md ### dns.mx DNS mail exchangers (MX) of a name via DNS-over-HTTPS (Cloudflare, Google fallback). - Price: 1 credit per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/dns/mx?name=gmail.com` with header `x-api-key: YOUR_API_KEY` - Parameters: - `name` (string, required): Domain name (underscore labels allowed, e.g. _dmarc.example.com) - Fields returned: `entity.name`, `entity.type`, `ext.ttl`, `ext.value` - Reference: https://onekey.dev/docs/api/dns/mx.md ### dns.ns DNS name servers (NS) of a name via DNS-over-HTTPS (Cloudflare, Google fallback). - Price: 1 credit per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/dns/ns?name=example.com` with header `x-api-key: YOUR_API_KEY` - Parameters: - `name` (string, required): Domain name (underscore labels allowed, e.g. _dmarc.example.com) - Fields returned: `entity.name`, `entity.type`, `ext.ttl`, `ext.value` - Reference: https://onekey.dev/docs/api/dns/ns.md ### dns.txt DNS TXT records (SPF, DKIM, verification) of a name via DNS-over-HTTPS (Cloudflare, Google fallback). - Price: 1 credit per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/dns/txt?name=example.com` with header `x-api-key: YOUR_API_KEY` - Parameters: - `name` (string, required): Domain name (underscore labels allowed, e.g. _dmarc.example.com) - Fields returned: `entity.name`, `entity.type`, `ext.ttl`, `ext.value` - Reference: https://onekey.dev/docs/api/dns/txt.md ## Sample request ```bash curl "https://api.onekey.dev/v1/dns/a?name=example.com" \ -H "x-api-key: YOUR_API_KEY" ```