Documentation 4 min read

Domain API

The Domain API provides comprehensive domain intelligence including DNS analysis, WHOIS data, security threat detection, SSL certificate information, and web technology identification.


Overview

Get detailed information about any domain including:

  • DNS records (A, AAAA, MX, TXT, NS, CNAME, SOA, CAA)
  • WHOIS registration data
  • SSL/TLS certificate details
  • Web technology stack detection
  • Security threat analysis from 8+ databases
  • Domain age and classification

Authentication

All API requests require authentication using your API key. Include your API key in the request header:

X-API-Key: your_api_key_here

Alternatively, you can pass it as a query parameter:

?api_key=your_api_key_here

Endpoint

GET
/api/v1/domain/{domain}

Parameters

Parameter Type Required Description
domain string Yes The domain name to analyze (e.g., google.com)

Response Format

The API returns a JSON object with comprehensive domain information:

{
  "domain_identity": {
    "domain": "google.com",
    "punycode": "google.com",
    "subdomain": "",
    "domain_name": "google.com",
    "tld": "com",
    "is_subdomain": false,
    "domain_hash": "d4c9d9027326271a89ce51fcaf328ed673f17be33469ff979e8ab8dd501e664f"
  },
  "classification": {
    "types": [
      "email",
      "website",
      "dns",
      "developed"
    ],
    "is_new_domain": false,
    "is_suspicious_age": false
  },
  "dns_records": {
    "A": [
      "172.217.30.142"
    ],
    "AAAA": [
      "2800:3f0:4001:807::200e"
    ],
    "MX": [
      {
        "exchange": "smtp.google.com",
        "priority": 10
      }
    ],
    "TXT": [
      "MS=E4A68B9AB2BB9670BCE15412F62916164C0B20BB",
      "globalsign-smime-dv=CDYX+XFHUw2wml6/Gb8+59BsH31KzUr6c1l2BPvqKX8=",
      "v=spf1 include:_spf.google.com ~all",
      "facebook-domain-verification=22rm551cu4k0ab0bxsw536tlds4h95",
      "google-site-verification=TV9-DBe4R80X4v0M4U_bd_J9cpOJM0nikft0jAgjmsQ",
      "cisco-ci-domain-verification=47c38bc8c4b74b7233e9053220c1bbe76bcc1cd33c7acf7acd36cd6a5332004b",
      "onetrust-domain-verification=de01ed21f2fa4d8781cbc3ffb89cf4ef",
      "docusign=05958488-4752-4ef2-95eb-aa7ba8a3bd0e",
      "apple-domain-verification=30afIBcvSuDV2PLX",
      "google-site-verification=wD8N7i1JTNTkezJ49swvWW48f8_9xveREV4oB-0Hf5o",
      "google-site-verification=4ibFUgB-wXLQ_S7vsXVomSTVamuOXBiVAzpR5IZ87D0",
      "docusign=1b0a6754-49b1-4db5-8540-d2c12664b289"
    ],
    "NS": [
      "ns2.google.com",
      "ns4.google.com",
      "ns3.google.com",
      "ns1.google.com"
    ],
    "CNAME": null,
    "SOA": {
      "nsname": "ns1.google.com",
      "hostmaster": "dns-admin.google.com",
      "serial": 787663712,
      "refresh": 900,
      "retry": 900,
      "expire": 1800,
      "minttl": 60
    },
    "CAA": [
      {
        "critical": 0,
        "issue": "pki.goog"
      }
    ]
  },
  "dns_analysis": {
    "spf": {
      "record": "v=spf1 include:_spf.google.com ~all",
      "valid": true
    },
    "dmarc": {
      "record": null,
      "valid": false
    },
    "dkim": {
      "record": null,
      "valid": false
    },
    "has_mx": true,
    "has_caa": true,
    "wildcard_cert": false,
    "subdomain_takeover_risk": false
  },
  "whois": {
    "registrar": "MarkMonitor, Inc.",
    "registrant": null,
    "creation_date": "1997-09-15T07:00:00+0000",
    "expiration_date": null,
    "updated_date": "2024-08-02T02:17:33+0000",
    "status": [],
    "nameservers": [
      "ns4.google.com ns1.google.com ns3.google.com ns2.google.com"
    ],
    "privacy_protected": false
  },
  "domain_age": {
    "days": 10178,
    "years": 27,
    "is_new": false,
    "is_suspicious_age": false
  },
  "tls_certificate": {
    "subject": {
      "CN": "*.google.com"
    },
    "issuer": {
      "C": "US",
      "O": "Google Trust Services",
      "CN": "WR2"
    },
    "subject_alternative_names": [
      "*.google.com",
      "*.appengine.google.com",
      "*.bdn.dev",
      "*.origin-test.bdn.dev",
      "*.cloud.google.com",
      "*.crowdsource.google.com",
      "*.datacompute.google.com",
      "*.google.ca",
      "*.google.cl",
      "*.google.co.in",
      "*.google.co.jp",
      "*.google.co.uk",
      "*.google.com.ar",
      "*.google.com.au",
      "*.google.com.br",
      "*.google.com.co",
      "*.google.com.mx",
      "*.google.com.tr",
      "*.google.com.vn",
      "*.google.de",
      "*.google.es",
      "*.google.fr",
      "*.google.hu",
      "*.google.it",
      "*.google.nl",
      "*.google.pl",
      "*.google.pt",
      "*.googleapis.cn",
      "*.googlevideo.com",
      "*.gstatic.cn",
      "*.gstatic-cn.com",
      "googlecnapps.cn",
      "*.googlecnapps.cn",
      "googleapps-cn.com",
      "*.googleapps-cn.com",
      "gkecnapps.cn",
      "*.gkecnapps.cn",
      "googledownloads.cn",
      "*.googledownloads.cn",
      "recaptcha.net.cn",
      "*.recaptcha.net.cn",
      "recaptcha-cn.net",
      "*.recaptcha-cn.net",
      "widevine.cn",
      "*.widevine.cn",
      "ampproject.org.cn",
      "*.ampproject.org.cn",
      "ampproject.net.cn",
      "*.ampproject.net.cn",
      "google-analytics-cn.com",
      "*.google-analytics-cn.com",
      "googleadservices-cn.com",
      "*.googleadservices-cn.com",
      "googlevads-cn.com",
      "*.googlevads-cn.com",
      "googleapis-cn.com",
      "*.googleapis-cn.com",
      "googleoptimize-cn.com",
      "*.googleoptimize-cn.com",
      "doubleclick-cn.net",
      "*.doubleclick-cn.net",
      "*.fls.doubleclick-cn.net",
      "*.g.doubleclick-cn.net",
      "doubleclick.cn",
      "*.doubleclick.cn",
      "*.fls.doubleclick.cn",
      "*.g.doubleclick.cn",
      "dartsearch-cn.net",
      "*.dartsearch-cn.net",
      "googletraveladservices-cn.com",
      "*.googletraveladservices-cn.com",
      "googletagservices-cn.com",
      "*.googletagservices-cn.com",
      "googletagmanager-cn.com",
      "*.googletagmanager-cn.com",
      "googlesyndication-cn.com",
      "*.googlesyndication-cn.com",
      "*.safeframe.googlesyndication-cn.com",
      "app-measurement-cn.com",
      "*.app-measurement-cn.com",
      "gvt1-cn.com",
      "*.gvt1-cn.com",
      "gvt2-cn.com",
      "*.gvt2-cn.com",
      "2mdn-cn.net",
      "*.2mdn-cn.net",
      "googleflights-cn.net",
      "*.googleflights-cn.net",
      "admob-cn.com",
      "*.admob-cn.com",
      "googlesandbox-cn.com",
      "*.googlesandbox-cn.com",
      "*.safenup.googlesandbox-cn.com",
      "*.gstatic.com",
      "*.metric.gstatic.com",
      "*.gvt1.com",
      "*.gcpcdn.gvt1.com",
      "*.gvt2.com",
      "*.gcp.gvt2.com",
      "*.url.google.com",
      "*.youtube-nocookie.com",
      "*.ytimg.com",
      "ai.android",
      "android.com",
      "*.android.com",
      "*.flash.android.com",
      "g.cn",
      "*.g.cn",
      "g.co",
      "*.g.co",
      "goo.gl",
      "www.goo.gl",
      "google-analytics.com",
      "*.google-analytics.com",
      "google.com",
      "googlecommerce.com",
      "*.googlecommerce.com",
      "ggpht.cn",
      "*.ggpht.cn",
      "urchin.com",
      "*.urchin.com",
      "youtu.be",
      "youtube.com",
      "*.youtube.com",
      "music.youtube.com",
      "*.music.youtube.com",
      "youtubeeducation.com",
      "*.youtubeeducation.com",
      "youtubekids.com",
      "*.youtubekids.com",
      "yt.be",
      "*.yt.be",
      "android.clients.google.com",
      "*.android.google.cn",
      "*.chrome.google.cn",
      "*.developers.google.cn",
      "*.aistudio.google.com"
    ],
    "valid_from": "Jul  7 08:34:03 2025 GMT",
    "valid_to": "Sep 29 08:34:02 2025 GMT",
    "days_until_expiry": 63,
    "is_expired": false,
    "is_self_signed": false,
    "fingerprint": "CC:B6:27:D3:02:ED:CD:98:15:4D:FA:8E:6E:11:2C:57:EF:3D:FF:DF",
    "fingerprint256": "F7:00:C9:74:34:57:5E:BE:70:A7:0E:D2:9B:A8:2D:44:F1:CE:14:55:C3:D9:06:3F:83:68:95:A1:C6:B5:7F:26",
    "serial_number": "4EC2C0CFFEB61D6309244D58A1A1CA37",
    "public_key_algorithm": null,
    "key_size": 256,
    "protocol": "TLSv1.3",
    "cipher": {
      "name": "TLS_AES_256_GCM_SHA384",
      "standardName": "TLS_AES_256_GCM_SHA384",
      "version": "TLSv1.3"
    }
  },
  "web_analysis": {
    "status_code": 301,
    "headers": {
      "location": "https://www.google.com/",
      "content-type": "text/html; charset=UTF-8",
      "content-security-policy-report-only": "object-src 'none';base-uri 'self';script-src 'nonce-w_KhckQt59Ou8B2xAdRgDA' 'strict-dynamic' 'report-sample' 'unsafe-eval' 'unsafe-inline' https: http:;report-uri https://csp.withgoogle.com/csp/gws/other-hp",
      "permissions-policy": "unload=()",
      "date": "Mon, 28 Jul 2025 20:50:42 GMT",
      "expires": "Wed, 27 Aug 2025 20:50:42 GMT",
      "cache-control": "public, max-age=2592000",
      "server": "gws",
      "content-length": "220",
      "x-xss-protection": "0",
      "x-frame-options": "SAMEORIGIN",
      "alt-svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
      "connection": "close"
    },
    "title": "301 Moved",
    "meta_description": null,
    "meta_keywords": null,
    "content_length": 220,
    "response_time": 1753735856953,
    "technologies": [
      "Server: gws"
    ],
    "language": null,
    "has_forms": false,
    "external_links": 1,
    "internal_links": 0,
    "images_count": 0,
    "scripts_count": 0,
    "stylesheets_count": 0,
    "favicon": null,
    "canonical_url": null,
    "og_title": null,
    "og_description": null,
    "og_image": null
  },
  "network_details": {
    "ip_addresses": {
      "ipv4": [
        "172.217.30.142"
      ],
      "ipv6": [
        "2800:3f0:4001:807::200e"
      ]
    },
    "mail_servers": [
      {
        "exchange": "smtp.google.com",
        "priority": 10
      }
    ],
    "nameservers": [
      "ns2.google.com",
      "ns4.google.com",
      "ns3.google.com",
      "ns1.google.com"
    ],
    "hosting_provider": "gws"
  },
  "security_analysis": {
    "is_malicious": false,
    "threat_sources": [],
    "risk_assessment": {
      "risk_score": 0,
      "threat_types": [],
      "risk_level": "minimal"
    },
    "is_disposable_email": false
  },
  "metadata": {
    "lookup_time_ms": 1164,
    "timestamp": "2020-01-01T20:50:40.500Z",
    "data_sources_count": 8,
    "data_freshness": {
      "last_update_check": "2020-01-01T20:50:40.500Z",
      "sources_loaded": 737788
    }
  }
}

Examples

cURL

curl -X GET "https://chap.alphasystem.dev/api/v1/domain/google.com" \
  -H "X-API-Key: your_api_key_here"

JavaScript

const response = await fetch('https://chap.alphasystem.dev/api/v1/domain/google.com', {
  headers: {
    'X-API-Key': 'your_api_key_here'
  }
});
const data = await response.json();
console.log(data);

Python

import requests

url = "https://chap.alphasystem.dev/api/v1/domain/google.com"
headers = {"X-API-Key": "your_api_key_here"}

response = requests.get(url, headers=headers)
data = response.json()
print(data)

Error Handling

The API uses standard HTTP status codes and returns error details in JSON format:

Status Code Error Code Description
400 VALIDATION_ERROR Invalid domain format
401 MISSING_API_KEY API key not provided
401 INVALID_API_KEY Invalid or inactive API key
402 INSUFFICIENT_CREDITS Not enough credits remaining
404 NOT_FOUND Domain has no DNS records
429 RATE_LIMIT_EXCEEDED Too many requests

Error Response Example

{
  "error": "Invalid domain format",
  "code": "VALIDATION_ERROR"
}

Rate Limits

The API enforces the following rate limits:

  • 1000 requests per minute per API key
  • 1 credit per request deducted from your account

Rate limit headers are included in every response:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640995200