Search Subdomains

This endpoint allows to search for subdomains of a given domain. Search results will not only include subdomains but also all related to them objects (i.e. IP addresses, ASNs, RIRs).

Note

Please make sure you’re familiar with Data Types, Errors, Response Object Structure and other general concepts as all information from these sections is directly applicable to this endpoint.

Schema

POST /v1/subdomains/(str: domain)

Search for all seen subdomains and related objects for domain.

All JSON parameters are prefixed with <ip_version> which determines a version of IP addresses on which a given JSON parameter acts on. This can be one of the following: ipv4, ipv6, ip (both versions). More specific version always prevails meaning that below parameters

{
    "ipv4.history": true,
    "ip.history": false
}

are resolved as

{
    "ipv4.history": true,
    "ipv6.history": false
}
Parameters:
  • domain (str) – Domain which subdomains to return.
JSON Parameters:
 
  • <ip_version>.history (bool) – Return a list of IP addresses to which a found subdomain pointed in the past. Default is false.
  • <ip_version>.latest (bool) – Return the latest found IP address for each found subdomain. Default is true.
  • <ip_version>.oldest (bool) – Return the oldest found IP address for each found subdomain. Default is false.
  • <ip_version>.live (bool) – Perform a live DNS query and return its results for each found subdomain. Default is false.
  • <ip_version>.meta (bool) – Return extra information about IP addresses related to each found subdomain. Default is true.
Status Codes:
  • 200 OK – Subdomains search was successfull.
  • 400 Bad Request – Bad request. XXXXXXXFIXME See Errors for a general structure of an error response and Response Data for details on how error context is structured for this endpoint.
  • 404 Not Found – Subdomains search was performed successfully but yielded no results.
  • 429 Too Many Requests – API rate limit was exceeded. See Rate Limits for more information on how to gracefully handle API quota.
  • 500 Internal Server Error – Internal server error. This is most probably a bug. See Bugs Reporting for more information about how to report bugs and security vulnerabilities.

Minimal Example:

Todo

Fully document a complex request example for /v1/subdomains endpoint

http

POST /v1/subdomains/google.com HTTP/1.1
Host: api.zeroguard.com
Accept: application/json

curl

curl -i -X POST https://api.zeroguard.com/v1/subdomains/google.com -H 'Accept: application/json'

wget

wget -S -O- https://api.zeroguard.com/v1/subdomains/google.com --header='Accept: application/json'

python-requests

requests.post('https://api.zeroguard.com/v1/subdomains/google.com', headers={'Accept': 'application/json'})

response

HTTP/1.1 200 OK
Content-Type: application/json

{"stab": "StuB"}

Complex Example:

Todo

Fully document a complex request example for /v1/subdomains endpoint

http

POST /v1/subdomains/complex?fields=foo%2Cbar%2Cbaz HTTP/1.1
Host: api.zeroguard.com
Accept: application/json

curl

curl -i -X POST 'https://api.zeroguard.com/v1/subdomains/complex?fields=foo%2Cbar%2Cbaz' -H 'Accept: application/json'

wget

wget -S -O- 'https://api.zeroguard.com/v1/subdomains/complex?fields=foo%2Cbar%2Cbaz' --header='Accept: application/json'

python-requests

requests.post('https://api.zeroguard.com/v1/subdomains/complex?fields=foo%2Cbar%2Cbaz', headers={'Accept': 'application/json'})

Response Data

Todo

Fully document a response data object structure for /v1/subdomains endpoint

Error Context

Todo

Document error context for /v1/subdomains endpoint