API Documentation
Integrate subdomain scanning into your tools with our REST API.
Authentication
All API requests require an API key. Pass it as a query parameter or header:
# Query parameter
GET /api.php?key=ss_your_api_key&domain=example.com&type=subdomains
# Header
curl -H "X-API-Key: ss_your_api_key" "https://nextscan.cc/api.php?domain=example.com&type=subdomains"
Endpoints
GET /api.php — Subdomain Scan
| Parameter | Required | Description |
key | Yes | Your API key |
domain | Yes | Target domain (e.g., example.com) |
type | No | subdomains (default) |
fresh | No | Set to 1 to bypass cache (Pro+ plans) |
Response
{
"success": true,
"data": {
"domain": "example.com",
"subdomains": [
{"subdomain": "mail.example.com", "ip": "93.184.216.34"},
{"subdomain": "api.example.com", "ip": "93.184.216.35"}
],
"total": 2,
"cached": false,
"scan_time_ms": 1234
}
}
GET /api.php — Reverse IP Lookup
| Parameter | Required | Description |
key | Yes | Your API key |
target | Yes | IP address or domain |
type | Yes | reverse_ip |
Response
{
"success": true,
"data": {
"target": "93.184.216.34",
"ip": "93.184.216.34",
"domains": ["example.com", "example.net"],
"total": 2,
"scan_time_ms": 456
}
}
Rate Limits
| Plan | Daily Limit | Price |
| Free | 100 | $0 |
| Basic | 10,000 | $10/mo |
| Pro | 50,000 | $39.99/mo |
| Unlimited | Unlimited | $99/mo |
Rate limit headers are included in every response:
X-RateLimit-Limit: 10000
X-RateLimit-Remaining: 9999
Error Codes
| Code | Meaning |
| 400 | Bad request — missing or invalid parameters |
| 401 | Unauthorized — invalid API key |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
Code Examples
Python
import requests
resp = requests.get("https://nextscan.cc/api.php", params={
"key": "ss_your_api_key",
"domain": "example.com",
"type": "subdomains"
})
data = resp.json()
for sub in data["data"]["subdomains"]:
print(sub["subdomain"], sub["ip"])
JavaScript
const resp = await fetch(
`https://nextscan.cc/api.php?key=ss_your_api_key&domain=example.com&type=subdomains`
);
const { data } = await resp.json();
data.subdomains.forEach(s => console.log(s.subdomain, s.ip));
PHP
$json = file_get_contents("https://nextscan.cc/api.php?key=ss_your_api_key&domain=example.com&type=subdomains");
$data = json_decode($json, true);
foreach ($data['data']['subdomains'] as $sub) {
echo $sub['subdomain'] . ' - ' . $sub['ip'] . "\n";
}