DNS Lookup API
Last updated: 2026-10-15
POST /api/v2/dns/query with Content-Type: application/json
Base URL, response format and rate limits are shared across endpoints — see the API documentation.
| Parameter | Description |
|---|---|
name |
Domain to query. IP addresses and wildcards are not supported. |
type |
Record type: A (default), AAAA, CNAME, TXT, MX, NS. |
server |
Resolver: cloudflare (default), google, quad9, alidns, dnspod, volcengine. |
Example:
curl -X POST "https://tcp.lc/api/v2/dns/query" \
-H "Content-Type: application/json" \
-d '{"name":"example.com","type":"A"}'
Response data fields: name, type, resolver server (key / label / ip), elapsed (milliseconds), rcode, and records. Each record has name, type, ttl and value, plus priority for MX records and segments for TXT records.
Common errors: api.param.name.invalid, api.param.name.ip_unsupported, api.notfound.domain, api.upstream.timeout.