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

ParameterRequiredDescription
keyYesYour API key
domainYesTarget domain (e.g., example.com)
typeNosubdomains (default)
freshNoSet 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

ParameterRequiredDescription
keyYesYour API key
targetYesIP address or domain
typeYesreverse_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

PlanDaily LimitPrice
Free100$0
Basic10,000$10/mo
Pro50,000$39.99/mo
UnlimitedUnlimited$99/mo

Rate limit headers are included in every response:

X-RateLimit-Limit: 10000
X-RateLimit-Remaining: 9999

Error Codes

CodeMeaning
400Bad request — missing or invalid parameters
401Unauthorized — invalid API key
429Rate limit exceeded
500Internal 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";
}