Datazag
Developer Portal
/v1.2 Reference

Domain Intelligence API

Programmatic access to Datazag's continuously refreshed dataset of 315M+ domains. Built for high-scale KYC, fraud prevention, and deliverability automation.

Overview

The Datazag API is a RESTful interface for querying real-time signals on over 315 million domains. Unlike static datasets, our API provides "Answers" by aggregating live DNS, hosting, and risk telemetry into actionable binary flags and risk scores.

Fraud Prevention

Real-time domain scoring (0–100) identifies phishing, disposable, and typo-squatted domains instantly.

Deliverability Intelligence

Validate SPF/DMARC health and categorize mailbox providers to optimize marketing ROI.

Authentication

Datazag uses API keys to allow access to the API. Every request must include your private key in the header.

Header Name

X-API-Key
Required
Never expose your API key in client-side code.
Rotate keys every 90 days for SOC2 compliance.
bash
X-API-Key: YOUR_API_KEY

The Domain Endpoint

Retrieve a comprehensive profile for any hostname. Our system automatically resolves redirects and parses parent domain context for subdomains.

GET
/api/{domain}

Query Parameters

ParameterTypeRequiredDescription
domainstringRequiredDomain host to query, e.g. example.com
excludestringOptionalComma-separated list of fields to trim from the response

Implementation Examples

cURL Example
curl -H "X-API-Key: YOUR_API_KEY" https://api.datazag.com/api/example.com

Success Response

JSON Payload
{
  "domain": "example.com",
  "ns": "ns1.provider.net",
  "soa": "hostmaster@example.com",
  "status": "active",
  "suffix": "com",
  "ip": "192.0.2.1",
  "country_dm": "US",
  "risk_score": 20,
  "flags": {
    "is_mailbox_provider": false,
    "is_phishing": false,
    "is_mailable": true,
    "is_disposable": false,
    "has_dmarc": true,
    "has_spf": true
  }
}

Output Glossary

PropertyData TypeDefinition
risk_scoreintegerOverall risk rating (0-100). Higher score indicates higher probability of abuse.
flags.is_phishingbooleanTrue if flagged on real-time phishing intelligence blacklists.
flags.is_disposablebooleanTrue if domain belongs to a temporary or disposable email provider.
flags.is_mailablebooleanIndicates if the domain is suitable for sending and receiving legitimate email.
flags.is_mailbox_providerbooleanTrue for well-known providers like Gmail, Outlook, Proton, etc.
flags.is_parkedbooleanTrue if the domain resolves to a generic parking page or is for sale.

Intelligent Decision logic

The API is designed for automated decision systems. We recommend implementing the following thresholds into your internal risk engine.

Hard Reject

Reject traffic if is_phishing or is_disposable is true.

Manual Review

Flag for security audit if risk_score ≥ 70 or the domain is new (< 30 days).

Preferred

Whitelists users where has_spf and has_dmarc are both true.

Core Industry Workflows

01

KYC & Compliance

Prevent platform abuse by blocking domains typically associated with botnets and temporary accounts. Use the global rank signal to verify the authority of corporate email signups.

02

Revenue Operations

Automatically enrich inbound leads with infrastructure health. Discard un-mailable leads before they touch your CRM to maintain high IP reputation and reduce bounce rates.

Scaling & Performance

High Velocity

Average response time sits consistently under 200ms globaly.

PRO TIP: Use ?exclude=infrastructure to save 40% bandwidth.
Default Rate Limits

5,000 requests per hour per key. For bulk cleaning, we recommend our Snowflake sharing layer.

Global Coverage

Lookup performance is consistent across USA, EU, and APAC via our edge-caching layer.

Common Error Codes

StatusMessageDefinition
400Bad RequestMalformed domain or parameters
401UnauthorizedInvalid or missing API key
404Not FoundDomain not found
429Too Many RequestsRate limit exceeded
500Internal Server ErrorUnexpected server error

FAQ

How fresh is the data?

Our database is refreshed continuously from hundreds of DNS sensor nodes. Critical infrastructure changes are typically detected and updated within 12–24 hours.

Do you support subdomains?

Full hostnames are supported. The API intelligently analyzes the specific host while cross-referencing parent domain risk signals for a complete profile.

Is batch processing available?

Yes. For processing millions of records, we provide native Snowflake Data Shares, S3 Parquet feeds, and Google BigQuery datasets.

What identifies the 'is_mailable' flag?

It's a synthesis of MX record validity, SPF/DMARC health, and the absence of malicious flags or disposable provider associations.