Developer reference

Subdomain Finder

Explore Subdomain Finder API documentation, request parameters, response fields, code examples, and error handling for DomScan integrations.

Subdomain Finder

No. This is best-effort passive coverage. Internal names and public hosts missing from the source datasets will not appear, and DNS verification does not search for additional names.

Use GET /v1/subdomains?domain=example.com&sources=ct. The ct value selects the compatibility pipeline, while each entry reports its actual evidence source. Cache-only misses return 202 and all-source failures return 503; both refund credits.

GET/v1/subdomains

Query parameters

ParameterTypeDescription
domain requiredstringDomain or hostname to find subdomains for (e.g., "github.com" or "docs.github.com"). A hostname returns the names under it, a pasted URL keeps only its host, and a leading www. means the domain itself.
prefer_cache optionalboolean tokenServe cached results only. If no fresh or stale cache exists, the API returns 202, queues a background refresh, and refunds the request credits. Accepted values: true, false, 1, 0, yes, and no. Default: false.
sources optionalstringCompatibility selector. Only ct is accepted. It starts the passive discovery pipeline, but each result reports the provider that supplied its evidence: crtsh, crtname, hackertarget, threatminer, wayback, or certspotter. Older cached entries may report ct.
verify optionalboolean tokenCheck DNS only for the names already selected for the response. Verification does not discover more names. Accepted values: true, false, 1, 0, yes, and no. Default: false.
include_wildcards optionalboolean tokenReturn wildcard certificate evidence in a separate wildcards array. Wildcards are not mixed into concrete hostname results. Accepted values: true, false, 1, 0, yes, and no. Default: false.
limit optionalintegerMaximum concrete hostname entries to return. Enter an integer from 1 through 2000. Default: 500.
cursor optionalstringThe next_cursor from the previous page. See pagination.

Use cases

  • Attack surface mapping and security audits
  • Review possible forgotten or shadow IT hostnames
  • Pre-acquisition technical due diligence
  • Competitive analysis of infrastructure
  • Bug bounty reconnaissance

Response fields

FieldDescription
subdomains[].nameReturned hostname. The apex can appear when a source includes it.
subdomains[].sourceReview public hostname evidence with clear source labels
subdomains[].first_seenCT-backed entries report the earliest certificate not-before value found. Passive fallback entries can return null.
subdomains[].verifiedTrue only when verify is enabled and DNS resolution (A, AAAA or CNAME) succeeds for the returned hostname. Null when verify is enabled but DNS gave no answer in time. Otherwise false.
subdomains[].dns_recordsA, AAAA and CNAME records from optional verification of the returned hostname, or null. This field does not add names to the result.
summary.total_foundTotal concrete hostname entries found before the response limit, including the apex when a source includes it.
summary.verified_countNumber of returned hostnames that resolved during optional DNS verification.

HTTP status codes

HTTP status codesDescription
200 OKRequest successful
202 AcceptedCache-only subdomain miss accepted for background refresh. No credits are charged; retry after the Retry-After delay.
400 Bad RequestInvalid parameters
402 Payment RequiredNot enough credits to run this request.
503 Service UnavailableUpstream service unavailable or temporarily rate limited.
504 Gateway TimeoutUpstream lookup timed out.

Example request

curl -H "X-API-Key: your-api-key" "https://domscan.net/v1/subdomains?domain=example.com&sources=ct&include_wildcards=yes&limit=100"

curl -H "X-API-Key: your-api-key" "https://domscan.net/v1/subdomains?domain=example.com&sources=ct&verify=yes&limit=50"

curl -H "X-API-Key: your-api-key" "https://domscan.net/v1/subdomains?domain=example.com&prefer_cache=1"
import requests

domscan = requests.Session()
domscan.headers.update({"X-API-Key": "your-api-key"})

response = domscan.get(
    "https://domscan.net/v1/subdomains",
    params={
        "domain": "example.com",
        "sources": "ct",
        "verify": "yes",
        "include_wildcards": "yes",
        "limit": 100
    }
)
data = response.json()

print(f"Returned {data['summary']['returned']} hostname entries")
print(f"Verified: {data['summary']['verified_count']}")

live_subs = [s for s in data['subdomains'] if s['verified']]
for sub in live_subs[:10]:
    print(f"  {sub['name']}")
const domscanFetch = (url, options = {}) =>
  fetch(url, {
    ...options,
    headers: { ...options.headers, "X-API-Key": "your-api-key" },
  });

const response = await domscanFetch(
  'https://domscan.net/v1/subdomains?' + new URLSearchParams({
    domain: 'example.com',
    sources: 'ct',
    verify: 'yes',
    include_wildcards: 'yes',
    limit: '100'
  })
);
const data = await response.json();

console.log(`Returned ${data.summary.returned} hostname entries`);
console.log(`Verified: ${data.summary.verified_count}`);

data.subdomains
  .filter(s => s.verified)
  .forEach(s => console.log(`  ${s.name}`));

Example response

{
  "domain": "example.com",
  "subdomains": [
    {
      "name": "api.example.com",
      "source": "crtsh",
      "first_seen": "2025-01-15T00:00:00Z",
      "verified": true,
      "dns_records": {
        "A": ["192.0.2.10"],
        "CNAME": null
      }
    }
  ],
  "wildcards": [
    {
      "pattern": "*.example.com",
      "source": "crtsh",
      "first_seen": "2024-11-20T00:00:00Z"
    }
  ],
  "summary": {
    "total_found": 1,
    "returned": 1,
    "verified_count": 1,
    "unverified_count": 0,
    "sources_used": ["crtsh"],
    "apex_included": false,
    "wildcard_suppressed_count": 1,
    "wildcard_returned_count": 1
  },
  "intelligence_summary": {
    "data_sources": ["crtsh"],
    "source_count": 1,
    "cache_status": "live",
    "returned_count": 1,
    "total_found": 1,
    "truncated": false,
    "limit": 100,
    "verification_requested": true,
    "include_wildcards": true,
    "verified_count": 1,
    "verified_ratio": 1,
    "live_dns_record_count": 1,
    "apex_included": false,
    "wildcard_suppressed_count": 1,
    "wildcard_returned_count": 1,
    "first_seen_oldest": "2025-01-15T00:00:00Z",
    "first_seen_newest": "2025-01-15T00:00:00Z",
    "warning_count": 0
  },
  "meta": {
    "query_time_ms": 184,
    "cached": false
  }
}

202 Accepted

{
  "status": "pending",
  "code": "CACHE_MISS_REFRESH_QUEUED",
  "message": "Try again in a moment",
  "domain": "example.com",
  "retry_after": 30,
  "credits_charged": 0,
  "billing_status": "not_charged",
  "request_id": "m8abc12-x9y8"
}
POST/v1/subdomains/bulkCredits: 4-5/item

Query parameters

ParameterTyperequired
dry_runstring
Allowed values true
optional

Body parameters

ParameterTyperequired
domainsstring[]required
verifyboolean
Default false
optional
include_wildcardsboolean
Default false
optional
limitinteger
Default 500
optional

Response fields

FieldType
results[]unknown[]
metaobject
meta.totalinteger
meta.succeededinteger
meta.failedinteger
meta.max_itemsinteger
meta.credits_per_iteminteger
meta.duration_msinteger

Example request

curl -X POST "https://domscan.net/v1/subdomains/bulk" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $DOMSCAN_API_KEY" \
  -d '{
  "domains": [
    "example.com",
    "cloudflare.com"
  ],
  "verify": false,
  "limit": 500
}'
const response = await fetch("https://domscan.net/v1/subdomains/bulk", {
  method: "POST",
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({
    "domains": [
      "example.com",
      "cloudflare.com"
    ],
    "verify": false,
    "limit": 500
  }),
});
const data = await response.json();
console.log(data);
import os
import requests

response = requests.post(
    "https://domscan.net/v1/subdomains/bulk",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
    json={
        "domains": [
            "example.com",
            "cloudflare.com",
        ],
        "verify": False,
        "limit": 500,
    },
)
print(response.json())
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
	"strings"
)

func main() {
	body := strings.NewReader(`{
	  "domains": [
	    "example.com",
	    "cloudflare.com"
	  ],
	  "verify": false,
	  "limit": 500
	}`)
	req, err := http.NewRequest(http.MethodPost, "https://domscan.net/v1/subdomains/bulk", body)
	if err != nil {
		panic(err)
	}
	req.Header.Set("X-API-Key", os.Getenv("DOMSCAN_API_KEY"))
	req.Header.Set("Content-Type", "application/json")

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	data, err := io.ReadAll(resp.Body)
	if err != nil {
		panic(err)
	}
	fmt.Println(resp.Status, string(data))
}
require "json"
require "net/http"

uri = URI("https://domscan.net/v1/subdomains/bulk")
request = Net::HTTP::Post.new(uri)
request["X-API-Key"] = ENV.fetch("DOMSCAN_API_KEY")
request["Content-Type"] = "application/json"
request.body = JSON.generate({
  "domains" => [
    "example.com",
    "cloudflare.com"
  ],
  "verify" => false,
  "limit" => 500
})

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
  http.request(request)
end
puts JSON.pretty_generate(JSON.parse(response.body))

Example response

{
  "results": [
    {
      "input": "example",
      "data": {}
    }
  ],
  "meta": {
    "total": 1,
    "succeeded": 1,
    "failed": 1,
    "max_items": 10,
    "credits_per_item": 1,
    "duration_ms": 1
  }
}

HTTP status codes

  • 200 OK
  • 400 Bad Request
  • 401 Unauthorized
  • 402 Payment Required
  • 409 HTTP 409
  • 422 HTTP 422
  • 429 Too Many Requests