Endpoint

GET /v1/download/

The download endpoint returns the full Emailyze disposable domain list as a gzipped JSONL (JSON Lines) file. It is designed for on-premise deployments, air-gapped environments, and compliance scenarios where you need to run lookups locally without calling the live API.

Authentication

The download endpoint requires a valid API key. You can authenticate using either:

1. Header — X-API-Key: your_api_key 2. Query parameter — ?key=your_api_key

The query parameter is useful when constructing download URLs for scripts or when you cannot set custom headers. For example:

curl -H "X-API-Key: YOUR_API_KEY" \
  -o disposable-domains.jsonl.gz \
  "https://api.emailyze.xyz/v1/download/"

Or with query parameter:

curl -o disposable-domains.jsonl.gz \
  "https://api.emailyze.xyz/v1/download/?key=YOUR_API_KEY"

Response Format

The response is a binary gzipped file with Content-Type: application/gzip. The Content-Disposition header includes the filename in the format:

disposable-domains-full-YYYYMMDDHH.jsonl.gz

For example: disposable-domains-full-2025030614.jsonl.gz (year, month, day, hour).

File Format

The file is a gzipped JSONL stream. After decompression, each line is a single JSON object representing one domain. There is no outer array or wrapper — each line is a complete, self-contained JSON document.

Example decompressed content (first few lines):

{"domain":"tempmail.com","is_disposable":true,"provider_type":"disposable","risk_score":95.0,"mx_records":["mx1.tempmail.com"],"first_seen":"2024-01-15T00:00:00Z","last_seen":"2025-03-06T14:00:00Z","sources":["disposable-list","community"]}
{"domain":"tempmail.net","is_disposable":true,"provider_type":"disposable","risk_score":93.0,"mx_records":["mail.tempmail.net"],"first_seen":"2024-02-01T00:00:00Z","last_seen":"2025-03-06T14:00:00Z","sources":["disposable-list"]}
{"domain":"throwaway.email","is_disposable":true,"provider_type":"disposable","risk_score":90.0,"mx_records":["mx.throwaway.email"],"first_seen":"2024-03-10T00:00:00Z","last_seen":"2025-03-06T14:00:00Z","sources":["community"]}

Per-Line Schema

Each object in the JSONL file contains:

| Field | Type | Description | |-----------------|---------|-------------| | domain | string | The domain name (e.g. tempmail.com). | | is_disposable | boolean | true for disposable domains. | | provider_type | string | disposable, personal, freemail, masked, or unknown. | | risk_score | number | 0–100; higher indicates greater risk. | | mx_records | array | MX hostnames for the domain, or empty array. | | first_seen | string | ISO 8601 date when domain was first seen. | | last_seen | string | ISO 8601 date when domain was last seen. | | sources | array | Source names contributing to classification. |

Additional fields may be present in future versions. Consumers should ignore unknown fields.

Update Frequency

The snapshot is regenerated hourly. The filename includes the hour (YYYYMMDDHH), so you can determine the freshness of the data. For automated updates, schedule a download job (e.g. via cron) to run every hour and replace the local file.

Request Example

Download and save to file:

curl -H "X-API-Key: YOUR_API_KEY" \
  -o disposable-domains-full.jsonl.gz \
  "https://api.emailyze.xyz/v1/download/"

Use the filename from Content-Disposition:

curl -H "X-API-Key: YOUR_API_KEY" \
  -J -O \
  "https://api.emailyze.xyz/v1/download/"

The -J flag tells curl to use the filename from Content-Disposition; -O saves to the current directory.

Decompress and process with jq:

curl -s -H "X-API-Key: YOUR_API_KEY" "https://api.emailyze.xyz/v1/download/" \
  | gunzip \
  | jq -r '.domain' \
  | head -20

Use Cases

Processing the File

Python example:

import gzip
import json

with gzip.open("disposable-domains-full.jsonl.gz", "rt") as f:
    for line in f:
        obj = json.loads(line)
        domain = obj["domain"]
        is_disposable = obj["is_disposable"]
        risk_score = obj.get("risk_score", 0)
        # Build lookup table or index
        if is_disposable:
            print(f"Block: {domain} (risk={risk_score})")

Node.js example:

const fs = require("fs");
const zlib = require("zlib");
const readline = require("readline");

const stream = fs.createReadStream("disposable-domains-full.jsonl.gz")
  .pipe(zlib.createGunzip());

const rl = readline.createInterface({ input: stream });
const domains = new Set();

rl.on("line", (line) => {
  const obj = JSON.parse(line);
  if (obj.is_disposable) domains.add(obj.domain);
});

rl.on("close", () => {
  console.log(`Loaded ${domains.size} disposable domains`);
});

Error Responses

| Status | Condition | Response Body | |--------|-----------|---------------| | 401 | Missing or invalid API key | {"detail": "Missing API key. Provide X-API-Key header or key query parameter."} or {"detail": "Invalid or inactive API key."} | | 429 | Rate limit exceeded | {"detail": "Request was throttled."} |

Building a Local Lookup

After downloading, build an in-memory set or hash map keyed by domain for O(1) lookups. Load only is_disposable domains if you only need to block disposables, or load the full object if you need risk_score and provider_type. The file size varies with the number of domains (typically tens of thousands); decompressed JSONL is larger than the gzipped file. For production, consider loading into Redis, PostgreSQL, or another datastore for persistence and concurrent access.

Cron Job Example

To refresh the snapshot hourly:

#!/bin/bash
# /etc/cron.hourly/emailyze-download
curl -s -H "X-API-Key: $EMAILGUARD_API_KEY" \
  "https://api.emailyze.xyz/v1/download/" \
  -o /var/data/disposable-domains.jsonl.gz
gunzip -f /var/data/disposable-domains.jsonl.gz
# Reload your application's lookup cache

Set EMAILGUARD_API_KEY in your environment. The -f flag for gunzip overwrites the decompressed file. Adjust the path and reload logic for your deployment.

File Size and Compression

The gzipped file is typically a few megabytes. The JSONL format compresses well because of repeated keys and structure. Decompressed, the file may be 10–20x larger. Ensure you have sufficient disk space and memory when processing. For streaming, read the gzipped stream with a library that supports incremental decompression (e.g. Python's gzip module, Node's zlib) so you can process line-by-line without loading the entire file into memory.

Security and Compliance

The download endpoint uses the same API key as other endpoints. Restrict key permissions if your deployment supports it. When transferring the file to air-gapped systems, use secure transfer methods (e.g. encrypted SFTP, signed artifacts). For compliance, retain the filename and download timestamp to document which snapshot version was used for classification decisions.

Differences from Live API

The download file contains domain-level data only. It does not include local_part_type (which requires a full email) or live SMTP verification. For the same domain, the classification in the file matches the live API at the time the snapshot was generated. Domains added or updated after the snapshot hour will not appear until the next hourly refresh.

See Also