# GET /api/v1/dns/lookup

> Look up a name in the public DNS

- Group: dns
- Tier: R
- Required scope: read:dns
- Docs: https://api.inleed.com/reference/dns/dns-lookup

## Description

Returns `data[]` of `{type,value,ttl,priority?}` for `name` from the public internet resolver. `type` defaults to A. This is not the account's zone — use `list_dns_records` for a zone you own. An unresolvable name returns an empty list with a note, not an error.

## Query parameters

- `name` — string (required). The hostname to look up in the public DNS, e.g. example.com or mail.example.com.
- `type` — enum. Which record type to query. Defaults to A. One of A, AAAA, CNAME, MX, TXT, NS, CAA, SRV, SOA.

## Request

```bash
curl -X GET "https://mcp.inleed.com/api/v1/dns/lookup?name=example.se&type=A" \
  -H "Authorization: Bearer inl_live_…"
```

## Response · 200

```json
{
  "name": "example.se",
  "type": "A",
  "data": [
    []
  ],
  "total": 3,
  "note": "Resolved via the owning account."
}
```

## Errors

- **401** No token was presented, or the token is revoked, expired or unknown. — codes: unauthorized, token_expired, token_revoked
- **403** The token lacks a required scope, or this account does not own the resource. — codes: insufficient_scope
- **422** Validation error — codes: validation_failed
- **429** The rate limit for this token is exhausted. See `Retry-After`. — codes: rate_limited
- **500** Something went wrong on our side. The failure is logged against `requestId`. — codes: internal_error

