Query Parameters¶
DNSDB API queries use two types of parameters to control searches:
- Path Parameters - Required components that form the core query structure
- Query String Parameters - Optional filters that refine results
Path Parameters¶
Path parameters are embedded in the URL path and define what you're searching for. They vary by lookup method.
RRset Lookup Path Parameters¶
RRset lookups follow this URL structure:
| Parameter | Required | Description |
|---|---|---|
| TYPE | Yes | How VALUE is interpreted: name (DNS owner name or wildcard) or raw (hex octet string) |
| VALUE | Yes | The search value - interpretation depends on TYPE |
| RRTYPE | No | DNS record type (A, NS, MX, etc.). If omitted, functions as "ANY" |
| BAILIWICK | No | Zone context for filtering results. Cannot be used with raw queries |
TYPE Parameter Values¶
| Type | Description |
|---|---|
| name | VALUE is a DNS owner name in presentation format or wildcards (*.example.com or www.example.*). Left-hand wildcard queries are more expensive than right-hand. |
| raw | VALUE is an even number of hexadecimal digits specifying a raw octet string |
RRTYPE Special Values¶
- ANY - Matches any RRtype except DNSSEC-related types (DS, RRSIG, NSEC, DNSKEY, NSEC3, NSEC3PARAM, DLV, CDS, CDNSKEY, TA)
- ANY-DNSSEC - Returns only DNSSEC-related record types
- If omitted, functions as if "ANY" was specified
Examples¶
# Lookup all RRsets for a domain
/dnsdb/v2/lookup/rrset/name/example.com
# Lookup only A records
/dnsdb/v2/lookup/rrset/name/example.com/A
# Wildcard search for subdomains
/dnsdb/v2/lookup/rrset/name/*.example.com/NS/example.com
# Raw query (hex for "fsi.io")
/dnsdb/v2/lookup/rrset/raw/0366736902696f00
Rdata Lookup Path Parameters¶
Rdata lookups follow this URL structure:
| Parameter | Required | Description |
|---|---|---|
| TYPE | Yes | How VALUE is interpreted: name, ip, or raw |
| VALUE | Yes | The search value - interpretation depends on TYPE |
| RRTYPE | No | DNS record type filter. If omitted, functions as "ANY" |
TYPE Parameter Values¶
| Type | Description |
|---|---|
| name | VALUE is a DNS domain name in presentation format, or left-hand (.example.com) or right-hand (www.example.) wildcard |
| ip | VALUE is IPv4/IPv6 address, with prefix length, or address range. Use comma (,) instead of slash (/) for prefix delimiter |
| raw | VALUE is an even number of hexadecimal digits specifying a raw octet string |
IP Address Formats¶
For ip type queries, VALUE can be:
- Single address:
10.0.0.1 - Network prefix:
10.0.0.1,24(note comma, not slash) - Address range:
10.0.0.1-10.1.255.255 - IPv6 (URL-encoded):
2620%3A11c%3Af008%3A%3A,126
Note
For ip lookups, RRTYPE values A, AAAA, and ANY are interchangeable - results are based on the IP address provided, not the RRTYPE value.
Examples¶
# Find all names pointing to an IP
/dnsdb/v2/lookup/rdata/ip/104.244.13.104
# Find names in a network
/dnsdb/v2/lookup/rdata/ip/104.244.13.104,29
# Find domains using a nameserver
/dnsdb/v2/lookup/rdata/name/ns5.dnsmadeeasy.com
# Find domains with specific mail server
/dnsdb/v2/lookup/rdata/name/mail.example.com
Query String Parameters¶
Query string parameters are appended to the URL with ? and & to filter and control results. These are optional and work with both rrset and rdata lookups.
Available Parameter Types¶
- Time-Fencing Parameters - Filter results by first seen/last seen timestamps
- Other Parameters - Control result limits, aggregation, formatting, and more
Example with Query Parameters¶
# Combine path and query string parameters
/dnsdb/v2/lookup/rrset/name/example.com/A?limit=100&time_last_after=1468281600
This query:
- Uses path parameters: name (TYPE), example.com (VALUE), A (RRTYPE)
- Uses query parameters: limit=100, time_last_after=1468281600
Summarize Queries¶
Summarize queries use the same path parameter structure but under /dnsdb/v2/summarize:
See Summarize for details on summarize-specific behavior.
Next Steps¶
- Learn about Time-Fencing Parameters for temporal filtering
- Explore Other Parameters for result control
- Review RRset Lookups for detailed examples
- Review Rdata Lookups for inverse search examples