Developer Reference
Subdomain Finder API Documentation
Subdomain Finder API Documentation: Discover subdomains using Certificate Transparency (CT) logs. Use prefer_cache=1 to poll cached results: cold misses return HTTP 202, queue a background refresh, and do not consume credits.
Subdomain Finder
Discover subdomains using Certificate Transparency (CT) logs. Use prefer_cache=1 to poll cached results: cold misses return HTTP 202, queue a background refresh, and do not consume credits.
GET
/v1/subdomains
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| domain required | string | Root domain to find subdomains for (e.g., "github.com") |
| prefer_cache optional | boolean | Serve cached results only. If no fresh or stale cache exists, the API returns 202, queues a background refresh, and charges 0 credits. |
| sources optional | string | Comma-separated data sources. Currently only ct (Certificate Transparency) is accepted. |
| verify optional | boolean | Verify each subdomain resolves via DNS (slower but more accurate). Default: false |
| limit optional | number | Maximum subdomains to return. Default: 500, Max: 2000 |
Use Cases
- Attack surface mapping and security audits
- Discover forgotten or shadow IT subdomains
- Pre-acquisition technical due diligence
- Competitive analysis of infrastructure
- Bug bounty reconnaissance
Response Fields
| Field | Description |
|---|---|
subdomains[].name | The discovered subdomain hostname |
subdomains[].source | Data source (e.g., "ct") |
subdomains[].first_seen | When this subdomain was first observed |
subdomains[].verified | Whether DNS resolution was confirmed (if verify=true) |
subdomains[].dns_records | DNS records found (if verify=true) |
summary.total_found | Total subdomains discovered before limit |
summary.verified_count | Number of verified (live) subdomains |
HTTP Status Codes
| HTTP Status Codes | Description |
|---|---|
200 OK | Request successful |
202 Accepted | Cache-only subdomain miss accepted for background refresh. No credits are charged; retry after the Retry-After delay. |
400 Bad Request | Invalid parameters |
402 Payment Required | Not enough credits to run this request. |
503 Service Unavailable | Upstream service unavailable or temporarily rate limited. |
504 Gateway Timeout | Upstream lookup timed out. |
Example Request
# Find subdomains (fast, from CT logs)
curl "https://domscan.net/v1/subdomains?domain=github.com&limit=100"
# Find and verify subdomains (slower, confirms DNS resolution)
curl "https://domscan.net/v1/subdomains?domain=github.com&verify=true&limit=50"
curl "https://domscan.net/v1/subdomains?domain=github.com&prefer_cache=1"
import requests
# Enumerate subdomains with verification
response = requests.get(
"https://domscan.net/v1/subdomains",
params={
"domain": "github.com",
"verify": "true",
"limit": 100
}
)
data = response.json()
print(f"Found {data['summary']['total_found']} subdomains")
print(f"Verified: {data['summary']['verified_count']}")
# Filter to only live subdomains
live_subs = [s for s in data['subdomains'] if s['verified']]
for sub in live_subs[:10]:
print(f" {sub['name']}")
const response = await fetch(
'https://domscan.net/v1/subdomains?' + new URLSearchParams({
domain: 'github.com',
verify: 'true',
limit: '100'
})
);
const data = await response.json();
console.log(`Found ${data.summary.total_found} subdomains`);
console.log(`Verified: ${data.summary.verified_count}`);
// List verified subdomains
data.subdomains
.filter(s => s.verified)
.forEach(s => console.log(` ${s.name}`));
Example Response
{
"domain": "github.com",
"subdomains": [
{
"name": "api.github.com",
"source": "ct",
"first_seen": "2024-01-15T00:00:00Z",
"verified": true,
"dns_records": ["A 140.82.112.5"]
},
{
"name": "gist.github.com",
"source": "ct",
"first_seen": "2024-02-01T00:00:00Z",
"verified": true,
"dns_records": ["CNAME github.github.io"]
},
{
"name": "education.github.com",
"source": "ct",
"first_seen": "2023-06-10T00:00:00Z",
"verified": true,
"dns_records": ["A 185.199.108.153"]
}
],
"summary": {
"total_found": 847,
"returned": 3,
"verified_count": 3,
"unverified_count": 0,
"sources_used": ["ct"]
},
"meta": {
"query_time_ms": 1250,
"cached": false
}
}
202 Accepted
{
"status": "pending",
"code": "CACHE_MISS_REFRESH_QUEUED",
"message": "Try again in a moment",
"domain": "github.com",
"retry_after": 30,
"credits_charged": 0,
"billing_status": "not_charged",
"request_id": "m8abc12-x9y8"
}