diff --git a/README.md b/README.md index 3d76845..4431d25 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # WhoisFreaks SDK Documentation Official documentation for the **WhoisFreaks** SDKs: one API, 10 -languages, 60 endpoints. Every SDK is generated from the same +languages, 94 endpoints. Every SDK is generated from the same [OpenAPI specification](spec/whoisfreaks-openapi.yaml) and published to its language's standard registry. @@ -11,7 +11,7 @@ its language's standard registry. - [Authentication](docs/authentication.md): get and configure your API key - [Language guides](#language-guides): install + usage for each SDK -- [Endpoint reference](docs/endpoints/README.md): all 60 endpoints, grouped by category +- [Endpoint reference](docs/endpoints/README.md): all 94 endpoints, grouped by category - [Runnable examples](examples/README.md): copy-paste, ready-to-run example for every endpoint in every language ## Language guides @@ -56,17 +56,17 @@ The equivalent for every other language is in its [language guide](#language-gui The API is organized into three sections. See the [full endpoint reference](docs/endpoints/README.md) for every operation with its URL, parameters, response fields and Python, TypeScript and Go examples. The [language guides](#language-guides) show every operation in all 10 languages. -### [API Solutions](docs/endpoints/api-solutions.md) (20 endpoints) +### [API Solutions](docs/endpoints/api-solutions.md) (26 endpoints) Real-time and on-demand lookup APIs. Query a single domain, IP, or ASN and get structured JSON (or XML) back immediately. [WHOIS](docs/endpoints/whois.md), [DNS](docs/endpoints/dns.md), [Domain Availability](docs/endpoints/domain-availability.md), [Typosquatting](docs/endpoints/typosquatting.md), [SSL](docs/endpoints/ssl.md), [Geolocation](docs/endpoints/geolocation.md), [Subdomains](docs/endpoints/subdomains.md), [IP Reputation](docs/endpoints/ip-reputation.md), [Domain Reputation](docs/endpoints/domain-reputation.md), [ASN WHOIS](docs/endpoints/asn-whois.md), [IP WHOIS](docs/endpoints/ip-whois.md) -### [Databases](docs/endpoints/databases.md) (37 endpoints) +### [Databases](docs/endpoints/databases.md) (65 endpoints) Bulk data feeds and downloadable database snapshots for large-scale processing: newly registered, expiring/dropped, and full WHOIS/DNS/IP datasets. -[Databases - Newly Registered](docs/endpoints/databases-newly-registered.md), [Databases - Expiring & Dropped](docs/endpoints/databases-expiring-dropped.md), [Databases - WHOIS](docs/endpoints/databases-whois.md), [Databases - DNS](docs/endpoints/databases-dns.md), [Databases - Subdomains](docs/endpoints/databases-subdomains.md), [Databases - IP Geolocation](docs/endpoints/databases-ip-geolocation.md), [Databases - ASN WHOIS](docs/endpoints/databases-asn-whois.md), [Databases - IP WHOIS](docs/endpoints/databases-ip-whois.md), [Databases - IP Security](docs/endpoints/databases-ip-security.md), [Databases - Threat Feed](docs/endpoints/databases-threat-feed.md) +[Databases - Newly Registered](docs/endpoints/databases-newly-registered.md), [Databases - Expiring & Dropped](docs/endpoints/databases-expiring-dropped.md), [Databases - WHOIS](docs/endpoints/databases-whois.md), [Databases - DNS](docs/endpoints/databases-dns.md), [Databases - Subdomains](docs/endpoints/databases-subdomains.md), [Databases - IP Geolocation](docs/endpoints/databases-ip-geolocation.md), [Databases - ASN WHOIS](docs/endpoints/databases-asn-whois.md), [Databases - IP WHOIS](docs/endpoints/databases-ip-whois.md), [Databases - IP Security](docs/endpoints/databases-ip-security.md), [Databases - Threat Feed](docs/endpoints/databases-threat-feed.md), [Databases - Streaming](docs/endpoints/databases-streaming.md) ### [Account & Utilities](docs/endpoints/account-utilities.md) (3 endpoints) diff --git a/docs/endpoints/README.md b/docs/endpoints/README.md index 29dfad4..fb09b23 100644 --- a/docs/endpoints/README.md +++ b/docs/endpoints/README.md @@ -1,21 +1,21 @@ # Endpoint Reference -The WhoisFreaks API exposes **60 endpoints** across **22 categories**, organized into 3 sections. Every endpoint is available in all 10 SDKs. +The WhoisFreaks API exposes **94 endpoints** across **23 categories**, organized into 3 sections. Every endpoint is available in all 10 SDKs. ## API Solutions Real-time and on-demand lookup APIs. Query a single domain, IP, or ASN and get structured JSON (or XML) back immediately. -20 endpoints across 11 categories. See the [API Solutions overview](api-solutions.md). +26 endpoints across 11 categories. See the [API Solutions overview](api-solutions.md). - [WHOIS](whois.md): 4 endpoints -- [DNS](dns.md): 4 endpoints +- [DNS](dns.md): 8 endpoints - [Domain Availability](domain-availability.md): 2 endpoints - [Typosquatting](typosquatting.md): 1 endpoint - [SSL](ssl.md): 1 endpoint - [Geolocation](geolocation.md): 2 endpoints - [Subdomains](subdomains.md): 1 endpoint -- [IP Reputation](ip-reputation.md): 2 endpoints +- [IP Reputation](ip-reputation.md): 4 endpoints - [Domain Reputation](domain-reputation.md): 1 endpoint - [ASN WHOIS](asn-whois.md): 1 endpoint - [IP WHOIS](ip-whois.md): 1 endpoint @@ -24,7 +24,7 @@ Real-time and on-demand lookup APIs. Query a single domain, IP, or ASN and get s Bulk data feeds and downloadable database snapshots for large-scale processing: newly registered, expiring/dropped, and full WHOIS/DNS/IP datasets. -37 endpoints across 10 categories. See the [Databases overview](databases.md). +65 endpoints across 11 categories. See the [Databases overview](databases.md). - [Databases - Newly Registered](databases-newly-registered.md): 7 endpoints - [Databases - Expiring & Dropped](databases-expiring-dropped.md): 5 endpoints @@ -36,6 +36,7 @@ Bulk data feeds and downloadable database snapshots for large-scale processing: - [Databases - IP WHOIS](databases-ip-whois.md): 2 endpoints - [Databases - IP Security](databases-ip-security.md): 2 endpoints - [Databases - Threat Feed](databases-threat-feed.md): 6 endpoints +- [Databases - Streaming](databases-streaming.md): 28 endpoints ## Account & Utilities @@ -56,6 +57,10 @@ Manage your account, monitor API usage and credits, and rotate your API key. | API Solutions | DNS | GET | `/v2.0/dns/live` | `dnsLive` | | API Solutions | DNS | GET | `/v2.0/dns/historical` | `dnsHistorical` | | API Solutions | DNS | GET | `/v2.1/dns/reverse` | `dnsReverse` | +| API Solutions | DNS | GET | `/v2.2/dns/historical` | `dnsHistoricalV22` | +| API Solutions | DNS | GET | `/v2.3/dns/historical` | `dnsHistoricalV23` | +| API Solutions | DNS | GET | `/v2.2/dns/reverse` | `dnsReverseV22` | +| API Solutions | DNS | GET | `/v2.3/dns/reverse` | `dnsReverseV23` | | API Solutions | DNS | POST | `/v2.0/dns/bulk/live` | `dnsBulk` | | API Solutions | Domain Availability | GET | `/v2.0/domain/availability` | `domainAvailabilityV2` | | API Solutions | Domain Availability | POST | `/v2.0/domain/availability` | `bulkDomainAvailabilityV2` | @@ -66,6 +71,8 @@ Manage your account, monitor API usage and credits, and rotate your API key. | API Solutions | Subdomains | GET | `/v1.0/subdomains` | `subdomains` | | API Solutions | IP Reputation | GET | `/v1.0/security` | `ipReputation` | | API Solutions | IP Reputation | POST | `/v1.0/security` | `bulkIpReputation` | +| API Solutions | IP Reputation | GET | `/v2.0/security` | `ipReputationV2` | +| API Solutions | IP Reputation | POST | `/v2.0/security` | `bulkIpReputationV2` | | API Solutions | Domain Reputation | GET | `/v1/domain/security` | `domainReputation` | | API Solutions | ASN WHOIS | GET | `/v2.0/asn-whois` | `asnWhois` | | API Solutions | IP WHOIS | GET | `/v1.0/ip-whois` | `ipWhois` | @@ -109,3 +116,31 @@ Manage your account, monitor API usage and credits, and rotate your API key. | Databases | Databases - Threat Feed | GET | `/v3.4/download/threat-feed/malware/sample` | `downloadThreatFeedMalwareSample` | | Databases | Databases - Threat Feed | GET | `/v3.4/download/threat-feed/spam` | `downloadThreatFeedSpam` | | Databases | Databases - Threat Feed | GET | `/v3.4/download/threat-feed/spam/sample` | `downloadThreatFeedSpamSample` | +| Databases | Databases - Streaming | GET | `/v3.4/stream/threat-feed/phishing` | `streamThreatFeedPhishing` | +| Databases | Databases - Streaming | GET | `/v3.4/stream/threat-feed/phishing/sample` | `streamThreatFeedPhishingSample` | +| Databases | Databases - Streaming | GET | `/v3.4/stream/threat-feed/malware` | `streamThreatFeedMalware` | +| Databases | Databases - Streaming | GET | `/v3.4/stream/threat-feed/malware/sample` | `streamThreatFeedMalwareSample` | +| Databases | Databases - Streaming | GET | `/v3.4/stream/threat-feed/spam` | `streamThreatFeedSpam` | +| Databases | Databases - Streaming | GET | `/v3.4/stream/threat-feed/spam/sample` | `streamThreatFeedSpamSample` | +| Databases | Databases - Streaming | GET | `/v3.3/stream/domainer/gtld` | `streamDomainerGtld` | +| Databases | Databases - Streaming | GET | `/v3.3/stream/domainer/gtld/cleaned` | `streamDomainerGtldCleaned` | +| Databases | Databases - Streaming | GET | `/v3.3/stream/domainer/gtld/cleaned/email` | `streamDomainerGtldCleanedEmail` | +| Databases | Databases - Streaming | GET | `/v3.3/stream/domainer/gtld/cleaned/phone` | `streamDomainerGtldCleanedPhone` | +| Databases | Databases - Streaming | GET | `/v3.3/stream/domainer/cctld` | `streamDomainerCctld` | +| Databases | Databases - Streaming | GET | `/v3.3/stream/domainer/cctld/cleaned` | `streamDomainerCctldCleaned` | +| Databases | Databases - Streaming | GET | `/v3.3/stream/domainer/cctld/cleaned/email` | `streamDomainerCctldCleanedEmail` | +| Databases | Databases - Streaming | GET | `/v3.3/stream/domainer/cctld/cleaned/phone` | `streamDomainerCctldCleanedPhone` | +| Databases | Databases - Streaming | GET | `/v3.3/stream/domainer/expired` | `streamDomainerExpired` | +| Databases | Databases - Streaming | GET | `/v3.3/stream/domainer/expired/cleaned` | `streamDomainerExpiredCleaned` | +| Databases | Databases - Streaming | GET | `/v3.3/stream/domainer/expired/cleaned/email` | `streamDomainerExpiredCleanedEmail` | +| Databases | Databases - Streaming | GET | `/v3.3/stream/domainer/expired/cleaned/phone` | `streamDomainerExpiredCleanedPhone` | +| Databases | Databases - Streaming | GET | `/v3.3/stream/domainer/dropped` | `streamDomainerDropped` | +| Databases | Databases - Streaming | GET | `/v3.3/stream/domainer/dropped/backlinks` | `streamDomainerDroppedBacklinks` | +| Databases | Databases - Streaming | GET | `/v3.3/stream/domainer/sample/gtld` | `streamDomainerGtldSample` | +| Databases | Databases - Streaming | GET | `/v3.3/stream/domainer/sample/gtld/cleaned` | `streamDomainerGtldCleanedSample` | +| Databases | Databases - Streaming | GET | `/v3.3/stream/domainer/sample/cctld` | `streamDomainerCctldSample` | +| Databases | Databases - Streaming | GET | `/v3.3/stream/domainer/sample/cctld/cleaned` | `streamDomainerCctldCleanedSample` | +| Databases | Databases - Streaming | GET | `/v3.3/stream/domainer/sample/expired` | `streamDomainerExpiredSample` | +| Databases | Databases - Streaming | GET | `/v3.3/stream/domainer/sample/expired/cleaned` | `streamDomainerExpiredCleanedSample` | +| Databases | Databases - Streaming | GET | `/v3.3/stream/domainer/sample/dropped` | `streamDomainerDroppedSample` | +| Databases | Databases - Streaming | GET | `/v3.3/stream/domainer/sample/dropped/backlinks` | `streamDomainerDroppedBacklinksSample` | diff --git a/docs/endpoints/api-solutions.md b/docs/endpoints/api-solutions.md index 0e3b6ad..f3131b6 100644 --- a/docs/endpoints/api-solutions.md +++ b/docs/endpoints/api-solutions.md @@ -2,7 +2,7 @@ Real-time and on-demand lookup APIs. Query a single domain, IP, or ASN and get structured JSON (or XML) back immediately. -**20 endpoints** across **11 categories**. Requests need your API key unless noted otherwise. See [Authentication](../authentication.md). +**26 endpoints** across **11 categories**. Requests need your API key unless noted otherwise. See [Authentication](../authentication.md). ## Categories @@ -21,11 +21,15 @@ WHOIS lookup APIs (live, historical, reverse, bulk) DNS lookup APIs (live, historical, reverse, bulk) -4 endpoints: +8 endpoints: - **Live DNS Lookup**: `GET /v2.0/dns/live` - **Historical DNS Lookup**: `GET /v2.0/dns/historical` - **Reverse DNS Lookup**: `GET /v2.1/dns/reverse` +- **Historical DNS Lookup (v2.2)**: `GET /v2.2/dns/historical` +- **Historical DNS Lookup (v2.3)**: `GET /v2.3/dns/historical` +- **Reverse DNS Lookup (v2.2)**: `GET /v2.2/dns/reverse` +- **Reverse DNS Lookup (v2.3)**: `GET /v2.3/dns/reverse` - **Bulk DNS Lookup**: `POST /v2.0/dns/bulk/live` ### [Domain Availability](domain-availability.md) @@ -74,10 +78,12 @@ Subdomain enumeration IP threat intelligence -2 endpoints: +4 endpoints: - **IP Reputation Lookup**: `GET /v1.0/security` - **Bulk IP Reputation**: `POST /v1.0/security` +- **IP Reputation Lookup (v2.0)**: `GET /v2.0/security` +- **Bulk IP Reputation (v2.0)**: `POST /v2.0/security` ### [Domain Reputation](domain-reputation.md) diff --git a/docs/endpoints/databases-streaming.md b/docs/endpoints/databases-streaming.md new file mode 100644 index 0000000..a352868 --- /dev/null +++ b/docs/endpoints/databases-streaming.md @@ -0,0 +1,3395 @@ +# Databases - Streaming + +*Section: Databases* + +Stream database files and threat feeds as plain CSV text instead of downloading a gzip file + +28 endpoints. Requests need your API key unless noted otherwise. See [Authentication](../authentication.md). + +## Stream the daily phishing threat feed (CSV) + +`GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/phishing` + +Streams the daily phishing threat feed for a given date. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `date` | query | yes | string (date) | | yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. | +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream the daily phishing threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/phishing + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamThreatFeedPhishing.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_threat_feed_phishing parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_threat_feed_phishing(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream the daily phishing threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/phishing +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamThreatFeedPhishing.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamThreatFeedPhishing({ date, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamThreatFeedPhishing({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream the daily phishing threat feed (CSV) (GET /v3.4/stream/threat-feed/phishing) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamThreatFeedPhishing (GET /v3.4/stream/threat-feed/phishing): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamThreatFeedPhishing(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream a sample of the phishing threat feed (CSV) + +`GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/phishing/sample` + +Public endpoint: no API key required. + +Streams a fixed sample of the phishing threat feed. No API key and no date are needed, so it is the quickest way to check the schema. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream a sample of the phishing threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/phishing/sample + +Run it (public endpoint, no API key needed): + python StreamThreatFeedPhishingSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_threat_feed_phishing_sample parameters: + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_threat_feed_phishing_sample() # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream a sample of the phishing threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/phishing/sample +// Run (public endpoint, no API key needed): npx tsx StreamThreatFeedPhishingSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamThreatFeedPhishingSample({ offset?, limit? }) +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamThreatFeedPhishingSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream a sample of the phishing threat feed (CSV) (GET /v3.4/stream/threat-feed/phishing/sample) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamThreatFeedPhishingSample (GET /v3.4/stream/threat-feed/phishing/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamThreatFeedPhishingSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream the daily malware threat feed (CSV) + +`GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/malware` + +Streams the daily malware threat feed for a given date. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `date` | query | yes | string (date) | | yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. | +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream the daily malware threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/malware + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamThreatFeedMalware.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_threat_feed_malware parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_threat_feed_malware(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream the daily malware threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/malware +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamThreatFeedMalware.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamThreatFeedMalware({ date, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamThreatFeedMalware({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream the daily malware threat feed (CSV) (GET /v3.4/stream/threat-feed/malware) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamThreatFeedMalware (GET /v3.4/stream/threat-feed/malware): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamThreatFeedMalware(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream a sample of the malware threat feed (CSV) + +`GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/malware/sample` + +Public endpoint: no API key required. + +Streams a fixed sample of the malware threat feed. No API key and no date are needed, so it is the quickest way to check the schema. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream a sample of the malware threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/malware/sample + +Run it (public endpoint, no API key needed): + python StreamThreatFeedMalwareSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_threat_feed_malware_sample parameters: + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_threat_feed_malware_sample() # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream a sample of the malware threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/malware/sample +// Run (public endpoint, no API key needed): npx tsx StreamThreatFeedMalwareSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamThreatFeedMalwareSample({ offset?, limit? }) +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamThreatFeedMalwareSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream a sample of the malware threat feed (CSV) (GET /v3.4/stream/threat-feed/malware/sample) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamThreatFeedMalwareSample (GET /v3.4/stream/threat-feed/malware/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamThreatFeedMalwareSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream the daily spam threat feed (CSV) + +`GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/spam` + +Streams the daily spam threat feed for a given date. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `date` | query | yes | string (date) | | yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. | +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream the daily spam threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/spam + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamThreatFeedSpam.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_threat_feed_spam parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_threat_feed_spam(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream the daily spam threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/spam +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamThreatFeedSpam.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamThreatFeedSpam({ date, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamThreatFeedSpam({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream the daily spam threat feed (CSV) (GET /v3.4/stream/threat-feed/spam) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamThreatFeedSpam (GET /v3.4/stream/threat-feed/spam): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamThreatFeedSpam(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream a sample of the spam threat feed (CSV) + +`GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/spam/sample` + +Public endpoint: no API key required. + +Streams a fixed sample of the spam threat feed. No API key and no date are needed, so it is the quickest way to check the schema. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream a sample of the spam threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/spam/sample + +Run it (public endpoint, no API key needed): + python StreamThreatFeedSpamSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_threat_feed_spam_sample parameters: + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_threat_feed_spam_sample() # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream a sample of the spam threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/spam/sample +// Run (public endpoint, no API key needed): npx tsx StreamThreatFeedSpamSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamThreatFeedSpamSample({ offset?, limit? }) +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamThreatFeedSpamSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream a sample of the spam threat feed (CSV) (GET /v3.4/stream/threat-feed/spam/sample) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamThreatFeedSpamSample (GET /v3.4/stream/threat-feed/spam/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamThreatFeedSpamSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream newly registered gTLD domains (CSV) + +`GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld` + +Streams the daily file of newly registered gTLD domains for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `date` | query | yes | string (date) | | yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. | +| `whois` | query | no | boolean | `false` | true streams the full WHOIS record per domain with a CSV header row; false streams only the domain names, one per line and with no header. The cleaned file types exist only in the WHOIS form, so pass true for those. | +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerGtld.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_gtld parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_gtld(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerGtld.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerGtld({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerGtld({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/gtld) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerGtld (GET /v3.3/stream/domainer/gtld): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerGtld(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream cleaned newly registered gTLD domains (CSV) + +`GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned` + +Streams the daily file of cleaned newly registered gTLD domains for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `date` | query | yes | string (date) | | yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. | +| `whois` | query | no | boolean | `false` | true streams the full WHOIS record per domain with a CSV header row; false streams only the domain names, one per line and with no header. The cleaned file types exist only in the WHOIS form, so pass true for those. | +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream cleaned newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerGtldCleaned.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_gtld_cleaned parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_gtld_cleaned(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream cleaned newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerGtldCleaned.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerGtldCleaned({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerGtldCleaned({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream cleaned newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/gtld/cleaned) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerGtldCleaned (GET /v3.3/stream/domainer/gtld/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerGtldCleaned(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream cleaned newly registered gTLD domains with an email (CSV) + +`GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned/email` + +Streams the daily file of cleaned newly registered gTLD domains with an email for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `date` | query | yes | string (date) | | yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. | +| `whois` | query | no | boolean | `false` | true streams the full WHOIS record per domain with a CSV header row; false streams only the domain names, one per line and with no header. The cleaned file types exist only in the WHOIS form, so pass true for those. | +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream cleaned newly registered gTLD domains with an email (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned/email + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerGtldCleanedEmail.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_gtld_cleaned_email parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_gtld_cleaned_email(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream cleaned newly registered gTLD domains with an email (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned/email +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerGtldCleanedEmail.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerGtldCleanedEmail({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerGtldCleanedEmail({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream cleaned newly registered gTLD domains with an email (CSV) (GET /v3.3/stream/domainer/gtld/cleaned/email) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerGtldCleanedEmail (GET /v3.3/stream/domainer/gtld/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerGtldCleanedEmail(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream cleaned newly registered gTLD domains with a phone (CSV) + +`GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned/phone` + +Streams the daily file of cleaned newly registered gTLD domains with a phone for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `date` | query | yes | string (date) | | yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. | +| `whois` | query | no | boolean | `false` | true streams the full WHOIS record per domain with a CSV header row; false streams only the domain names, one per line and with no header. The cleaned file types exist only in the WHOIS form, so pass true for those. | +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream cleaned newly registered gTLD domains with a phone (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned/phone + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerGtldCleanedPhone.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_gtld_cleaned_phone parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_gtld_cleaned_phone(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream cleaned newly registered gTLD domains with a phone (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned/phone +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerGtldCleanedPhone.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerGtldCleanedPhone({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerGtldCleanedPhone({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream cleaned newly registered gTLD domains with a phone (CSV) (GET /v3.3/stream/domainer/gtld/cleaned/phone) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerGtldCleanedPhone (GET /v3.3/stream/domainer/gtld/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerGtldCleanedPhone(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream newly registered ccTLD domains (CSV) + +`GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld` + +Streams the daily file of newly registered ccTLD domains for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `date` | query | yes | string (date) | | yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. | +| `whois` | query | no | boolean | `false` | true streams the full WHOIS record per domain with a CSV header row; false streams only the domain names, one per line and with no header. The cleaned file types exist only in the WHOIS form, so pass true for those. | +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerCctld.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_cctld parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_cctld(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerCctld.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerCctld({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerCctld({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/cctld) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerCctld (GET /v3.3/stream/domainer/cctld): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerCctld(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream cleaned newly registered ccTLD domains (CSV) + +`GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned` + +Streams the daily file of cleaned newly registered ccTLD domains for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `date` | query | yes | string (date) | | yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. | +| `whois` | query | no | boolean | `false` | true streams the full WHOIS record per domain with a CSV header row; false streams only the domain names, one per line and with no header. The cleaned file types exist only in the WHOIS form, so pass true for those. | +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream cleaned newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerCctldCleaned.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_cctld_cleaned parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_cctld_cleaned(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream cleaned newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerCctldCleaned.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerCctldCleaned({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerCctldCleaned({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream cleaned newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/cctld/cleaned) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerCctldCleaned (GET /v3.3/stream/domainer/cctld/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerCctldCleaned(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream cleaned newly registered ccTLD domains with an email (CSV) + +`GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned/email` + +Streams the daily file of cleaned newly registered ccTLD domains with an email for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `date` | query | yes | string (date) | | yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. | +| `whois` | query | no | boolean | `false` | true streams the full WHOIS record per domain with a CSV header row; false streams only the domain names, one per line and with no header. The cleaned file types exist only in the WHOIS form, so pass true for those. | +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream cleaned newly registered ccTLD domains with an email (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned/email + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerCctldCleanedEmail.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_cctld_cleaned_email parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_cctld_cleaned_email(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream cleaned newly registered ccTLD domains with an email (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned/email +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerCctldCleanedEmail.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerCctldCleanedEmail({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerCctldCleanedEmail({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream cleaned newly registered ccTLD domains with an email (CSV) (GET /v3.3/stream/domainer/cctld/cleaned/email) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerCctldCleanedEmail (GET /v3.3/stream/domainer/cctld/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerCctldCleanedEmail(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream cleaned newly registered ccTLD domains with a phone (CSV) + +`GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned/phone` + +Streams the daily file of cleaned newly registered ccTLD domains with a phone for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `date` | query | yes | string (date) | | yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. | +| `whois` | query | no | boolean | `false` | true streams the full WHOIS record per domain with a CSV header row; false streams only the domain names, one per line and with no header. The cleaned file types exist only in the WHOIS form, so pass true for those. | +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream cleaned newly registered ccTLD domains with a phone (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned/phone + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerCctldCleanedPhone.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_cctld_cleaned_phone parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_cctld_cleaned_phone(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream cleaned newly registered ccTLD domains with a phone (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned/phone +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerCctldCleanedPhone.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerCctldCleanedPhone({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerCctldCleanedPhone({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream cleaned newly registered ccTLD domains with a phone (CSV) (GET /v3.3/stream/domainer/cctld/cleaned/phone) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerCctldCleanedPhone (GET /v3.3/stream/domainer/cctld/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerCctldCleanedPhone(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream expiring domains (CSV) + +`GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired` + +Streams the daily file of expiring domains for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `date` | query | yes | string (date) | | yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. | +| `whois` | query | no | boolean | `false` | true streams the full WHOIS record per domain with a CSV header row; false streams only the domain names, one per line and with no header. The cleaned file types exist only in the WHOIS form, so pass true for those. | +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerExpired.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_expired parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_expired(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerExpired.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerExpired({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerExpired({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream expiring domains (CSV) (GET /v3.3/stream/domainer/expired) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerExpired (GET /v3.3/stream/domainer/expired): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerExpired(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream cleaned expiring domains (CSV) + +`GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned` + +Streams the daily file of cleaned expiring domains for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `date` | query | yes | string (date) | | yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. | +| `whois` | query | no | boolean | `false` | true streams the full WHOIS record per domain with a CSV header row; false streams only the domain names, one per line and with no header. The cleaned file types exist only in the WHOIS form, so pass true for those. | +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream cleaned expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerExpiredCleaned.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_expired_cleaned parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_expired_cleaned(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream cleaned expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerExpiredCleaned.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerExpiredCleaned({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerExpiredCleaned({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream cleaned expiring domains (CSV) (GET /v3.3/stream/domainer/expired/cleaned) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerExpiredCleaned (GET /v3.3/stream/domainer/expired/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerExpiredCleaned(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream cleaned expiring domains with an email (CSV) + +`GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned/email` + +Streams the daily file of cleaned expiring domains with an email for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `date` | query | yes | string (date) | | yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. | +| `whois` | query | no | boolean | `false` | true streams the full WHOIS record per domain with a CSV header row; false streams only the domain names, one per line and with no header. The cleaned file types exist only in the WHOIS form, so pass true for those. | +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream cleaned expiring domains with an email (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned/email + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerExpiredCleanedEmail.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_expired_cleaned_email parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_expired_cleaned_email(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream cleaned expiring domains with an email (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned/email +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerExpiredCleanedEmail.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerExpiredCleanedEmail({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerExpiredCleanedEmail({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream cleaned expiring domains with an email (CSV) (GET /v3.3/stream/domainer/expired/cleaned/email) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerExpiredCleanedEmail (GET /v3.3/stream/domainer/expired/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerExpiredCleanedEmail(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream cleaned expiring domains with a phone (CSV) + +`GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned/phone` + +Streams the daily file of cleaned expiring domains with a phone for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `date` | query | yes | string (date) | | yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. | +| `whois` | query | no | boolean | `false` | true streams the full WHOIS record per domain with a CSV header row; false streams only the domain names, one per line and with no header. The cleaned file types exist only in the WHOIS form, so pass true for those. | +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream cleaned expiring domains with a phone (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned/phone + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerExpiredCleanedPhone.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_expired_cleaned_phone parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_expired_cleaned_phone(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream cleaned expiring domains with a phone (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned/phone +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerExpiredCleanedPhone.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerExpiredCleanedPhone({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerExpiredCleanedPhone({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream cleaned expiring domains with a phone (CSV) (GET /v3.3/stream/domainer/expired/cleaned/phone) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerExpiredCleanedPhone (GET /v3.3/stream/domainer/expired/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerExpiredCleanedPhone(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream dropped domains (CSV) + +`GET https://files.whoisfreaks.com/v3.3/stream/domainer/dropped` + +Streams the daily file of dropped domains for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `date` | query | yes | string (date) | | yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. | +| `whois` | query | no | boolean | `false` | true streams the full WHOIS record per domain with a CSV header row; false streams only the domain names, one per line and with no header. The cleaned file types exist only in the WHOIS form, so pass true for those. | +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream dropped domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/dropped + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerDropped.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_dropped parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_dropped(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream dropped domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/dropped +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerDropped.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerDropped({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerDropped({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream dropped domains (CSV) (GET /v3.3/stream/domainer/dropped) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerDropped (GET /v3.3/stream/domainer/dropped): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerDropped(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream dropped domains with backlinks (CSV) + +`GET https://files.whoisfreaks.com/v3.3/stream/domainer/dropped/backlinks` + +Streams the daily file of dropped domains with backlinks for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `date` | query | yes | string (date) | | yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. | +| `whois` | query | no | boolean | `false` | true streams the full WHOIS record per domain with a CSV header row; false streams only the domain names, one per line and with no header. The cleaned file types exist only in the WHOIS form, so pass true for those. | +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream dropped domains with backlinks (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/dropped/backlinks + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerDroppedBacklinks.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_dropped_backlinks parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_dropped_backlinks(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream dropped domains with backlinks (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/dropped/backlinks +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerDroppedBacklinks.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerDroppedBacklinks({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerDroppedBacklinks({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream dropped domains with backlinks (CSV) (GET /v3.3/stream/domainer/dropped/backlinks) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerDroppedBacklinks (GET /v3.3/stream/domainer/dropped/backlinks): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerDroppedBacklinks(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream a sample of newly registered gTLD domains (CSV) + +`GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/gtld` + +Public endpoint: no API key required. + +Streams a fixed sample of newly registered gTLD domains. No API key and no date are needed, so it is the quickest way to check the schema. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `whois` | query | no | boolean | `false` | true streams the full WHOIS record per domain with a CSV header row; false streams only the domain names, one per line and with no header. The cleaned file types exist only in the WHOIS form, so pass true for those. | +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream a sample of newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/gtld + +Run it (public endpoint, no API key needed): + python StreamDomainerGtldSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_gtld_sample parameters: + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_gtld_sample() # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream a sample of newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/gtld +// Run (public endpoint, no API key needed): npx tsx StreamDomainerGtldSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerGtldSample({ whois?, offset?, limit? }) +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerGtldSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream a sample of newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/sample/gtld) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerGtldSample (GET /v3.3/stream/domainer/sample/gtld): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerGtldSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream a sample of cleaned newly registered gTLD domains (CSV) + +`GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/gtld/cleaned` + +Public endpoint: no API key required. + +Streams a fixed sample of cleaned newly registered gTLD domains. No API key and no date are needed, so it is the quickest way to check the schema. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `whois` | query | no | boolean | `false` | true streams the full WHOIS record per domain with a CSV header row; false streams only the domain names, one per line and with no header. The cleaned file types exist only in the WHOIS form, so pass true for those. | +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream a sample of cleaned newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/gtld/cleaned + +Run it (public endpoint, no API key needed): + python StreamDomainerGtldCleanedSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_gtld_cleaned_sample parameters: + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_gtld_cleaned_sample() # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream a sample of cleaned newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/gtld/cleaned +// Run (public endpoint, no API key needed): npx tsx StreamDomainerGtldCleanedSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerGtldCleanedSample({ whois?, offset?, limit? }) +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerGtldCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream a sample of cleaned newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/sample/gtld/cleaned) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerGtldCleanedSample (GET /v3.3/stream/domainer/sample/gtld/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerGtldCleanedSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream a sample of newly registered ccTLD domains (CSV) + +`GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/cctld` + +Public endpoint: no API key required. + +Streams a fixed sample of newly registered ccTLD domains. No API key and no date are needed, so it is the quickest way to check the schema. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `whois` | query | no | boolean | `false` | true streams the full WHOIS record per domain with a CSV header row; false streams only the domain names, one per line and with no header. The cleaned file types exist only in the WHOIS form, so pass true for those. | +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream a sample of newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/cctld + +Run it (public endpoint, no API key needed): + python StreamDomainerCctldSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_cctld_sample parameters: + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_cctld_sample() # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream a sample of newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/cctld +// Run (public endpoint, no API key needed): npx tsx StreamDomainerCctldSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerCctldSample({ whois?, offset?, limit? }) +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerCctldSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream a sample of newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/sample/cctld) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerCctldSample (GET /v3.3/stream/domainer/sample/cctld): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerCctldSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream a sample of cleaned newly registered ccTLD domains (CSV) + +`GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/cctld/cleaned` + +Public endpoint: no API key required. + +Streams a fixed sample of cleaned newly registered ccTLD domains. No API key and no date are needed, so it is the quickest way to check the schema. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `whois` | query | no | boolean | `false` | true streams the full WHOIS record per domain with a CSV header row; false streams only the domain names, one per line and with no header. The cleaned file types exist only in the WHOIS form, so pass true for those. | +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream a sample of cleaned newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/cctld/cleaned + +Run it (public endpoint, no API key needed): + python StreamDomainerCctldCleanedSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_cctld_cleaned_sample parameters: + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_cctld_cleaned_sample() # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream a sample of cleaned newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/cctld/cleaned +// Run (public endpoint, no API key needed): npx tsx StreamDomainerCctldCleanedSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerCctldCleanedSample({ whois?, offset?, limit? }) +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerCctldCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream a sample of cleaned newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/sample/cctld/cleaned) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerCctldCleanedSample (GET /v3.3/stream/domainer/sample/cctld/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerCctldCleanedSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream a sample of expiring domains (CSV) + +`GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/expired` + +Public endpoint: no API key required. + +Streams a fixed sample of expiring domains. No API key and no date are needed, so it is the quickest way to check the schema. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `whois` | query | no | boolean | `false` | true streams the full WHOIS record per domain with a CSV header row; false streams only the domain names, one per line and with no header. The cleaned file types exist only in the WHOIS form, so pass true for those. | +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream a sample of expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/expired + +Run it (public endpoint, no API key needed): + python StreamDomainerExpiredSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_expired_sample parameters: + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_expired_sample() # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream a sample of expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/expired +// Run (public endpoint, no API key needed): npx tsx StreamDomainerExpiredSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerExpiredSample({ whois?, offset?, limit? }) +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerExpiredSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream a sample of expiring domains (CSV) (GET /v3.3/stream/domainer/sample/expired) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerExpiredSample (GET /v3.3/stream/domainer/sample/expired): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerExpiredSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream a sample of cleaned expiring domains (CSV) + +`GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/expired/cleaned` + +Public endpoint: no API key required. + +Streams a fixed sample of cleaned expiring domains. No API key and no date are needed, so it is the quickest way to check the schema. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `whois` | query | no | boolean | `false` | true streams the full WHOIS record per domain with a CSV header row; false streams only the domain names, one per line and with no header. The cleaned file types exist only in the WHOIS form, so pass true for those. | +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream a sample of cleaned expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/expired/cleaned + +Run it (public endpoint, no API key needed): + python StreamDomainerExpiredCleanedSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_expired_cleaned_sample parameters: + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_expired_cleaned_sample() # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream a sample of cleaned expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/expired/cleaned +// Run (public endpoint, no API key needed): npx tsx StreamDomainerExpiredCleanedSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerExpiredCleanedSample({ whois?, offset?, limit? }) +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerExpiredCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream a sample of cleaned expiring domains (CSV) (GET /v3.3/stream/domainer/sample/expired/cleaned) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerExpiredCleanedSample (GET /v3.3/stream/domainer/sample/expired/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerExpiredCleanedSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream a sample of dropped domains (CSV) + +`GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/dropped` + +Public endpoint: no API key required. + +Streams a fixed sample of dropped domains. No API key and no date are needed, so it is the quickest way to check the schema. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `whois` | query | no | boolean | `false` | true streams the full WHOIS record per domain with a CSV header row; false streams only the domain names, one per line and with no header. The cleaned file types exist only in the WHOIS form, so pass true for those. | +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream a sample of dropped domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/dropped + +Run it (public endpoint, no API key needed): + python StreamDomainerDroppedSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_dropped_sample parameters: + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_dropped_sample() # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream a sample of dropped domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/dropped +// Run (public endpoint, no API key needed): npx tsx StreamDomainerDroppedSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerDroppedSample({ whois?, offset?, limit? }) +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerDroppedSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream a sample of dropped domains (CSV) (GET /v3.3/stream/domainer/sample/dropped) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerDroppedSample (GET /v3.3/stream/domainer/sample/dropped): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerDroppedSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Stream a sample of dropped domains with backlinks (CSV) + +`GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/dropped/backlinks` + +Public endpoint: no API key required. + +Streams a fixed sample of dropped domains with backlinks. No API key and no date are needed, so it is the quickest way to check the schema. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `whois` | query | no | boolean | `false` | true streams the full WHOIS record per domain with a CSV header row; false streams only the domain names, one per line and with no header. The cleaned file types exist only in the WHOIS form, so pass true for those. | +| `offset` | query | no | integer (int64) | | Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. | +| `limit` | query | no | integer (int64) | | Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. | + +**Usage** + +
Python + +```python +"""Stream a sample of dropped domains with backlinks (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/dropped/backlinks + +Run it (public endpoint, no API key needed): + python StreamDomainerDroppedBacklinksSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_dropped_backlinks_sample parameters: + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_dropped_backlinks_sample() # plain CSV text, already decompressed + print(csv_text) +``` + +
+ +
TypeScript + +```typescript +// Stream a sample of dropped domains with backlinks (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/dropped/backlinks +// Run (public endpoint, no API key needed): npx tsx StreamDomainerDroppedBacklinksSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerDroppedBacklinksSample({ whois?, offset?, limit? }) +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerDroppedBacklinksSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Stream a sample of dropped domains with backlinks (CSV) (GET /v3.3/stream/domainer/sample/dropped/backlinks) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerDroppedBacklinksSample (GET /v3.3/stream/domainer/sample/dropped/backlinks): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerDroppedBacklinksSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- diff --git a/docs/endpoints/databases.md b/docs/endpoints/databases.md index 7cdfafe..6e0e4bb 100644 --- a/docs/endpoints/databases.md +++ b/docs/endpoints/databases.md @@ -2,7 +2,7 @@ Bulk data feeds and downloadable database snapshots for large-scale processing: newly registered, expiring/dropped, and full WHOIS/DNS/IP datasets. -**37 endpoints** across **10 categories**. Requests need your API key unless noted otherwise. See [Authentication](../authentication.md). +**65 endpoints** across **11 categories**. Requests need your API key unless noted otherwise. See [Authentication](../authentication.md). ## Categories @@ -112,3 +112,38 @@ Daily phishing, malware and spam threat feeds - **Download a sample of the malware threat feed (CSV)**: `GET /v3.4/download/threat-feed/malware/sample` - **Download the daily spam threat feed (CSV)**: `GET /v3.4/download/threat-feed/spam` - **Download a sample of the spam threat feed (CSV)**: `GET /v3.4/download/threat-feed/spam/sample` + +### [Databases - Streaming](databases-streaming.md) + +Stream database files and threat feeds as plain CSV text instead of downloading a gzip file + +28 endpoints: + +- **Stream the daily phishing threat feed (CSV)**: `GET /v3.4/stream/threat-feed/phishing` +- **Stream a sample of the phishing threat feed (CSV)**: `GET /v3.4/stream/threat-feed/phishing/sample` +- **Stream the daily malware threat feed (CSV)**: `GET /v3.4/stream/threat-feed/malware` +- **Stream a sample of the malware threat feed (CSV)**: `GET /v3.4/stream/threat-feed/malware/sample` +- **Stream the daily spam threat feed (CSV)**: `GET /v3.4/stream/threat-feed/spam` +- **Stream a sample of the spam threat feed (CSV)**: `GET /v3.4/stream/threat-feed/spam/sample` +- **Stream newly registered gTLD domains (CSV)**: `GET /v3.3/stream/domainer/gtld` +- **Stream cleaned newly registered gTLD domains (CSV)**: `GET /v3.3/stream/domainer/gtld/cleaned` +- **Stream cleaned newly registered gTLD domains with an email (CSV)**: `GET /v3.3/stream/domainer/gtld/cleaned/email` +- **Stream cleaned newly registered gTLD domains with a phone (CSV)**: `GET /v3.3/stream/domainer/gtld/cleaned/phone` +- **Stream newly registered ccTLD domains (CSV)**: `GET /v3.3/stream/domainer/cctld` +- **Stream cleaned newly registered ccTLD domains (CSV)**: `GET /v3.3/stream/domainer/cctld/cleaned` +- **Stream cleaned newly registered ccTLD domains with an email (CSV)**: `GET /v3.3/stream/domainer/cctld/cleaned/email` +- **Stream cleaned newly registered ccTLD domains with a phone (CSV)**: `GET /v3.3/stream/domainer/cctld/cleaned/phone` +- **Stream expiring domains (CSV)**: `GET /v3.3/stream/domainer/expired` +- **Stream cleaned expiring domains (CSV)**: `GET /v3.3/stream/domainer/expired/cleaned` +- **Stream cleaned expiring domains with an email (CSV)**: `GET /v3.3/stream/domainer/expired/cleaned/email` +- **Stream cleaned expiring domains with a phone (CSV)**: `GET /v3.3/stream/domainer/expired/cleaned/phone` +- **Stream dropped domains (CSV)**: `GET /v3.3/stream/domainer/dropped` +- **Stream dropped domains with backlinks (CSV)**: `GET /v3.3/stream/domainer/dropped/backlinks` +- **Stream a sample of newly registered gTLD domains (CSV)**: `GET /v3.3/stream/domainer/sample/gtld` +- **Stream a sample of cleaned newly registered gTLD domains (CSV)**: `GET /v3.3/stream/domainer/sample/gtld/cleaned` +- **Stream a sample of newly registered ccTLD domains (CSV)**: `GET /v3.3/stream/domainer/sample/cctld` +- **Stream a sample of cleaned newly registered ccTLD domains (CSV)**: `GET /v3.3/stream/domainer/sample/cctld/cleaned` +- **Stream a sample of expiring domains (CSV)**: `GET /v3.3/stream/domainer/sample/expired` +- **Stream a sample of cleaned expiring domains (CSV)**: `GET /v3.3/stream/domainer/sample/expired/cleaned` +- **Stream a sample of dropped domains (CSV)**: `GET /v3.3/stream/domainer/sample/dropped` +- **Stream a sample of dropped domains with backlinks (CSV)**: `GET /v3.3/stream/domainer/sample/dropped/backlinks` diff --git a/docs/endpoints/dns.md b/docs/endpoints/dns.md index 3dc912a..cce4c70 100644 --- a/docs/endpoints/dns.md +++ b/docs/endpoints/dns.md @@ -4,7 +4,7 @@ DNS lookup APIs (live, historical, reverse, bulk) -4 endpoints. Requests need your API key unless noted otherwise. See [Authentication](../authentication.md). +8 endpoints. Requests need your API key unless noted otherwise. See [Authentication](../authentication.md). ## Live DNS Lookup @@ -471,6 +471,645 @@ func main() { --- +## Historical DNS Lookup (v2.2) + +`GET https://api.whoisfreaks.com/v2.2/dns/historical` + +Same records as /v2.0/dns/historical, with two differences. Each entry reports firstSeen and lastSeen instead of queryTime, and the results can be sorted. 2 credits per page (100 records/page). + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `domainName` | query | yes | string | | | +| `type` | query | yes | string | `all` | | +| `page` | query | no | integer | `1` | | +| `sort` | query | no | string | | Sort direction. Omit to leave the results unsorted. (one of: asc, desc) | +| `sortBy` | query | no | string | `lastSeen` | Field to sort on. Only applies when sort is given. (one of: firstSeen, lastSeen) | +| `format` | query | no | string | `json` | (one of: json, xml) | + +**Response** (`HistoricalDnsResponseV2_2`) + +| Field | Type | Description | +|-------|------|-------------| +| `totalRecords` | integer | | +| `totalPages` | integer | | +| `currentPage` | integer | | +| `historicalDnsRecords` | array | | + +
DnsEntryV2_2 object + +| Field | Type | Description | +|-------|------|-------------| +| `domainName` | string | | +| `ipAddress` | string | | +| `firstSeen` | string | Date the record was first observed (yyyy-MM-dd) | +| `lastSeen` | string | Date the record was last observed (yyyy-MM-dd) | +| `status` | boolean | | +| `domainRegistered` | boolean | | +| `dnsTypes` | object | | +| `dnsRecords` | array | | + +
+ + +**Usage** + +
Python + +```python +"""Historical DNS Lookup (v2.2): GET https://api.whoisfreaks.com/v2.2/dns/historical + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python DnsHistoricalV22.py +""" +import json +import os + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DNSApi(client) + + # dns_historical_v22 parameters: + # domain_name (str, required) + # type (str, required): default "all" + # page (int, optional, keyword): default 1 + # sort (str, optional, keyword): Sort direction. Omit to leave the results unsorted; one of asc, desc + # sort_by (str, optional, keyword): Field to sort on. Only applies when sort is given; one of firstSeen, lastSeen; default "lastSeen" + # format (str, optional, keyword): one of json, xml; default "json" + result = api.dns_historical_v22("whoisfreaks.com", "A,MX,TXT", page=1) + print(json.dumps(result.to_dict(), indent=2)) +``` + +
+ +
TypeScript + +```typescript +// Historical DNS Lookup (v2.2): GET https://api.whoisfreaks.com/v2.2/dns/historical +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx DnsHistoricalV22.ts +import { Configuration, DNSApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DNSApi(config); + +// dnsHistoricalV22({ domainName, type, page?, sort?, sortBy?, format? }) +// domainName (string, required) +// type (string, required): default "all" +// page (number, optional): default 1 +// sort ("asc" | "desc", optional): Sort direction. Omit to leave the results unsorted +// sortBy ("firstSeen" | "lastSeen", optional): Field to sort on. Only applies when sort is given; default "lastSeen" +// format ("json" | "xml", optional): default "json" +async function main(): Promise { + const result = await api.dnsHistoricalV22({ domainName: "whoisfreaks.com", type: "A,MX,TXT", page: 1 }); + console.log(JSON.stringify(result, null, 2)); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Historical DNS Lookup (v2.2) (GET /v2.2/dns/historical) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for dnsHistoricalV22 (GET /v2.2/dns/historical): +// - domainName (string, required) +// - type (string, required) +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DNSAPI.DnsHistoricalV22(ctx). + DomainName("whoisfreaks.com").Type_("A,MX,TXT").Page(1).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Historical DNS Lookup (v2.3) + +`GET https://api.whoisfreaks.com/v2.3/dns/historical` + +Same response as /v2.2/dns/historical. The difference is in error handling. Up to v2.2 a query that failed or ran past the server time limit still returned HTTP 200 with totalRecords 0, which was indistinguishable from a domain with no history. From v2.3 that case returns HTTP 408 instead. 2 credits per page (100 records/page). + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `domainName` | query | yes | string | | | +| `type` | query | yes | string | `all` | | +| `page` | query | no | integer | `1` | | +| `sort` | query | no | string | | Sort direction. Omit to leave the results unsorted. (one of: asc, desc) | +| `sortBy` | query | no | string | `lastSeen` | Field to sort on. Only applies when sort is given. (one of: firstSeen, lastSeen) | +| `format` | query | no | string | `json` | (one of: json, xml) | + +**Response** (`HistoricalDnsResponseV2_2`) + +| Field | Type | Description | +|-------|------|-------------| +| `totalRecords` | integer | | +| `totalPages` | integer | | +| `currentPage` | integer | | +| `historicalDnsRecords` | array | | + +
DnsEntryV2_2 object + +| Field | Type | Description | +|-------|------|-------------| +| `domainName` | string | | +| `ipAddress` | string | | +| `firstSeen` | string | Date the record was first observed (yyyy-MM-dd) | +| `lastSeen` | string | Date the record was last observed (yyyy-MM-dd) | +| `status` | boolean | | +| `domainRegistered` | boolean | | +| `dnsTypes` | object | | +| `dnsRecords` | array | | + +
+ + +**Usage** + +
Python + +```python +"""Historical DNS Lookup (v2.3): GET https://api.whoisfreaks.com/v2.3/dns/historical + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python DnsHistoricalV23.py +""" +import json +import os + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DNSApi(client) + + # dns_historical_v23 parameters: + # domain_name (str, required) + # type (str, required): default "all" + # page (int, optional, keyword): default 1 + # sort (str, optional, keyword): Sort direction. Omit to leave the results unsorted; one of asc, desc + # sort_by (str, optional, keyword): Field to sort on. Only applies when sort is given; one of firstSeen, lastSeen; default "lastSeen" + # format (str, optional, keyword): one of json, xml; default "json" + result = api.dns_historical_v23("whoisfreaks.com", "A,MX,TXT", page=1) + print(json.dumps(result.to_dict(), indent=2)) +``` + +
+ +
TypeScript + +```typescript +// Historical DNS Lookup (v2.3): GET https://api.whoisfreaks.com/v2.3/dns/historical +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx DnsHistoricalV23.ts +import { Configuration, DNSApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DNSApi(config); + +// dnsHistoricalV23({ domainName, type, page?, sort?, sortBy?, format? }) +// domainName (string, required) +// type (string, required): default "all" +// page (number, optional): default 1 +// sort ("asc" | "desc", optional): Sort direction. Omit to leave the results unsorted +// sortBy ("firstSeen" | "lastSeen", optional): Field to sort on. Only applies when sort is given; default "lastSeen" +// format ("json" | "xml", optional): default "json" +async function main(): Promise { + const result = await api.dnsHistoricalV23({ domainName: "whoisfreaks.com", type: "A,MX,TXT", page: 1 }); + console.log(JSON.stringify(result, null, 2)); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Historical DNS Lookup (v2.3) (GET /v2.3/dns/historical) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for dnsHistoricalV23 (GET /v2.3/dns/historical): +// - domainName (string, required) +// - type (string, required) +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DNSAPI.DnsHistoricalV23(ctx). + DomainName("whoisfreaks.com").Type_("A,MX,TXT").Page(1).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Reverse DNS Lookup (v2.2) + +`GET https://api.whoisfreaks.com/v2.2/dns/reverse` + +Same search as /v2.1/dns/reverse. Each entry reports firstSeen and lastSeen instead of queryTime, and the results can be sorted. 5 credits per page. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `value` | query | yes | string | | IP, CIDR, or record value | +| `type` | query | yes | string | | (one of: a, mx, cname, ns, aaaa, txt, soa) | +| `exact` | query | no | boolean | `true` | When false the value is matched as a substring, which is far slower than an exact match on a large record type. | +| `page` | query | no | integer | `1` | | +| `sort` | query | no | string | | Sort direction. Omit to leave the results unsorted. (one of: asc, desc) | +| `sortBy` | query | no | string | `lastSeen` | Field to sort on. Only applies when sort is given. (one of: firstSeen, lastSeen) | +| `format` | query | no | string | `json` | (one of: json, xml) | + +**Response** (`ReverseDnsResponseV2_2`) + +| Field | Type | Description | +|-------|------|-------------| +| `totalRecords` | integer | | +| `totalPages` | integer | | +| `currentPage` | integer | | +| `reverseDnsRecords` | array | | + +
DnsEntryV2_2 object + +| Field | Type | Description | +|-------|------|-------------| +| `domainName` | string | | +| `ipAddress` | string | | +| `firstSeen` | string | Date the record was first observed (yyyy-MM-dd) | +| `lastSeen` | string | Date the record was last observed (yyyy-MM-dd) | +| `status` | boolean | | +| `domainRegistered` | boolean | | +| `dnsTypes` | object | | +| `dnsRecords` | array | | + +
+ + +**Usage** + +
Python + +```python +"""Reverse DNS Lookup (v2.2): GET https://api.whoisfreaks.com/v2.2/dns/reverse + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python DnsReverseV22.py +""" +import json +import os + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DNSApi(client) + + # dns_reverse_v22 parameters: + # value (str, required): IP, CIDR, or record value + # type (str, required): one of a, mx, cname, ns, aaaa, txt, soa + # exact (bool, optional, keyword): When false the value is matched as a substring, which is far slower than an e...; default True + # page (int, optional, keyword): default 1 + # sort (str, optional, keyword): Sort direction. Omit to leave the results unsorted; one of asc, desc + # sort_by (str, optional, keyword): Field to sort on. Only applies when sort is given; one of firstSeen, lastSeen; default "lastSeen" + # format (str, optional, keyword): one of json, xml; default "json" + result = api.dns_reverse_v22("8.8.8.8", "a", page=1) + print(json.dumps(result.to_dict(), indent=2)) +``` + +
+ +
TypeScript + +```typescript +// Reverse DNS Lookup (v2.2): GET https://api.whoisfreaks.com/v2.2/dns/reverse +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx DnsReverseV22.ts +import { Configuration, DNSApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DNSApi(config); + +// dnsReverseV22({ value, type, exact?, page?, sort?, sortBy?, format? }) +// value (string, required): IP, CIDR, or record value +// type ("a" | "mx" | "cname" | "ns" | "aaaa" | "txt" | "soa", required) +// exact (boolean, optional): When false the value is matched as a substring, which is far slower than an e...; default true +// page (number, optional): default 1 +// sort ("asc" | "desc", optional): Sort direction. Omit to leave the results unsorted +// sortBy ("firstSeen" | "lastSeen", optional): Field to sort on. Only applies when sort is given; default "lastSeen" +// format ("json" | "xml", optional): default "json" +async function main(): Promise { + const result = await api.dnsReverseV22({ value: "8.8.8.8", type: "a", page: 1 }); + console.log(JSON.stringify(result, null, 2)); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Reverse DNS Lookup (v2.2) (GET /v2.2/dns/reverse) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for dnsReverseV22 (GET /v2.2/dns/reverse): +// - value (string, required): IP, CIDR, or record value +// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required) +// - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match... +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DNSAPI.DnsReverseV22(ctx).Value("8.8.8.8").Type_("a").Page(1).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Reverse DNS Lookup (v2.3) + +`GET https://api.whoisfreaks.com/v2.3/dns/reverse` + +Same search as /v2.2/dns/reverse, with a bounded total. Counting every match of a broad search can take minutes, so from v2.3 the count stops at 10,000 and totalRecordsCapped reports whether it did. When totalRecordsCapped is true the real total is higher than totalRecords and totalPages is capped with it. Earlier versions still return the exact total. A query that runs past the server time limit returns HTTP 408. 5 credits per page. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `value` | query | yes | string | | IP, CIDR, or record value | +| `type` | query | yes | string | | (one of: a, mx, cname, ns, aaaa, txt, soa) | +| `exact` | query | no | boolean | `true` | When false the value is matched as a substring, which is far slower than an exact match on a large record type. | +| `page` | query | no | integer | `1` | | +| `sort` | query | no | string | | Sort direction. Omit to leave the results unsorted. (one of: asc, desc) | +| `sortBy` | query | no | string | `lastSeen` | Field to sort on. Only applies when sort is given. (one of: firstSeen, lastSeen) | +| `format` | query | no | string | `json` | (one of: json, xml) | + +**Response** (`ReverseDnsResponseV2_3`) + +| Field | Type | Description | +|-------|------|-------------| +| `totalRecords` | integer | Matching records. When totalRecordsCapped is true this is the cap, not the real total. | +| `totalRecordsCapped` | boolean | True when counting stopped at the 10,000 cap, so the real total is higher. Present from v2.3 only. | +| `totalPages` | integer | | +| `currentPage` | integer | | +| `reverseDnsRecords` | array | | + +
DnsEntryV2_2 object + +| Field | Type | Description | +|-------|------|-------------| +| `domainName` | string | | +| `ipAddress` | string | | +| `firstSeen` | string | Date the record was first observed (yyyy-MM-dd) | +| `lastSeen` | string | Date the record was last observed (yyyy-MM-dd) | +| `status` | boolean | | +| `domainRegistered` | boolean | | +| `dnsTypes` | object | | +| `dnsRecords` | array | | + +
+ + +**Usage** + +
Python + +```python +"""Reverse DNS Lookup (v2.3): GET https://api.whoisfreaks.com/v2.3/dns/reverse + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python DnsReverseV23.py +""" +import json +import os + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DNSApi(client) + + # dns_reverse_v23 parameters: + # value (str, required): IP, CIDR, or record value + # type (str, required): one of a, mx, cname, ns, aaaa, txt, soa + # exact (bool, optional, keyword): When false the value is matched as a substring, which is far slower than an e...; default True + # page (int, optional, keyword): default 1 + # sort (str, optional, keyword): Sort direction. Omit to leave the results unsorted; one of asc, desc + # sort_by (str, optional, keyword): Field to sort on. Only applies when sort is given; one of firstSeen, lastSeen; default "lastSeen" + # format (str, optional, keyword): one of json, xml; default "json" + result = api.dns_reverse_v23("8.8.8.8", "a", page=1) + print(json.dumps(result.to_dict(), indent=2)) +``` + +
+ +
TypeScript + +```typescript +// Reverse DNS Lookup (v2.3): GET https://api.whoisfreaks.com/v2.3/dns/reverse +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx DnsReverseV23.ts +import { Configuration, DNSApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DNSApi(config); + +// dnsReverseV23({ value, type, exact?, page?, sort?, sortBy?, format? }) +// value (string, required): IP, CIDR, or record value +// type ("a" | "mx" | "cname" | "ns" | "aaaa" | "txt" | "soa", required) +// exact (boolean, optional): When false the value is matched as a substring, which is far slower than an e...; default true +// page (number, optional): default 1 +// sort ("asc" | "desc", optional): Sort direction. Omit to leave the results unsorted +// sortBy ("firstSeen" | "lastSeen", optional): Field to sort on. Only applies when sort is given; default "lastSeen" +// format ("json" | "xml", optional): default "json" +async function main(): Promise { + const result = await api.dnsReverseV23({ value: "8.8.8.8", type: "a", page: 1 }); + console.log(JSON.stringify(result, null, 2)); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Reverse DNS Lookup (v2.3) (GET /v2.3/dns/reverse) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for dnsReverseV23 (GET /v2.3/dns/reverse): +// - value (string, required): IP, CIDR, or record value +// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required) +// - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match... +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DNSAPI.DnsReverseV23(ctx).Value("8.8.8.8").Type_("a").Page(1).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + ## Bulk DNS Lookup `POST https://api.whoisfreaks.com/v2.0/dns/bulk/live` diff --git a/docs/endpoints/ip-reputation.md b/docs/endpoints/ip-reputation.md index 94ff776..6c7fbd9 100644 --- a/docs/endpoints/ip-reputation.md +++ b/docs/endpoints/ip-reputation.md @@ -4,7 +4,7 @@ IP threat intelligence -2 endpoints. Requests need your API key unless noted otherwise. See [Authentication](../authentication.md). +4 endpoints. Requests need your API key unless noted otherwise. See [Authentication](../authentication.md). ## IP Reputation Lookup @@ -62,6 +62,8 @@ Threat intel for IP: VPN, proxy, Tor, bots. 1 credit. | `connection_type` | string | | | `route` | string | | | `is_anycast` | boolean | | +| `is_cdn` | boolean | | +| `cdn_provider_name` | string | | @@ -268,6 +270,8 @@ Example: `{"ips": ["8.8.8.8", "1.1.1.1"]}` | `connection_type` | string | | | `route` | string | | | `is_anycast` | boolean | | +| `is_cdn` | boolean | | +| `cdn_provider_name` | string | | @@ -415,3 +419,417 @@ func main() { --- + +## IP Reputation Lookup (v2.0) + +`GET https://api.whoisfreaks.com/v2.0/security` + +Same lookup as /v1.0/security on a restructured response. The ASN block moves to the top level as asn, network gains the announced route prefix with the anycast and CDN flags, and the security block uses the newer field names with the added VPN, relay, residential proxy, bot and corporate gateway signals. Note that asn_name, allocation_status, num_of_ipv4_routes, num_of_ipv6_routes and network.company are only in v1.0. 1 credit. + +**Parameters** + +| Parameter | In | Required | Type | Default | Description | +|-----------|----|----------|------|---------|-------------| +| `ip` | query | yes | string | | | + +**Response** (`IpReputationResponse`) + +| Field | Type | Description | +|-------|------|-------------| +| `ip` | string | | +| `location` | IpLocation | | +| `network` | IpSecurityNetwork | | +| `asn` | IpSecurityAsn | | +| `security` | IpSecurity | | + +
IpLocation object + +| Field | Type | Description | +|-------|------|-------------| +| `continent_code` | string | | +| `continent_name` | string | | +| `country_code2` | string | | +| `country_code3` | string | | +| `country_name` | string | | +| `country_name_official` | string | | +| `country_capital` | string | | +| `state_prov` | string | | +| `state_code` | string | | +| `district` | string | | +| `city` | string | | +| `locality` | string | | +| `accuracy_radius` | string | | +| `confidence` | string | | +| `zipcode` | string | | +| `latitude` | string | | +| `longitude` | string | | +| `is_eu` | boolean | | +| `geoname_id` | string | | +| `country_emoji` | string | | + +
+ +
IpSecurityNetwork object + +| Field | Type | Description | +|-------|------|-------------| +| `connection_type` | string | | +| `route` | string | | +| `is_anycast` | boolean | | +| `is_cdn` | boolean | | +| `cdn_provider_name` | string | | + +
+ +
IpSecurityAsn object + +| Field | Type | Description | +|-------|------|-------------| +| `as_number` | string | | +| `organization` | string | | +| `country` | string | | +| `type` | string | | +| `domain` | string | | +| `date_allocated` | string | | +| `rir` | string | | + +
+ +
IpSecurity object + +| Field | Type | Description | +|-------|------|-------------| +| `threat_score` | integer | | +| `is_tor` | boolean | | +| `is_proxy` | boolean | | +| `proxy_provider_names` | array | | +| `proxy_confidence_score` | integer | | +| `proxy_last_seen` | string | | +| `is_residential_proxy` | boolean | | +| `is_vpn` | boolean | | +| `vpn_provider_names` | array | | +| `vpn_confidence_score` | integer | | +| `vpn_last_seen` | string | | +| `is_relay` | boolean | | +| `relay_provider_name` | string | | +| `is_anonymous` | boolean | | +| `is_known_attacker` | boolean | | +| `is_bot` | boolean | | +| `is_spam` | boolean | | +| `is_cloud_provider` | boolean | | +| `cloud_provider_name` | string | | + +
+ + +**Usage** + +
Python + +```python +"""IP Reputation Lookup (v2.0): GET https://api.whoisfreaks.com/v2.0/security + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python IpReputationV2.py +""" +import json +import os + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.IPReputationApi(client) + + # ip_reputation_v2 parameters: + # ip (str, required) + result = api.ip_reputation_v2("8.8.8.8") + print(json.dumps(result.to_dict(), indent=2)) +``` + +
+ +
TypeScript + +```typescript +// IP Reputation Lookup (v2.0): GET https://api.whoisfreaks.com/v2.0/security +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx IpReputationV2.ts +import { Configuration, IPReputationApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new IPReputationApi(config); + +// ipReputationV2({ ip }) +// ip (string, required) +async function main(): Promise { + const result = await api.ipReputationV2({ ip: "8.8.8.8" }); + console.log(JSON.stringify(result, null, 2)); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: IP Reputation Lookup (v2.0) (GET /v2.0/security) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for ipReputationV2 (GET /v2.0/security): +// - ip (string, required) + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.IPReputationAPI.IpReputationV2(ctx).Ip("8.8.8.8").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- + +## Bulk IP Reputation (v2.0) + +`POST https://api.whoisfreaks.com/v2.0/security` + +Up to 100 IPs, returning the same entry as GET /v2.0/security for each one. An invalid IP returns an error object for that entry only; the rest are still returned. 1 credit per IP. + +**Parameters** + +None. The API key is set once on the client. + +**Request body** (`application/json`, model `BulkGeolocationRequest`) + +| Field | Type | Required | Description | +|-------|------|----------|-------------| +| `ips` | array | yes | Up to 100 items. | + +Example: `{"ips": ["1.1.1.1", "2.2.2.2", "8.8.8.8"]}` + +**Response** (array of `IpReputationResponse`) + +| Field | Type | Description | +|-------|------|-------------| +| `ip` | string | | +| `location` | IpLocation | | +| `network` | IpSecurityNetwork | | +| `asn` | IpSecurityAsn | | +| `security` | IpSecurity | | + +
IpLocation object + +| Field | Type | Description | +|-------|------|-------------| +| `continent_code` | string | | +| `continent_name` | string | | +| `country_code2` | string | | +| `country_code3` | string | | +| `country_name` | string | | +| `country_name_official` | string | | +| `country_capital` | string | | +| `state_prov` | string | | +| `state_code` | string | | +| `district` | string | | +| `city` | string | | +| `locality` | string | | +| `accuracy_radius` | string | | +| `confidence` | string | | +| `zipcode` | string | | +| `latitude` | string | | +| `longitude` | string | | +| `is_eu` | boolean | | +| `geoname_id` | string | | +| `country_emoji` | string | | + +
+ +
IpSecurityNetwork object + +| Field | Type | Description | +|-------|------|-------------| +| `connection_type` | string | | +| `route` | string | | +| `is_anycast` | boolean | | +| `is_cdn` | boolean | | +| `cdn_provider_name` | string | | + +
+ +
IpSecurityAsn object + +| Field | Type | Description | +|-------|------|-------------| +| `as_number` | string | | +| `organization` | string | | +| `country` | string | | +| `type` | string | | +| `domain` | string | | +| `date_allocated` | string | | +| `rir` | string | | + +
+ +
IpSecurity object + +| Field | Type | Description | +|-------|------|-------------| +| `threat_score` | integer | | +| `is_tor` | boolean | | +| `is_proxy` | boolean | | +| `proxy_provider_names` | array | | +| `proxy_confidence_score` | integer | | +| `proxy_last_seen` | string | | +| `is_residential_proxy` | boolean | | +| `is_vpn` | boolean | | +| `vpn_provider_names` | array | | +| `vpn_confidence_score` | integer | | +| `vpn_last_seen` | string | | +| `is_relay` | boolean | | +| `relay_provider_name` | string | | +| `is_anonymous` | boolean | | +| `is_known_attacker` | boolean | | +| `is_bot` | boolean | | +| `is_spam` | boolean | | +| `is_cloud_provider` | boolean | | +| `cloud_provider_name` | string | | + +
+ + +**Usage** + +
Python + +```python +"""Bulk IP Reputation (v2.0): POST https://api.whoisfreaks.com/v2.0/security + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python BulkIpReputationV2.py +""" +import json +import os + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.IPReputationApi(client) + + # bulk_ip_reputation_v2 parameters: + # bulk_geolocation_request (BulkGeolocationRequest, required): request body + body = whoisfreaks.BulkGeolocationRequest(ips=["1.1.1.1", "2.2.2.2", "8.8.8.8"]) + results = api.bulk_ip_reputation_v2(body) + print(json.dumps([item.to_dict() for item in results], indent=2)) +``` + +
+ +
TypeScript + +```typescript +// Bulk IP Reputation (v2.0): POST https://api.whoisfreaks.com/v2.0/security +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx BulkIpReputationV2.ts +import { Configuration, IPReputationApi, ResponseError, type BulkGeolocationRequest } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new IPReputationApi(config); + +// bulkIpReputationV2({ bulkGeolocationRequest }) +// bulkGeolocationRequest (BulkGeolocationRequest, required): request body +async function main(): Promise { + const body: BulkGeolocationRequest = { ips: ["1.1.1.1", "2.2.2.2", "8.8.8.8"] }; + const results = await api.bulkIpReputationV2({ bulkGeolocationRequest: body }); + console.log(JSON.stringify(results, null, 2)); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +
+ +
Go + +```go +// Runnable example: Bulk IP Reputation (v2.0) (POST /v2.0/security) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for bulkIpReputationV2 (POST /v2.0/security): +// - body: BulkGeolocationRequest (required): request body object + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + body := whoisfreaks.NewBulkGeolocationRequest([]string{"1.1.1.1", "2.2.2.2", "8.8.8.8"}) + result, _, err := client.IPReputationAPI.BulkIpReputationV2(ctx). + BulkGeolocationRequest(*body).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +
+ +--- diff --git a/docs/languages/csharp.md b/docs/languages/csharp.md index 5fe9641..f9a01f1 100644 --- a/docs/languages/csharp.md +++ b/docs/languages/csharp.md @@ -93,7 +93,7 @@ Console.WriteLine(result.ToJson()); ## Endpoints -All 60 endpoints are shown below, grouped by category. Each includes its method, path, parameters, and a runnable example. See the [full endpoint reference](../endpoints/README.md) for response shapes and field details. +All 94 endpoints are shown below, grouped by category. Each includes its method, path, parameters, and a runnable example. See the [full endpoint reference](../endpoints/README.md) for response shapes and field details. ### WHOIS @@ -291,6 +291,128 @@ Console.WriteLine(result.ToJson()); ``` +#### Historical DNS Lookup (v2.2) + +`GET /v2.2/dns/historical` + +```csharp +// Runnable example: Historical DNS Lookup (v2.2) (GET /v2.2/dns/historical) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for dnsHistoricalV22 (GET /v2.2/dns/historical): +// - domainName (string, required) +// - type (string, required) +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; +using WhoisFreaks.Model; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DNSApi(config); + +HistoricalDnsResponseV2_2 result = api.DnsHistoricalV22("whoisfreaks.com", "A,MX,TXT", page: 1); +Console.WriteLine(result.ToJson()); + +``` + +#### Historical DNS Lookup (v2.3) + +`GET /v2.3/dns/historical` + +```csharp +// Runnable example: Historical DNS Lookup (v2.3) (GET /v2.3/dns/historical) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for dnsHistoricalV23 (GET /v2.3/dns/historical): +// - domainName (string, required) +// - type (string, required) +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; +using WhoisFreaks.Model; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DNSApi(config); + +HistoricalDnsResponseV2_2 result = api.DnsHistoricalV23("whoisfreaks.com", "A,MX,TXT", page: 1); +Console.WriteLine(result.ToJson()); + +``` + +#### Reverse DNS Lookup (v2.2) + +`GET /v2.2/dns/reverse` + +```csharp +// Runnable example: Reverse DNS Lookup (v2.2) (GET /v2.2/dns/reverse) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for dnsReverseV22 (GET /v2.2/dns/reverse): +// - value (string, required): IP, CIDR, or record value +// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required) +// - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match... +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; +using WhoisFreaks.Model; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DNSApi(config); + +ReverseDnsResponseV2_2 result = api.DnsReverseV22("8.8.8.8", "a", page: 1); +Console.WriteLine(result.ToJson()); + +``` + +#### Reverse DNS Lookup (v2.3) + +`GET /v2.3/dns/reverse` + +```csharp +// Runnable example: Reverse DNS Lookup (v2.3) (GET /v2.3/dns/reverse) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for dnsReverseV23 (GET /v2.3/dns/reverse): +// - value (string, required): IP, CIDR, or record value +// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required) +// - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match... +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; +using WhoisFreaks.Model; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DNSApi(config); + +ReverseDnsResponseV2_3 result = api.DnsReverseV23("8.8.8.8", "a", page: 1); +Console.WriteLine(result.ToJson()); + +``` + #### Bulk DNS Lookup `POST /v2.0/dns/bulk/live` @@ -584,6 +706,61 @@ foreach (var item in result) ``` +#### IP Reputation Lookup (v2.0) + +`GET /v2.0/security` + +```csharp +// Runnable example: IP Reputation Lookup (v2.0) (GET /v2.0/security) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for ipReputationV2 (GET /v2.0/security): +// - ip (string, required) +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; +using WhoisFreaks.Model; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new IPReputationApi(config); + +IpReputationResponse result = api.IpReputationV2("8.8.8.8"); +Console.WriteLine(result.ToJson()); + +``` + +#### Bulk IP Reputation (v2.0) + +`POST /v2.0/security` + +```csharp +// Runnable example: Bulk IP Reputation (v2.0) (POST /v2.0/security) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for bulkIpReputationV2 (POST /v2.0/security): +// - body: BulkGeolocationRequest (required): request body object +using System; +using System.Collections.Generic; +using WhoisFreaks.Api; +using WhoisFreaks.Client; +using WhoisFreaks.Model; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new IPReputationApi(config); + +var body = new BulkGeolocationRequest(ips: new List { "1.1.1.1", "2.2.2.2", "8.8.8.8" }); +List result = api.BulkIpReputationV2(body); +foreach (var item in result) +{ + Console.WriteLine(item.ToJson()); +} + +``` + ### Domain Reputation #### Domain Reputation Lookup @@ -1909,3 +2086,722 @@ using (FileStream output = File.Create(path)) Console.WriteLine($"Saved {new FileInfo(path).Length} bytes to {path}"); ``` + +### Databases - Streaming + +#### Stream the daily phishing threat feed (CSV) + +`GET /v3.4/stream/threat-feed/phishing` + +```csharp +// Runnable example: Stream the daily phishing threat feed (CSV) (GET /v3.4/stream/threat-feed/phishing) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamThreatFeedPhishing (GET /v3.4/stream/threat-feed/phishing): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamThreatFeedPhishing(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); + +``` + +#### Stream a sample of the phishing threat feed (CSV) + +`GET /v3.4/stream/threat-feed/phishing/sample` + +```csharp +// Runnable example: Stream a sample of the phishing threat feed (CSV) (GET /v3.4/stream/threat-feed/phishing/sample) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamThreatFeedPhishingSample (GET /v3.4/stream/threat-feed/phishing/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +// Public endpoint: no API key needed. +var api = new DatabasesStreamingApi(config); + +string result = api.StreamThreatFeedPhishingSample(); +Console.WriteLine(result); + +``` + +#### Stream the daily malware threat feed (CSV) + +`GET /v3.4/stream/threat-feed/malware` + +```csharp +// Runnable example: Stream the daily malware threat feed (CSV) (GET /v3.4/stream/threat-feed/malware) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamThreatFeedMalware (GET /v3.4/stream/threat-feed/malware): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamThreatFeedMalware(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); + +``` + +#### Stream a sample of the malware threat feed (CSV) + +`GET /v3.4/stream/threat-feed/malware/sample` + +```csharp +// Runnable example: Stream a sample of the malware threat feed (CSV) (GET /v3.4/stream/threat-feed/malware/sample) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamThreatFeedMalwareSample (GET /v3.4/stream/threat-feed/malware/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +// Public endpoint: no API key needed. +var api = new DatabasesStreamingApi(config); + +string result = api.StreamThreatFeedMalwareSample(); +Console.WriteLine(result); + +``` + +#### Stream the daily spam threat feed (CSV) + +`GET /v3.4/stream/threat-feed/spam` + +```csharp +// Runnable example: Stream the daily spam threat feed (CSV) (GET /v3.4/stream/threat-feed/spam) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamThreatFeedSpam (GET /v3.4/stream/threat-feed/spam): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamThreatFeedSpam(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); + +``` + +#### Stream a sample of the spam threat feed (CSV) + +`GET /v3.4/stream/threat-feed/spam/sample` + +```csharp +// Runnable example: Stream a sample of the spam threat feed (CSV) (GET /v3.4/stream/threat-feed/spam/sample) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamThreatFeedSpamSample (GET /v3.4/stream/threat-feed/spam/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +// Public endpoint: no API key needed. +var api = new DatabasesStreamingApi(config); + +string result = api.StreamThreatFeedSpamSample(); +Console.WriteLine(result); + +``` + +#### Stream newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/gtld` + +```csharp +// Runnable example: Stream newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/gtld) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerGtld (GET /v3.3/stream/domainer/gtld): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerGtld(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); + +``` + +#### Stream cleaned newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned` + +```csharp +// Runnable example: Stream cleaned newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/gtld/cleaned) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerGtldCleaned (GET /v3.3/stream/domainer/gtld/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerGtldCleaned(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); + +``` + +#### Stream cleaned newly registered gTLD domains with an email (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned/email` + +```csharp +// Runnable example: Stream cleaned newly registered gTLD domains with an email (CSV) (GET /v3.3/stream/domainer/gtld/cleaned/email) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerGtldCleanedEmail (GET /v3.3/stream/domainer/gtld/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerGtldCleanedEmail(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); + +``` + +#### Stream cleaned newly registered gTLD domains with a phone (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned/phone` + +```csharp +// Runnable example: Stream cleaned newly registered gTLD domains with a phone (CSV) (GET /v3.3/stream/domainer/gtld/cleaned/phone) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerGtldCleanedPhone (GET /v3.3/stream/domainer/gtld/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerGtldCleanedPhone(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); + +``` + +#### Stream newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/cctld` + +```csharp +// Runnable example: Stream newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/cctld) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerCctld (GET /v3.3/stream/domainer/cctld): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerCctld(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); + +``` + +#### Stream cleaned newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned` + +```csharp +// Runnable example: Stream cleaned newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/cctld/cleaned) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerCctldCleaned (GET /v3.3/stream/domainer/cctld/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerCctldCleaned(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); + +``` + +#### Stream cleaned newly registered ccTLD domains with an email (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned/email` + +```csharp +// Runnable example: Stream cleaned newly registered ccTLD domains with an email (CSV) (GET /v3.3/stream/domainer/cctld/cleaned/email) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerCctldCleanedEmail (GET /v3.3/stream/domainer/cctld/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerCctldCleanedEmail(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); + +``` + +#### Stream cleaned newly registered ccTLD domains with a phone (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned/phone` + +```csharp +// Runnable example: Stream cleaned newly registered ccTLD domains with a phone (CSV) (GET /v3.3/stream/domainer/cctld/cleaned/phone) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerCctldCleanedPhone (GET /v3.3/stream/domainer/cctld/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerCctldCleanedPhone(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); + +``` + +#### Stream expiring domains (CSV) + +`GET /v3.3/stream/domainer/expired` + +```csharp +// Runnable example: Stream expiring domains (CSV) (GET /v3.3/stream/domainer/expired) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerExpired (GET /v3.3/stream/domainer/expired): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerExpired(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); + +``` + +#### Stream cleaned expiring domains (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned` + +```csharp +// Runnable example: Stream cleaned expiring domains (CSV) (GET /v3.3/stream/domainer/expired/cleaned) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerExpiredCleaned (GET /v3.3/stream/domainer/expired/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerExpiredCleaned(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); + +``` + +#### Stream cleaned expiring domains with an email (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned/email` + +```csharp +// Runnable example: Stream cleaned expiring domains with an email (CSV) (GET /v3.3/stream/domainer/expired/cleaned/email) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerExpiredCleanedEmail (GET /v3.3/stream/domainer/expired/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerExpiredCleanedEmail(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); + +``` + +#### Stream cleaned expiring domains with a phone (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned/phone` + +```csharp +// Runnable example: Stream cleaned expiring domains with a phone (CSV) (GET /v3.3/stream/domainer/expired/cleaned/phone) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerExpiredCleanedPhone (GET /v3.3/stream/domainer/expired/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerExpiredCleanedPhone(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); + +``` + +#### Stream dropped domains (CSV) + +`GET /v3.3/stream/domainer/dropped` + +```csharp +// Runnable example: Stream dropped domains (CSV) (GET /v3.3/stream/domainer/dropped) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerDropped (GET /v3.3/stream/domainer/dropped): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerDropped(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); + +``` + +#### Stream dropped domains with backlinks (CSV) + +`GET /v3.3/stream/domainer/dropped/backlinks` + +```csharp +// Runnable example: Stream dropped domains with backlinks (CSV) (GET /v3.3/stream/domainer/dropped/backlinks) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerDroppedBacklinks (GET /v3.3/stream/domainer/dropped/backlinks): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerDroppedBacklinks(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); + +``` + +#### Stream a sample of newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/gtld` + +```csharp +// Runnable example: Stream a sample of newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/sample/gtld) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerGtldSample (GET /v3.3/stream/domainer/sample/gtld): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +// Public endpoint: no API key needed. +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerGtldSample(); +Console.WriteLine(result); + +``` + +#### Stream a sample of cleaned newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/gtld/cleaned` + +```csharp +// Runnable example: Stream a sample of cleaned newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/sample/gtld/cleaned) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerGtldCleanedSample (GET /v3.3/stream/domainer/sample/gtld/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +// Public endpoint: no API key needed. +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerGtldCleanedSample(); +Console.WriteLine(result); + +``` + +#### Stream a sample of newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/cctld` + +```csharp +// Runnable example: Stream a sample of newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/sample/cctld) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerCctldSample (GET /v3.3/stream/domainer/sample/cctld): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +// Public endpoint: no API key needed. +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerCctldSample(); +Console.WriteLine(result); + +``` + +#### Stream a sample of cleaned newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/cctld/cleaned` + +```csharp +// Runnable example: Stream a sample of cleaned newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/sample/cctld/cleaned) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerCctldCleanedSample (GET /v3.3/stream/domainer/sample/cctld/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +// Public endpoint: no API key needed. +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerCctldCleanedSample(); +Console.WriteLine(result); + +``` + +#### Stream a sample of expiring domains (CSV) + +`GET /v3.3/stream/domainer/sample/expired` + +```csharp +// Runnable example: Stream a sample of expiring domains (CSV) (GET /v3.3/stream/domainer/sample/expired) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerExpiredSample (GET /v3.3/stream/domainer/sample/expired): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +// Public endpoint: no API key needed. +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerExpiredSample(); +Console.WriteLine(result); + +``` + +#### Stream a sample of cleaned expiring domains (CSV) + +`GET /v3.3/stream/domainer/sample/expired/cleaned` + +```csharp +// Runnable example: Stream a sample of cleaned expiring domains (CSV) (GET /v3.3/stream/domainer/sample/expired/cleaned) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerExpiredCleanedSample (GET /v3.3/stream/domainer/sample/expired/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +// Public endpoint: no API key needed. +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerExpiredCleanedSample(); +Console.WriteLine(result); + +``` + +#### Stream a sample of dropped domains (CSV) + +`GET /v3.3/stream/domainer/sample/dropped` + +```csharp +// Runnable example: Stream a sample of dropped domains (CSV) (GET /v3.3/stream/domainer/sample/dropped) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerDroppedSample (GET /v3.3/stream/domainer/sample/dropped): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +// Public endpoint: no API key needed. +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerDroppedSample(); +Console.WriteLine(result); + +``` + +#### Stream a sample of dropped domains with backlinks (CSV) + +`GET /v3.3/stream/domainer/sample/dropped/backlinks` + +```csharp +// Runnable example: Stream a sample of dropped domains with backlinks (CSV) (GET /v3.3/stream/domainer/sample/dropped/backlinks) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerDroppedBacklinksSample (GET /v3.3/stream/domainer/sample/dropped/backlinks): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +// Public endpoint: no API key needed. +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerDroppedBacklinksSample(); +Console.WriteLine(result); + +``` diff --git a/docs/languages/go.md b/docs/languages/go.md index 5f876e5..f6d217a 100644 --- a/docs/languages/go.md +++ b/docs/languages/go.md @@ -116,7 +116,7 @@ func main() { ## Endpoints -All 60 endpoints are shown below, grouped by category. Each includes its method, path, parameters, and a runnable example. See the [full endpoint reference](../endpoints/README.md) for response shapes and field details. +All 94 endpoints are shown below, grouped by category. Each includes its method, path, parameters, and a runnable example. See the [full endpoint reference](../endpoints/README.md) for response shapes and field details. ### WHOIS @@ -406,6 +406,182 @@ func main() { ``` +#### Historical DNS Lookup (v2.2) + +`GET /v2.2/dns/historical` + +```go +// Runnable example: Historical DNS Lookup (v2.2) (GET /v2.2/dns/historical) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for dnsHistoricalV22 (GET /v2.2/dns/historical): +// - domainName (string, required) +// - type (string, required) +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DNSAPI.DnsHistoricalV22(ctx). + DomainName("whoisfreaks.com").Type_("A,MX,TXT").Page(1).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Historical DNS Lookup (v2.3) + +`GET /v2.3/dns/historical` + +```go +// Runnable example: Historical DNS Lookup (v2.3) (GET /v2.3/dns/historical) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for dnsHistoricalV23 (GET /v2.3/dns/historical): +// - domainName (string, required) +// - type (string, required) +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DNSAPI.DnsHistoricalV23(ctx). + DomainName("whoisfreaks.com").Type_("A,MX,TXT").Page(1).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Reverse DNS Lookup (v2.2) + +`GET /v2.2/dns/reverse` + +```go +// Runnable example: Reverse DNS Lookup (v2.2) (GET /v2.2/dns/reverse) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for dnsReverseV22 (GET /v2.2/dns/reverse): +// - value (string, required): IP, CIDR, or record value +// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required) +// - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match... +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DNSAPI.DnsReverseV22(ctx).Value("8.8.8.8").Type_("a").Page(1).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Reverse DNS Lookup (v2.3) + +`GET /v2.3/dns/reverse` + +```go +// Runnable example: Reverse DNS Lookup (v2.3) (GET /v2.3/dns/reverse) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for dnsReverseV23 (GET /v2.3/dns/reverse): +// - value (string, required): IP, CIDR, or record value +// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required) +// - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match... +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DNSAPI.DnsReverseV23(ctx).Value("8.8.8.8").Type_("a").Page(1).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + #### Bulk DNS Lookup `POST /v2.0/dns/bulk/live` @@ -825,6 +1001,84 @@ func main() { ``` +#### IP Reputation Lookup (v2.0) + +`GET /v2.0/security` + +```go +// Runnable example: IP Reputation Lookup (v2.0) (GET /v2.0/security) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for ipReputationV2 (GET /v2.0/security): +// - ip (string, required) + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.IPReputationAPI.IpReputationV2(ctx).Ip("8.8.8.8").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Bulk IP Reputation (v2.0) + +`POST /v2.0/security` + +```go +// Runnable example: Bulk IP Reputation (v2.0) (POST /v2.0/security) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for bulkIpReputationV2 (POST /v2.0/security): +// - body: BulkGeolocationRequest (required): request body object + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + body := whoisfreaks.NewBulkGeolocationRequest([]string{"1.1.1.1", "2.2.2.2", "8.8.8.8"}) + result, _, err := client.IPReputationAPI.BulkIpReputationV2(ctx). + BulkGeolocationRequest(*body).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + ### Domain Reputation #### Domain Reputation Lookup @@ -2920,3 +3174,1131 @@ func main() { } ``` + +### Databases - Streaming + +#### Stream the daily phishing threat feed (CSV) + +`GET /v3.4/stream/threat-feed/phishing` + +```go +// Runnable example: Stream the daily phishing threat feed (CSV) (GET /v3.4/stream/threat-feed/phishing) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamThreatFeedPhishing (GET /v3.4/stream/threat-feed/phishing): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamThreatFeedPhishing(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream a sample of the phishing threat feed (CSV) + +`GET /v3.4/stream/threat-feed/phishing/sample` + +```go +// Runnable example: Stream a sample of the phishing threat feed (CSV) (GET /v3.4/stream/threat-feed/phishing/sample) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamThreatFeedPhishingSample (GET /v3.4/stream/threat-feed/phishing/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamThreatFeedPhishingSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream the daily malware threat feed (CSV) + +`GET /v3.4/stream/threat-feed/malware` + +```go +// Runnable example: Stream the daily malware threat feed (CSV) (GET /v3.4/stream/threat-feed/malware) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamThreatFeedMalware (GET /v3.4/stream/threat-feed/malware): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamThreatFeedMalware(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream a sample of the malware threat feed (CSV) + +`GET /v3.4/stream/threat-feed/malware/sample` + +```go +// Runnable example: Stream a sample of the malware threat feed (CSV) (GET /v3.4/stream/threat-feed/malware/sample) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamThreatFeedMalwareSample (GET /v3.4/stream/threat-feed/malware/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamThreatFeedMalwareSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream the daily spam threat feed (CSV) + +`GET /v3.4/stream/threat-feed/spam` + +```go +// Runnable example: Stream the daily spam threat feed (CSV) (GET /v3.4/stream/threat-feed/spam) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamThreatFeedSpam (GET /v3.4/stream/threat-feed/spam): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamThreatFeedSpam(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream a sample of the spam threat feed (CSV) + +`GET /v3.4/stream/threat-feed/spam/sample` + +```go +// Runnable example: Stream a sample of the spam threat feed (CSV) (GET /v3.4/stream/threat-feed/spam/sample) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamThreatFeedSpamSample (GET /v3.4/stream/threat-feed/spam/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamThreatFeedSpamSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/gtld` + +```go +// Runnable example: Stream newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/gtld) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerGtld (GET /v3.3/stream/domainer/gtld): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerGtld(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream cleaned newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned` + +```go +// Runnable example: Stream cleaned newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/gtld/cleaned) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerGtldCleaned (GET /v3.3/stream/domainer/gtld/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerGtldCleaned(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream cleaned newly registered gTLD domains with an email (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned/email` + +```go +// Runnable example: Stream cleaned newly registered gTLD domains with an email (CSV) (GET /v3.3/stream/domainer/gtld/cleaned/email) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerGtldCleanedEmail (GET /v3.3/stream/domainer/gtld/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerGtldCleanedEmail(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream cleaned newly registered gTLD domains with a phone (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned/phone` + +```go +// Runnable example: Stream cleaned newly registered gTLD domains with a phone (CSV) (GET /v3.3/stream/domainer/gtld/cleaned/phone) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerGtldCleanedPhone (GET /v3.3/stream/domainer/gtld/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerGtldCleanedPhone(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/cctld` + +```go +// Runnable example: Stream newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/cctld) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerCctld (GET /v3.3/stream/domainer/cctld): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerCctld(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream cleaned newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned` + +```go +// Runnable example: Stream cleaned newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/cctld/cleaned) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerCctldCleaned (GET /v3.3/stream/domainer/cctld/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerCctldCleaned(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream cleaned newly registered ccTLD domains with an email (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned/email` + +```go +// Runnable example: Stream cleaned newly registered ccTLD domains with an email (CSV) (GET /v3.3/stream/domainer/cctld/cleaned/email) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerCctldCleanedEmail (GET /v3.3/stream/domainer/cctld/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerCctldCleanedEmail(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream cleaned newly registered ccTLD domains with a phone (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned/phone` + +```go +// Runnable example: Stream cleaned newly registered ccTLD domains with a phone (CSV) (GET /v3.3/stream/domainer/cctld/cleaned/phone) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerCctldCleanedPhone (GET /v3.3/stream/domainer/cctld/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerCctldCleanedPhone(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream expiring domains (CSV) + +`GET /v3.3/stream/domainer/expired` + +```go +// Runnable example: Stream expiring domains (CSV) (GET /v3.3/stream/domainer/expired) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerExpired (GET /v3.3/stream/domainer/expired): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerExpired(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream cleaned expiring domains (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned` + +```go +// Runnable example: Stream cleaned expiring domains (CSV) (GET /v3.3/stream/domainer/expired/cleaned) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerExpiredCleaned (GET /v3.3/stream/domainer/expired/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerExpiredCleaned(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream cleaned expiring domains with an email (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned/email` + +```go +// Runnable example: Stream cleaned expiring domains with an email (CSV) (GET /v3.3/stream/domainer/expired/cleaned/email) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerExpiredCleanedEmail (GET /v3.3/stream/domainer/expired/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerExpiredCleanedEmail(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream cleaned expiring domains with a phone (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned/phone` + +```go +// Runnable example: Stream cleaned expiring domains with a phone (CSV) (GET /v3.3/stream/domainer/expired/cleaned/phone) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerExpiredCleanedPhone (GET /v3.3/stream/domainer/expired/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerExpiredCleanedPhone(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream dropped domains (CSV) + +`GET /v3.3/stream/domainer/dropped` + +```go +// Runnable example: Stream dropped domains (CSV) (GET /v3.3/stream/domainer/dropped) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerDropped (GET /v3.3/stream/domainer/dropped): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerDropped(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream dropped domains with backlinks (CSV) + +`GET /v3.3/stream/domainer/dropped/backlinks` + +```go +// Runnable example: Stream dropped domains with backlinks (CSV) (GET /v3.3/stream/domainer/dropped/backlinks) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerDroppedBacklinks (GET /v3.3/stream/domainer/dropped/backlinks): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerDroppedBacklinks(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream a sample of newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/gtld` + +```go +// Runnable example: Stream a sample of newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/sample/gtld) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerGtldSample (GET /v3.3/stream/domainer/sample/gtld): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerGtldSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream a sample of cleaned newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/gtld/cleaned` + +```go +// Runnable example: Stream a sample of cleaned newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/sample/gtld/cleaned) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerGtldCleanedSample (GET /v3.3/stream/domainer/sample/gtld/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerGtldCleanedSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream a sample of newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/cctld` + +```go +// Runnable example: Stream a sample of newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/sample/cctld) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerCctldSample (GET /v3.3/stream/domainer/sample/cctld): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerCctldSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream a sample of cleaned newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/cctld/cleaned` + +```go +// Runnable example: Stream a sample of cleaned newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/sample/cctld/cleaned) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerCctldCleanedSample (GET /v3.3/stream/domainer/sample/cctld/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerCctldCleanedSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream a sample of expiring domains (CSV) + +`GET /v3.3/stream/domainer/sample/expired` + +```go +// Runnable example: Stream a sample of expiring domains (CSV) (GET /v3.3/stream/domainer/sample/expired) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerExpiredSample (GET /v3.3/stream/domainer/sample/expired): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerExpiredSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream a sample of cleaned expiring domains (CSV) + +`GET /v3.3/stream/domainer/sample/expired/cleaned` + +```go +// Runnable example: Stream a sample of cleaned expiring domains (CSV) (GET /v3.3/stream/domainer/sample/expired/cleaned) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerExpiredCleanedSample (GET /v3.3/stream/domainer/sample/expired/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerExpiredCleanedSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream a sample of dropped domains (CSV) + +`GET /v3.3/stream/domainer/sample/dropped` + +```go +// Runnable example: Stream a sample of dropped domains (CSV) (GET /v3.3/stream/domainer/sample/dropped) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerDroppedSample (GET /v3.3/stream/domainer/sample/dropped): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerDroppedSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` + +#### Stream a sample of dropped domains with backlinks (CSV) + +`GET /v3.3/stream/domainer/sample/dropped/backlinks` + +```go +// Runnable example: Stream a sample of dropped domains with backlinks (CSV) (GET /v3.3/stream/domainer/sample/dropped/backlinks) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerDroppedBacklinksSample (GET /v3.3/stream/domainer/sample/dropped/backlinks): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerDroppedBacklinksSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} + +``` diff --git a/docs/languages/java.md b/docs/languages/java.md index 86f36d3..5b16005 100644 --- a/docs/languages/java.md +++ b/docs/languages/java.md @@ -144,7 +144,7 @@ public class WhoisLive { ## Endpoints -All 60 endpoints are shown below, grouped by category. Each includes its method, path, parameters, and a runnable example. See the [full endpoint reference](../endpoints/README.md) for response shapes and field details. +All 94 endpoints are shown below, grouped by category. Each includes its method, path, parameters, and a runnable example. See the [full endpoint reference](../endpoints/README.md) for response shapes and field details. ### WHOIS @@ -380,6 +380,148 @@ public class DnsReverse { ``` +#### Historical DNS Lookup (v2.2) + +`GET /v2.2/dns/historical` + +```java +// Runnable example: Historical DNS Lookup (v2.2) (GET /v2.2/dns/historical) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=DnsHistoricalV22 +// Parameters for dnsHistoricalV22 (GET /v2.2/dns/historical): +// - domainName (string, required) +// - type (string, required) +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DnsApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; +import com.whoisfreaks.client.model.HistoricalDnsResponseV2_2; + +public class DnsHistoricalV22 { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DnsApi api = new DnsApi(client); + + // dnsHistoricalV22(domainName, type, page, sort, sortBy, format); null leaves an optional parameter unset + HistoricalDnsResponseV2_2 result = api.dnsHistoricalV22("whoisfreaks.com", "A,MX,TXT", 1, null, null, null); + System.out.println(result); + } +} + +``` + +#### Historical DNS Lookup (v2.3) + +`GET /v2.3/dns/historical` + +```java +// Runnable example: Historical DNS Lookup (v2.3) (GET /v2.3/dns/historical) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=DnsHistoricalV23 +// Parameters for dnsHistoricalV23 (GET /v2.3/dns/historical): +// - domainName (string, required) +// - type (string, required) +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DnsApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; +import com.whoisfreaks.client.model.HistoricalDnsResponseV2_2; + +public class DnsHistoricalV23 { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DnsApi api = new DnsApi(client); + + // dnsHistoricalV23(domainName, type, page, sort, sortBy, format); null leaves an optional parameter unset + HistoricalDnsResponseV2_2 result = api.dnsHistoricalV23("whoisfreaks.com", "A,MX,TXT", 1, null, null, null); + System.out.println(result); + } +} + +``` + +#### Reverse DNS Lookup (v2.2) + +`GET /v2.2/dns/reverse` + +```java +// Runnable example: Reverse DNS Lookup (v2.2) (GET /v2.2/dns/reverse) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=DnsReverseV22 +// Parameters for dnsReverseV22 (GET /v2.2/dns/reverse): +// - value (string, required): IP, CIDR, or record value +// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required) +// - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match... +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DnsApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; +import com.whoisfreaks.client.model.ReverseDnsResponseV2_2; + +public class DnsReverseV22 { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DnsApi api = new DnsApi(client); + + // dnsReverseV22(value, type, exact, page, sort, sortBy, format); null leaves an optional parameter unset + ReverseDnsResponseV2_2 result = api.dnsReverseV22("8.8.8.8", "a", null, 1, null, null, null); + System.out.println(result); + } +} + +``` + +#### Reverse DNS Lookup (v2.3) + +`GET /v2.3/dns/reverse` + +```java +// Runnable example: Reverse DNS Lookup (v2.3) (GET /v2.3/dns/reverse) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=DnsReverseV23 +// Parameters for dnsReverseV23 (GET /v2.3/dns/reverse): +// - value (string, required): IP, CIDR, or record value +// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required) +// - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match... +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DnsApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; +import com.whoisfreaks.client.model.ReverseDnsResponseV2_3; + +public class DnsReverseV23 { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DnsApi api = new DnsApi(client); + + // dnsReverseV23(value, type, exact, page, sort, sortBy, format); null leaves an optional parameter unset + ReverseDnsResponseV2_3 result = api.dnsReverseV23("8.8.8.8", "a", null, 1, null, null, null); + System.out.println(result); + } +} + +``` + #### Bulk DNS Lookup `POST /v2.0/dns/bulk/live` @@ -727,6 +869,70 @@ public class BulkIpReputation { ``` +#### IP Reputation Lookup (v2.0) + +`GET /v2.0/security` + +```java +// Runnable example: IP Reputation Lookup (v2.0) (GET /v2.0/security) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=IpReputationV2 +// Parameters for ipReputationV2 (GET /v2.0/security): +// - ip (string, required) +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.IpReputationApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; +import com.whoisfreaks.client.model.IpReputationResponse; + +public class IpReputationV2 { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + IpReputationApi api = new IpReputationApi(client); + + IpReputationResponse result = api.ipReputationV2("8.8.8.8"); + System.out.println(result); + } +} + +``` + +#### Bulk IP Reputation (v2.0) + +`POST /v2.0/security` + +```java +// Runnable example: Bulk IP Reputation (v2.0) (POST /v2.0/security) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=BulkIpReputationV2 +// Parameters for bulkIpReputationV2 (POST /v2.0/security): +// - body: BulkGeolocationRequest (required): request body object +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.IpReputationApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; +import com.whoisfreaks.client.model.BulkGeolocationRequest; +import com.whoisfreaks.client.model.IpReputationResponse; + +import java.util.Arrays; +import java.util.List; + +public class BulkIpReputationV2 { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + IpReputationApi api = new IpReputationApi(client); + + BulkGeolocationRequest body = new BulkGeolocationRequest() + .ips(Arrays.asList("1.1.1.1", "2.2.2.2", "8.8.8.8")); + List result = api.bulkIpReputationV2(body); + System.out.println(result); + } +} + +``` + ### Domain Reputation #### Domain Reputation Lookup @@ -2281,3 +2487,896 @@ public class DownloadThreatFeedSpamSample { } ``` + +### Databases - Streaming + +#### Stream the daily phishing threat feed (CSV) + +`GET /v3.4/stream/threat-feed/phishing` + +```java +// Runnable example: Stream the daily phishing threat feed (CSV) (GET /v3.4/stream/threat-feed/phishing) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamThreatFeedPhishing +// Parameters for streamThreatFeedPhishing (GET /v3.4/stream/threat-feed/phishing): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamThreatFeedPhishing { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamThreatFeedPhishing(date, offset, limit); null leaves an optional parameter unset + String result = api.streamThreatFeedPhishing(LocalDate.of(2026, 10, 1), null, null); + System.out.println(result); + } +} + +``` + +#### Stream a sample of the phishing threat feed (CSV) + +`GET /v3.4/stream/threat-feed/phishing/sample` + +```java +// Runnable example: Stream a sample of the phishing threat feed (CSV) (GET /v3.4/stream/threat-feed/phishing/sample) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamThreatFeedPhishingSample +// Parameters for streamThreatFeedPhishingSample (GET /v3.4/stream/threat-feed/phishing/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; + +public class StreamThreatFeedPhishingSample { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + // Public endpoint: no API key needed. + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamThreatFeedPhishingSample(offset, limit); null leaves an optional parameter unset + String result = api.streamThreatFeedPhishingSample(null, null); + System.out.println(result); + } +} + +``` + +#### Stream the daily malware threat feed (CSV) + +`GET /v3.4/stream/threat-feed/malware` + +```java +// Runnable example: Stream the daily malware threat feed (CSV) (GET /v3.4/stream/threat-feed/malware) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamThreatFeedMalware +// Parameters for streamThreatFeedMalware (GET /v3.4/stream/threat-feed/malware): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamThreatFeedMalware { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamThreatFeedMalware(date, offset, limit); null leaves an optional parameter unset + String result = api.streamThreatFeedMalware(LocalDate.of(2026, 10, 1), null, null); + System.out.println(result); + } +} + +``` + +#### Stream a sample of the malware threat feed (CSV) + +`GET /v3.4/stream/threat-feed/malware/sample` + +```java +// Runnable example: Stream a sample of the malware threat feed (CSV) (GET /v3.4/stream/threat-feed/malware/sample) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamThreatFeedMalwareSample +// Parameters for streamThreatFeedMalwareSample (GET /v3.4/stream/threat-feed/malware/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; + +public class StreamThreatFeedMalwareSample { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + // Public endpoint: no API key needed. + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamThreatFeedMalwareSample(offset, limit); null leaves an optional parameter unset + String result = api.streamThreatFeedMalwareSample(null, null); + System.out.println(result); + } +} + +``` + +#### Stream the daily spam threat feed (CSV) + +`GET /v3.4/stream/threat-feed/spam` + +```java +// Runnable example: Stream the daily spam threat feed (CSV) (GET /v3.4/stream/threat-feed/spam) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamThreatFeedSpam +// Parameters for streamThreatFeedSpam (GET /v3.4/stream/threat-feed/spam): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamThreatFeedSpam { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamThreatFeedSpam(date, offset, limit); null leaves an optional parameter unset + String result = api.streamThreatFeedSpam(LocalDate.of(2026, 10, 1), null, null); + System.out.println(result); + } +} + +``` + +#### Stream a sample of the spam threat feed (CSV) + +`GET /v3.4/stream/threat-feed/spam/sample` + +```java +// Runnable example: Stream a sample of the spam threat feed (CSV) (GET /v3.4/stream/threat-feed/spam/sample) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamThreatFeedSpamSample +// Parameters for streamThreatFeedSpamSample (GET /v3.4/stream/threat-feed/spam/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; + +public class StreamThreatFeedSpamSample { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + // Public endpoint: no API key needed. + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamThreatFeedSpamSample(offset, limit); null leaves an optional parameter unset + String result = api.streamThreatFeedSpamSample(null, null); + System.out.println(result); + } +} + +``` + +#### Stream newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/gtld` + +```java +// Runnable example: Stream newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/gtld) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerGtld +// Parameters for streamDomainerGtld (GET /v3.3/stream/domainer/gtld): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerGtld { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerGtld(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerGtld(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} + +``` + +#### Stream cleaned newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned` + +```java +// Runnable example: Stream cleaned newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/gtld/cleaned) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerGtldCleaned +// Parameters for streamDomainerGtldCleaned (GET /v3.3/stream/domainer/gtld/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerGtldCleaned { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerGtldCleaned(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerGtldCleaned(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} + +``` + +#### Stream cleaned newly registered gTLD domains with an email (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned/email` + +```java +// Runnable example: Stream cleaned newly registered gTLD domains with an email (CSV) (GET /v3.3/stream/domainer/gtld/cleaned/email) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerGtldCleanedEmail +// Parameters for streamDomainerGtldCleanedEmail (GET /v3.3/stream/domainer/gtld/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerGtldCleanedEmail { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerGtldCleanedEmail(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerGtldCleanedEmail(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} + +``` + +#### Stream cleaned newly registered gTLD domains with a phone (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned/phone` + +```java +// Runnable example: Stream cleaned newly registered gTLD domains with a phone (CSV) (GET /v3.3/stream/domainer/gtld/cleaned/phone) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerGtldCleanedPhone +// Parameters for streamDomainerGtldCleanedPhone (GET /v3.3/stream/domainer/gtld/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerGtldCleanedPhone { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerGtldCleanedPhone(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerGtldCleanedPhone(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} + +``` + +#### Stream newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/cctld` + +```java +// Runnable example: Stream newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/cctld) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerCctld +// Parameters for streamDomainerCctld (GET /v3.3/stream/domainer/cctld): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerCctld { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerCctld(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerCctld(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} + +``` + +#### Stream cleaned newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned` + +```java +// Runnable example: Stream cleaned newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/cctld/cleaned) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerCctldCleaned +// Parameters for streamDomainerCctldCleaned (GET /v3.3/stream/domainer/cctld/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerCctldCleaned { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerCctldCleaned(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerCctldCleaned(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} + +``` + +#### Stream cleaned newly registered ccTLD domains with an email (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned/email` + +```java +// Runnable example: Stream cleaned newly registered ccTLD domains with an email (CSV) (GET /v3.3/stream/domainer/cctld/cleaned/email) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerCctldCleanedEmail +// Parameters for streamDomainerCctldCleanedEmail (GET /v3.3/stream/domainer/cctld/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerCctldCleanedEmail { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerCctldCleanedEmail(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerCctldCleanedEmail(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} + +``` + +#### Stream cleaned newly registered ccTLD domains with a phone (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned/phone` + +```java +// Runnable example: Stream cleaned newly registered ccTLD domains with a phone (CSV) (GET /v3.3/stream/domainer/cctld/cleaned/phone) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerCctldCleanedPhone +// Parameters for streamDomainerCctldCleanedPhone (GET /v3.3/stream/domainer/cctld/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerCctldCleanedPhone { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerCctldCleanedPhone(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerCctldCleanedPhone(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} + +``` + +#### Stream expiring domains (CSV) + +`GET /v3.3/stream/domainer/expired` + +```java +// Runnable example: Stream expiring domains (CSV) (GET /v3.3/stream/domainer/expired) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerExpired +// Parameters for streamDomainerExpired (GET /v3.3/stream/domainer/expired): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerExpired { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerExpired(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerExpired(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} + +``` + +#### Stream cleaned expiring domains (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned` + +```java +// Runnable example: Stream cleaned expiring domains (CSV) (GET /v3.3/stream/domainer/expired/cleaned) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerExpiredCleaned +// Parameters for streamDomainerExpiredCleaned (GET /v3.3/stream/domainer/expired/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerExpiredCleaned { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerExpiredCleaned(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerExpiredCleaned(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} + +``` + +#### Stream cleaned expiring domains with an email (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned/email` + +```java +// Runnable example: Stream cleaned expiring domains with an email (CSV) (GET /v3.3/stream/domainer/expired/cleaned/email) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerExpiredCleanedEmail +// Parameters for streamDomainerExpiredCleanedEmail (GET /v3.3/stream/domainer/expired/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerExpiredCleanedEmail { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerExpiredCleanedEmail(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerExpiredCleanedEmail(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} + +``` + +#### Stream cleaned expiring domains with a phone (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned/phone` + +```java +// Runnable example: Stream cleaned expiring domains with a phone (CSV) (GET /v3.3/stream/domainer/expired/cleaned/phone) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerExpiredCleanedPhone +// Parameters for streamDomainerExpiredCleanedPhone (GET /v3.3/stream/domainer/expired/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerExpiredCleanedPhone { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerExpiredCleanedPhone(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerExpiredCleanedPhone(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} + +``` + +#### Stream dropped domains (CSV) + +`GET /v3.3/stream/domainer/dropped` + +```java +// Runnable example: Stream dropped domains (CSV) (GET /v3.3/stream/domainer/dropped) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerDropped +// Parameters for streamDomainerDropped (GET /v3.3/stream/domainer/dropped): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerDropped { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerDropped(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerDropped(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} + +``` + +#### Stream dropped domains with backlinks (CSV) + +`GET /v3.3/stream/domainer/dropped/backlinks` + +```java +// Runnable example: Stream dropped domains with backlinks (CSV) (GET /v3.3/stream/domainer/dropped/backlinks) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerDroppedBacklinks +// Parameters for streamDomainerDroppedBacklinks (GET /v3.3/stream/domainer/dropped/backlinks): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerDroppedBacklinks { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerDroppedBacklinks(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerDroppedBacklinks(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} + +``` + +#### Stream a sample of newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/gtld` + +```java +// Runnable example: Stream a sample of newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/sample/gtld) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerGtldSample +// Parameters for streamDomainerGtldSample (GET /v3.3/stream/domainer/sample/gtld): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; + +public class StreamDomainerGtldSample { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + // Public endpoint: no API key needed. + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerGtldSample(whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerGtldSample(null, null, null); + System.out.println(result); + } +} + +``` + +#### Stream a sample of cleaned newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/gtld/cleaned` + +```java +// Runnable example: Stream a sample of cleaned newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/sample/gtld/cleaned) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerGtldCleanedSample +// Parameters for streamDomainerGtldCleanedSample (GET /v3.3/stream/domainer/sample/gtld/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; + +public class StreamDomainerGtldCleanedSample { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + // Public endpoint: no API key needed. + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerGtldCleanedSample(whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerGtldCleanedSample(null, null, null); + System.out.println(result); + } +} + +``` + +#### Stream a sample of newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/cctld` + +```java +// Runnable example: Stream a sample of newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/sample/cctld) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerCctldSample +// Parameters for streamDomainerCctldSample (GET /v3.3/stream/domainer/sample/cctld): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; + +public class StreamDomainerCctldSample { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + // Public endpoint: no API key needed. + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerCctldSample(whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerCctldSample(null, null, null); + System.out.println(result); + } +} + +``` + +#### Stream a sample of cleaned newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/cctld/cleaned` + +```java +// Runnable example: Stream a sample of cleaned newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/sample/cctld/cleaned) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerCctldCleanedSample +// Parameters for streamDomainerCctldCleanedSample (GET /v3.3/stream/domainer/sample/cctld/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; + +public class StreamDomainerCctldCleanedSample { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + // Public endpoint: no API key needed. + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerCctldCleanedSample(whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerCctldCleanedSample(null, null, null); + System.out.println(result); + } +} + +``` + +#### Stream a sample of expiring domains (CSV) + +`GET /v3.3/stream/domainer/sample/expired` + +```java +// Runnable example: Stream a sample of expiring domains (CSV) (GET /v3.3/stream/domainer/sample/expired) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerExpiredSample +// Parameters for streamDomainerExpiredSample (GET /v3.3/stream/domainer/sample/expired): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; + +public class StreamDomainerExpiredSample { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + // Public endpoint: no API key needed. + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerExpiredSample(whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerExpiredSample(null, null, null); + System.out.println(result); + } +} + +``` + +#### Stream a sample of cleaned expiring domains (CSV) + +`GET /v3.3/stream/domainer/sample/expired/cleaned` + +```java +// Runnable example: Stream a sample of cleaned expiring domains (CSV) (GET /v3.3/stream/domainer/sample/expired/cleaned) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerExpiredCleanedSample +// Parameters for streamDomainerExpiredCleanedSample (GET /v3.3/stream/domainer/sample/expired/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; + +public class StreamDomainerExpiredCleanedSample { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + // Public endpoint: no API key needed. + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerExpiredCleanedSample(whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerExpiredCleanedSample(null, null, null); + System.out.println(result); + } +} + +``` + +#### Stream a sample of dropped domains (CSV) + +`GET /v3.3/stream/domainer/sample/dropped` + +```java +// Runnable example: Stream a sample of dropped domains (CSV) (GET /v3.3/stream/domainer/sample/dropped) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerDroppedSample +// Parameters for streamDomainerDroppedSample (GET /v3.3/stream/domainer/sample/dropped): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; + +public class StreamDomainerDroppedSample { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + // Public endpoint: no API key needed. + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerDroppedSample(whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerDroppedSample(null, null, null); + System.out.println(result); + } +} + +``` + +#### Stream a sample of dropped domains with backlinks (CSV) + +`GET /v3.3/stream/domainer/sample/dropped/backlinks` + +```java +// Runnable example: Stream a sample of dropped domains with backlinks (CSV) (GET /v3.3/stream/domainer/sample/dropped/backlinks) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerDroppedBacklinksSample +// Parameters for streamDomainerDroppedBacklinksSample (GET /v3.3/stream/domainer/sample/dropped/backlinks): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; + +public class StreamDomainerDroppedBacklinksSample { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + // Public endpoint: no API key needed. + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerDroppedBacklinksSample(whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerDroppedBacklinksSample(null, null, null); + System.out.println(result); + } +} + +``` diff --git a/docs/languages/javascript.md b/docs/languages/javascript.md index 67d98fc..6b49853 100644 --- a/docs/languages/javascript.md +++ b/docs/languages/javascript.md @@ -99,7 +99,7 @@ main().catch((err) => { ## Endpoints -All 60 endpoints are shown below, grouped by category. Each includes its method, path, parameters, and a runnable example. See the [full endpoint reference](../endpoints/README.md) for response shapes and field details. +All 94 endpoints are shown below, grouped by category. Each includes its method, path, parameters, and a runnable example. See the [full endpoint reference](../endpoints/README.md) for response shapes and field details. ### WHOIS @@ -317,6 +317,140 @@ main().catch((err) => { }); ``` +#### Historical DNS Lookup (v2.2) + +`GET /v2.2/dns/historical` + +```javascript +// Historical DNS Lookup (v2.2): GET https://api.whoisfreaks.com/v2.2/dns/historical +// Run: WHOISFREAKS_API_KEY=your_api_key node DnsHistoricalV22.js +const { ApiClient, DNSApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DNSApi(client); + +// dnsHistoricalV22(domainName, type, opts) +// domainName (string, required) +// type (string, required): default "all" +// opts.page (number, optional): default 1 +// opts.sort (string, optional): Sort direction. Omit to leave the results unsorted; one of asc, desc +// opts.sortBy (string, optional): Field to sort on. Only applies when sort is given; one of firstSeen, lastSeen; default "lastSeen" +// opts.format (string, optional): one of json, xml; default "json" +async function main() { + const result = await api.dnsHistoricalV22("whoisfreaks.com", "A,MX,TXT", { page: 1 }); + console.log(JSON.stringify(result, null, 2)); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Historical DNS Lookup (v2.3) + +`GET /v2.3/dns/historical` + +```javascript +// Historical DNS Lookup (v2.3): GET https://api.whoisfreaks.com/v2.3/dns/historical +// Run: WHOISFREAKS_API_KEY=your_api_key node DnsHistoricalV23.js +const { ApiClient, DNSApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DNSApi(client); + +// dnsHistoricalV23(domainName, type, opts) +// domainName (string, required) +// type (string, required): default "all" +// opts.page (number, optional): default 1 +// opts.sort (string, optional): Sort direction. Omit to leave the results unsorted; one of asc, desc +// opts.sortBy (string, optional): Field to sort on. Only applies when sort is given; one of firstSeen, lastSeen; default "lastSeen" +// opts.format (string, optional): one of json, xml; default "json" +async function main() { + const result = await api.dnsHistoricalV23("whoisfreaks.com", "A,MX,TXT", { page: 1 }); + console.log(JSON.stringify(result, null, 2)); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Reverse DNS Lookup (v2.2) + +`GET /v2.2/dns/reverse` + +```javascript +// Reverse DNS Lookup (v2.2): GET https://api.whoisfreaks.com/v2.2/dns/reverse +// Run: WHOISFREAKS_API_KEY=your_api_key node DnsReverseV22.js +const { ApiClient, DNSApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DNSApi(client); + +// dnsReverseV22(value, type, opts) +// value (string, required): IP, CIDR, or record value +// type (string, required): one of a, mx, cname, ns, aaaa, txt, soa +// opts.exact (boolean, optional): When false the value is matched as a substring, which is far slower than an e...; default true +// opts.page (number, optional): default 1 +// opts.sort (string, optional): Sort direction. Omit to leave the results unsorted; one of asc, desc +// opts.sortBy (string, optional): Field to sort on. Only applies when sort is given; one of firstSeen, lastSeen; default "lastSeen" +// opts.format (string, optional): one of json, xml; default "json" +async function main() { + const result = await api.dnsReverseV22("8.8.8.8", "a", { page: 1 }); + console.log(JSON.stringify(result, null, 2)); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Reverse DNS Lookup (v2.3) + +`GET /v2.3/dns/reverse` + +```javascript +// Reverse DNS Lookup (v2.3): GET https://api.whoisfreaks.com/v2.3/dns/reverse +// Run: WHOISFREAKS_API_KEY=your_api_key node DnsReverseV23.js +const { ApiClient, DNSApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DNSApi(client); + +// dnsReverseV23(value, type, opts) +// value (string, required): IP, CIDR, or record value +// type (string, required): one of a, mx, cname, ns, aaaa, txt, soa +// opts.exact (boolean, optional): When false the value is matched as a substring, which is far slower than an e...; default true +// opts.page (number, optional): default 1 +// opts.sort (string, optional): Sort direction. Omit to leave the results unsorted; one of asc, desc +// opts.sortBy (string, optional): Field to sort on. Only applies when sort is given; one of firstSeen, lastSeen; default "lastSeen" +// opts.format (string, optional): one of json, xml; default "json" +async function main() { + const result = await api.dnsReverseV23("8.8.8.8", "a", { page: 1 }); + console.log(JSON.stringify(result, null, 2)); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + #### Bulk DNS Lookup `POST /v2.0/dns/bulk/live` @@ -630,6 +764,63 @@ main().catch((err) => { }); ``` +#### IP Reputation Lookup (v2.0) + +`GET /v2.0/security` + +```javascript +// IP Reputation Lookup (v2.0): GET https://api.whoisfreaks.com/v2.0/security +// Run: WHOISFREAKS_API_KEY=your_api_key node IpReputationV2.js +const { ApiClient, IPReputationApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new IPReputationApi(client); + +// ipReputationV2(ip) +// ip (string, required) +async function main() { + const result = await api.ipReputationV2("8.8.8.8"); + console.log(JSON.stringify(result, null, 2)); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Bulk IP Reputation (v2.0) + +`POST /v2.0/security` + +```javascript +// Bulk IP Reputation (v2.0): POST https://api.whoisfreaks.com/v2.0/security +// Run: WHOISFREAKS_API_KEY=your_api_key node BulkIpReputationV2.js +const { ApiClient, IPReputationApi, BulkGeolocationRequest } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new IPReputationApi(client); + +// bulkIpReputationV2(bulkGeolocationRequest) +// bulkGeolocationRequest (BulkGeolocationRequest, required): request body +async function main() { + const body = BulkGeolocationRequest.constructFromObject({ ips: ["1.1.1.1", "2.2.2.2", "8.8.8.8"] }); + const results = await api.bulkIpReputationV2(body); + console.log(JSON.stringify(results, null, 2)); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + ### Domain Reputation #### Domain Reputation Lookup @@ -1980,3 +2171,834 @@ main().catch((err) => { process.exitCode = 1; }); ``` + +### Databases - Streaming + +#### Stream the daily phishing threat feed (CSV) + +`GET /v3.4/stream/threat-feed/phishing` + +```javascript +// Stream the daily phishing threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/phishing +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamThreatFeedPhishing.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamThreatFeedPhishing(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamThreatFeedPhishing("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream a sample of the phishing threat feed (CSV) + +`GET /v3.4/stream/threat-feed/phishing/sample` + +```javascript +// Stream a sample of the phishing threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/phishing/sample +// Run (public endpoint, no API key needed): node StreamThreatFeedPhishingSample.js +const { DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamThreatFeedPhishingSample(opts) +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamThreatFeedPhishingSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream the daily malware threat feed (CSV) + +`GET /v3.4/stream/threat-feed/malware` + +```javascript +// Stream the daily malware threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/malware +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamThreatFeedMalware.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamThreatFeedMalware(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamThreatFeedMalware("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream a sample of the malware threat feed (CSV) + +`GET /v3.4/stream/threat-feed/malware/sample` + +```javascript +// Stream a sample of the malware threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/malware/sample +// Run (public endpoint, no API key needed): node StreamThreatFeedMalwareSample.js +const { DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamThreatFeedMalwareSample(opts) +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamThreatFeedMalwareSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream the daily spam threat feed (CSV) + +`GET /v3.4/stream/threat-feed/spam` + +```javascript +// Stream the daily spam threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/spam +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamThreatFeedSpam.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamThreatFeedSpam(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamThreatFeedSpam("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream a sample of the spam threat feed (CSV) + +`GET /v3.4/stream/threat-feed/spam/sample` + +```javascript +// Stream a sample of the spam threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/spam/sample +// Run (public endpoint, no API key needed): node StreamThreatFeedSpamSample.js +const { DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamThreatFeedSpamSample(opts) +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamThreatFeedSpamSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/gtld` + +```javascript +// Stream newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerGtld.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerGtld(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerGtld("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream cleaned newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned` + +```javascript +// Stream cleaned newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerGtldCleaned.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerGtldCleaned(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerGtldCleaned("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream cleaned newly registered gTLD domains with an email (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned/email` + +```javascript +// Stream cleaned newly registered gTLD domains with an email (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned/email +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerGtldCleanedEmail.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerGtldCleanedEmail(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerGtldCleanedEmail("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream cleaned newly registered gTLD domains with a phone (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned/phone` + +```javascript +// Stream cleaned newly registered gTLD domains with a phone (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned/phone +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerGtldCleanedPhone.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerGtldCleanedPhone(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerGtldCleanedPhone("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/cctld` + +```javascript +// Stream newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerCctld.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerCctld(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerCctld("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream cleaned newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned` + +```javascript +// Stream cleaned newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerCctldCleaned.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerCctldCleaned(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerCctldCleaned("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream cleaned newly registered ccTLD domains with an email (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned/email` + +```javascript +// Stream cleaned newly registered ccTLD domains with an email (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned/email +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerCctldCleanedEmail.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerCctldCleanedEmail(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerCctldCleanedEmail("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream cleaned newly registered ccTLD domains with a phone (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned/phone` + +```javascript +// Stream cleaned newly registered ccTLD domains with a phone (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned/phone +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerCctldCleanedPhone.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerCctldCleanedPhone(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerCctldCleanedPhone("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream expiring domains (CSV) + +`GET /v3.3/stream/domainer/expired` + +```javascript +// Stream expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerExpired.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerExpired(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerExpired("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream cleaned expiring domains (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned` + +```javascript +// Stream cleaned expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerExpiredCleaned.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerExpiredCleaned(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerExpiredCleaned("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream cleaned expiring domains with an email (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned/email` + +```javascript +// Stream cleaned expiring domains with an email (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned/email +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerExpiredCleanedEmail.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerExpiredCleanedEmail(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerExpiredCleanedEmail("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream cleaned expiring domains with a phone (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned/phone` + +```javascript +// Stream cleaned expiring domains with a phone (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned/phone +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerExpiredCleanedPhone.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerExpiredCleanedPhone(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerExpiredCleanedPhone("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream dropped domains (CSV) + +`GET /v3.3/stream/domainer/dropped` + +```javascript +// Stream dropped domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/dropped +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerDropped.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerDropped(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerDropped("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream dropped domains with backlinks (CSV) + +`GET /v3.3/stream/domainer/dropped/backlinks` + +```javascript +// Stream dropped domains with backlinks (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/dropped/backlinks +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerDroppedBacklinks.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerDroppedBacklinks(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerDroppedBacklinks("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream a sample of newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/gtld` + +```javascript +// Stream a sample of newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/gtld +// Run (public endpoint, no API key needed): node StreamDomainerGtldSample.js +const { DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerGtldSample(opts) +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerGtldSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream a sample of cleaned newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/gtld/cleaned` + +```javascript +// Stream a sample of cleaned newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/gtld/cleaned +// Run (public endpoint, no API key needed): node StreamDomainerGtldCleanedSample.js +const { DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerGtldCleanedSample(opts) +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerGtldCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream a sample of newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/cctld` + +```javascript +// Stream a sample of newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/cctld +// Run (public endpoint, no API key needed): node StreamDomainerCctldSample.js +const { DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerCctldSample(opts) +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerCctldSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream a sample of cleaned newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/cctld/cleaned` + +```javascript +// Stream a sample of cleaned newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/cctld/cleaned +// Run (public endpoint, no API key needed): node StreamDomainerCctldCleanedSample.js +const { DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerCctldCleanedSample(opts) +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerCctldCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream a sample of expiring domains (CSV) + +`GET /v3.3/stream/domainer/sample/expired` + +```javascript +// Stream a sample of expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/expired +// Run (public endpoint, no API key needed): node StreamDomainerExpiredSample.js +const { DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerExpiredSample(opts) +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerExpiredSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream a sample of cleaned expiring domains (CSV) + +`GET /v3.3/stream/domainer/sample/expired/cleaned` + +```javascript +// Stream a sample of cleaned expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/expired/cleaned +// Run (public endpoint, no API key needed): node StreamDomainerExpiredCleanedSample.js +const { DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerExpiredCleanedSample(opts) +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerExpiredCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream a sample of dropped domains (CSV) + +`GET /v3.3/stream/domainer/sample/dropped` + +```javascript +// Stream a sample of dropped domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/dropped +// Run (public endpoint, no API key needed): node StreamDomainerDroppedSample.js +const { DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerDroppedSample(opts) +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerDroppedSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` + +#### Stream a sample of dropped domains with backlinks (CSV) + +`GET /v3.3/stream/domainer/sample/dropped/backlinks` + +```javascript +// Stream a sample of dropped domains with backlinks (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/dropped/backlinks +// Run (public endpoint, no API key needed): node StreamDomainerDroppedBacklinksSample.js +const { DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerDroppedBacklinksSample(opts) +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerDroppedBacklinksSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); +``` diff --git a/docs/languages/kotlin.md b/docs/languages/kotlin.md index 08912c6..876c1bb 100644 --- a/docs/languages/kotlin.md +++ b/docs/languages/kotlin.md @@ -111,7 +111,7 @@ fun main() { ## Endpoints -All 60 endpoints are shown below, grouped by category. Each includes its method, path, parameters, and a runnable example. See the [full endpoint reference](../endpoints/README.md) for response shapes and field details. +All 94 endpoints are shown below, grouped by category. Each includes its method, path, parameters, and a runnable example. See the [full endpoint reference](../endpoints/README.md) for response shapes and field details. ### WHOIS @@ -288,6 +288,116 @@ fun main() { ``` +#### Historical DNS Lookup (v2.2) + +`GET /v2.2/dns/historical` + +```kotlin +// Runnable example: Historical DNS Lookup (v2.2) (GET /v2.2/dns/historical) +// Run it from the Getting Started project: gradle run -PmainClass=DnsHistoricalV22Kt +// Parameters for dnsHistoricalV22 (GET /v2.2/dns/historical): +// - domainName (string, required) +// - type (string, required) +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +import com.whoisfreaks.client.apis.DNSApi +import com.whoisfreaks.client.infrastructure.ApiClient + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DNSApi() + + val result = api.dnsHistoricalV22("whoisfreaks.com", "A,MX,TXT", page = 1) + println(result) +} + +``` + +#### Historical DNS Lookup (v2.3) + +`GET /v2.3/dns/historical` + +```kotlin +// Runnable example: Historical DNS Lookup (v2.3) (GET /v2.3/dns/historical) +// Run it from the Getting Started project: gradle run -PmainClass=DnsHistoricalV23Kt +// Parameters for dnsHistoricalV23 (GET /v2.3/dns/historical): +// - domainName (string, required) +// - type (string, required) +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +import com.whoisfreaks.client.apis.DNSApi +import com.whoisfreaks.client.infrastructure.ApiClient + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DNSApi() + + val result = api.dnsHistoricalV23("whoisfreaks.com", "A,MX,TXT", page = 1) + println(result) +} + +``` + +#### Reverse DNS Lookup (v2.2) + +`GET /v2.2/dns/reverse` + +```kotlin +// Runnable example: Reverse DNS Lookup (v2.2) (GET /v2.2/dns/reverse) +// Run it from the Getting Started project: gradle run -PmainClass=DnsReverseV22Kt +// Parameters for dnsReverseV22 (GET /v2.2/dns/reverse): +// - value (string, required): IP, CIDR, or record value +// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required) +// - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match... +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +import com.whoisfreaks.client.apis.DNSApi +import com.whoisfreaks.client.infrastructure.ApiClient + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DNSApi() + + val result = api.dnsReverseV22("8.8.8.8", DNSApi.TypeDnsReverseV22.a, page = 1) + println(result) +} + +``` + +#### Reverse DNS Lookup (v2.3) + +`GET /v2.3/dns/reverse` + +```kotlin +// Runnable example: Reverse DNS Lookup (v2.3) (GET /v2.3/dns/reverse) +// Run it from the Getting Started project: gradle run -PmainClass=DnsReverseV23Kt +// Parameters for dnsReverseV23 (GET /v2.3/dns/reverse): +// - value (string, required): IP, CIDR, or record value +// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required) +// - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match... +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +import com.whoisfreaks.client.apis.DNSApi +import com.whoisfreaks.client.infrastructure.ApiClient + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DNSApi() + + val result = api.dnsReverseV23("8.8.8.8", DNSApi.TypeDnsReverseV23.a, page = 1) + println(result) +} + +``` + #### Bulk DNS Lookup `POST /v2.0/dns/bulk/live` @@ -545,6 +655,52 @@ fun main() { ``` +#### IP Reputation Lookup (v2.0) + +`GET /v2.0/security` + +```kotlin +// Runnable example: IP Reputation Lookup (v2.0) (GET /v2.0/security) +// Run it from the Getting Started project: gradle run -PmainClass=IpReputationV2Kt +// Parameters for ipReputationV2 (GET /v2.0/security): +// - ip (string, required) +import com.whoisfreaks.client.apis.IPReputationApi +import com.whoisfreaks.client.infrastructure.ApiClient + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = IPReputationApi() + + val result = api.ipReputationV2("8.8.8.8") + println(result) +} + +``` + +#### Bulk IP Reputation (v2.0) + +`POST /v2.0/security` + +```kotlin +// Runnable example: Bulk IP Reputation (v2.0) (POST /v2.0/security) +// Run it from the Getting Started project: gradle run -PmainClass=BulkIpReputationV2Kt +// Parameters for bulkIpReputationV2 (POST /v2.0/security): +// - body: BulkGeolocationRequest (required): request body object +import com.whoisfreaks.client.apis.IPReputationApi +import com.whoisfreaks.client.infrastructure.ApiClient +import com.whoisfreaks.client.models.BulkGeolocationRequest + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = IPReputationApi() + + val body = BulkGeolocationRequest(ips = listOf("1.1.1.1", "2.2.2.2", "8.8.8.8")) + val result = api.bulkIpReputationV2(body) + println(result) +} + +``` + ### Domain Reputation #### Domain Reputation Lookup @@ -1644,3 +1800,694 @@ fun main() { } ``` + +### Databases - Streaming + +#### Stream the daily phishing threat feed (CSV) + +`GET /v3.4/stream/threat-feed/phishing` + +```kotlin +// Runnable example: Stream the daily phishing threat feed (CSV) (GET /v3.4/stream/threat-feed/phishing) +// Run it from the Getting Started project: gradle run -PmainClass=StreamThreatFeedPhishingKt +// Parameters for streamThreatFeedPhishing (GET /v3.4/stream/threat-feed/phishing): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamThreatFeedPhishing(LocalDate.of(2026, 10, 1)) + println(result) +} + +``` + +#### Stream a sample of the phishing threat feed (CSV) + +`GET /v3.4/stream/threat-feed/phishing/sample` + +```kotlin +// Runnable example: Stream a sample of the phishing threat feed (CSV) (GET /v3.4/stream/threat-feed/phishing/sample) +// Run it from the Getting Started project: gradle run -PmainClass=StreamThreatFeedPhishingSampleKt +// Parameters for streamThreatFeedPhishingSample (GET /v3.4/stream/threat-feed/phishing/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi + +fun main() { + // Public endpoint: no API key needed. + val api = DatabasesStreamingApi() + + val result = api.streamThreatFeedPhishingSample() + println(result) +} + +``` + +#### Stream the daily malware threat feed (CSV) + +`GET /v3.4/stream/threat-feed/malware` + +```kotlin +// Runnable example: Stream the daily malware threat feed (CSV) (GET /v3.4/stream/threat-feed/malware) +// Run it from the Getting Started project: gradle run -PmainClass=StreamThreatFeedMalwareKt +// Parameters for streamThreatFeedMalware (GET /v3.4/stream/threat-feed/malware): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamThreatFeedMalware(LocalDate.of(2026, 10, 1)) + println(result) +} + +``` + +#### Stream a sample of the malware threat feed (CSV) + +`GET /v3.4/stream/threat-feed/malware/sample` + +```kotlin +// Runnable example: Stream a sample of the malware threat feed (CSV) (GET /v3.4/stream/threat-feed/malware/sample) +// Run it from the Getting Started project: gradle run -PmainClass=StreamThreatFeedMalwareSampleKt +// Parameters for streamThreatFeedMalwareSample (GET /v3.4/stream/threat-feed/malware/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi + +fun main() { + // Public endpoint: no API key needed. + val api = DatabasesStreamingApi() + + val result = api.streamThreatFeedMalwareSample() + println(result) +} + +``` + +#### Stream the daily spam threat feed (CSV) + +`GET /v3.4/stream/threat-feed/spam` + +```kotlin +// Runnable example: Stream the daily spam threat feed (CSV) (GET /v3.4/stream/threat-feed/spam) +// Run it from the Getting Started project: gradle run -PmainClass=StreamThreatFeedSpamKt +// Parameters for streamThreatFeedSpam (GET /v3.4/stream/threat-feed/spam): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamThreatFeedSpam(LocalDate.of(2026, 10, 1)) + println(result) +} + +``` + +#### Stream a sample of the spam threat feed (CSV) + +`GET /v3.4/stream/threat-feed/spam/sample` + +```kotlin +// Runnable example: Stream a sample of the spam threat feed (CSV) (GET /v3.4/stream/threat-feed/spam/sample) +// Run it from the Getting Started project: gradle run -PmainClass=StreamThreatFeedSpamSampleKt +// Parameters for streamThreatFeedSpamSample (GET /v3.4/stream/threat-feed/spam/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi + +fun main() { + // Public endpoint: no API key needed. + val api = DatabasesStreamingApi() + + val result = api.streamThreatFeedSpamSample() + println(result) +} + +``` + +#### Stream newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/gtld` + +```kotlin +// Runnable example: Stream newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/gtld) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerGtldKt +// Parameters for streamDomainerGtld (GET /v3.3/stream/domainer/gtld): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerGtld(LocalDate.of(2026, 10, 1)) + println(result) +} + +``` + +#### Stream cleaned newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned` + +```kotlin +// Runnable example: Stream cleaned newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/gtld/cleaned) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerGtldCleanedKt +// Parameters for streamDomainerGtldCleaned (GET /v3.3/stream/domainer/gtld/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerGtldCleaned(LocalDate.of(2026, 10, 1)) + println(result) +} + +``` + +#### Stream cleaned newly registered gTLD domains with an email (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned/email` + +```kotlin +// Runnable example: Stream cleaned newly registered gTLD domains with an email (CSV) (GET /v3.3/stream/domainer/gtld/cleaned/email) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerGtldCleanedEmailKt +// Parameters for streamDomainerGtldCleanedEmail (GET /v3.3/stream/domainer/gtld/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerGtldCleanedEmail(LocalDate.of(2026, 10, 1)) + println(result) +} + +``` + +#### Stream cleaned newly registered gTLD domains with a phone (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned/phone` + +```kotlin +// Runnable example: Stream cleaned newly registered gTLD domains with a phone (CSV) (GET /v3.3/stream/domainer/gtld/cleaned/phone) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerGtldCleanedPhoneKt +// Parameters for streamDomainerGtldCleanedPhone (GET /v3.3/stream/domainer/gtld/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerGtldCleanedPhone(LocalDate.of(2026, 10, 1)) + println(result) +} + +``` + +#### Stream newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/cctld` + +```kotlin +// Runnable example: Stream newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/cctld) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerCctldKt +// Parameters for streamDomainerCctld (GET /v3.3/stream/domainer/cctld): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerCctld(LocalDate.of(2026, 10, 1)) + println(result) +} + +``` + +#### Stream cleaned newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned` + +```kotlin +// Runnable example: Stream cleaned newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/cctld/cleaned) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerCctldCleanedKt +// Parameters for streamDomainerCctldCleaned (GET /v3.3/stream/domainer/cctld/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerCctldCleaned(LocalDate.of(2026, 10, 1)) + println(result) +} + +``` + +#### Stream cleaned newly registered ccTLD domains with an email (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned/email` + +```kotlin +// Runnable example: Stream cleaned newly registered ccTLD domains with an email (CSV) (GET /v3.3/stream/domainer/cctld/cleaned/email) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerCctldCleanedEmailKt +// Parameters for streamDomainerCctldCleanedEmail (GET /v3.3/stream/domainer/cctld/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerCctldCleanedEmail(LocalDate.of(2026, 10, 1)) + println(result) +} + +``` + +#### Stream cleaned newly registered ccTLD domains with a phone (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned/phone` + +```kotlin +// Runnable example: Stream cleaned newly registered ccTLD domains with a phone (CSV) (GET /v3.3/stream/domainer/cctld/cleaned/phone) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerCctldCleanedPhoneKt +// Parameters for streamDomainerCctldCleanedPhone (GET /v3.3/stream/domainer/cctld/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerCctldCleanedPhone(LocalDate.of(2026, 10, 1)) + println(result) +} + +``` + +#### Stream expiring domains (CSV) + +`GET /v3.3/stream/domainer/expired` + +```kotlin +// Runnable example: Stream expiring domains (CSV) (GET /v3.3/stream/domainer/expired) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerExpiredKt +// Parameters for streamDomainerExpired (GET /v3.3/stream/domainer/expired): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerExpired(LocalDate.of(2026, 10, 1)) + println(result) +} + +``` + +#### Stream cleaned expiring domains (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned` + +```kotlin +// Runnable example: Stream cleaned expiring domains (CSV) (GET /v3.3/stream/domainer/expired/cleaned) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerExpiredCleanedKt +// Parameters for streamDomainerExpiredCleaned (GET /v3.3/stream/domainer/expired/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerExpiredCleaned(LocalDate.of(2026, 10, 1)) + println(result) +} + +``` + +#### Stream cleaned expiring domains with an email (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned/email` + +```kotlin +// Runnable example: Stream cleaned expiring domains with an email (CSV) (GET /v3.3/stream/domainer/expired/cleaned/email) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerExpiredCleanedEmailKt +// Parameters for streamDomainerExpiredCleanedEmail (GET /v3.3/stream/domainer/expired/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerExpiredCleanedEmail(LocalDate.of(2026, 10, 1)) + println(result) +} + +``` + +#### Stream cleaned expiring domains with a phone (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned/phone` + +```kotlin +// Runnable example: Stream cleaned expiring domains with a phone (CSV) (GET /v3.3/stream/domainer/expired/cleaned/phone) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerExpiredCleanedPhoneKt +// Parameters for streamDomainerExpiredCleanedPhone (GET /v3.3/stream/domainer/expired/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerExpiredCleanedPhone(LocalDate.of(2026, 10, 1)) + println(result) +} + +``` + +#### Stream dropped domains (CSV) + +`GET /v3.3/stream/domainer/dropped` + +```kotlin +// Runnable example: Stream dropped domains (CSV) (GET /v3.3/stream/domainer/dropped) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerDroppedKt +// Parameters for streamDomainerDropped (GET /v3.3/stream/domainer/dropped): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerDropped(LocalDate.of(2026, 10, 1)) + println(result) +} + +``` + +#### Stream dropped domains with backlinks (CSV) + +`GET /v3.3/stream/domainer/dropped/backlinks` + +```kotlin +// Runnable example: Stream dropped domains with backlinks (CSV) (GET /v3.3/stream/domainer/dropped/backlinks) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerDroppedBacklinksKt +// Parameters for streamDomainerDroppedBacklinks (GET /v3.3/stream/domainer/dropped/backlinks): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerDroppedBacklinks(LocalDate.of(2026, 10, 1)) + println(result) +} + +``` + +#### Stream a sample of newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/gtld` + +```kotlin +// Runnable example: Stream a sample of newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/sample/gtld) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerGtldSampleKt +// Parameters for streamDomainerGtldSample (GET /v3.3/stream/domainer/sample/gtld): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi + +fun main() { + // Public endpoint: no API key needed. + val api = DatabasesStreamingApi() + + val result = api.streamDomainerGtldSample() + println(result) +} + +``` + +#### Stream a sample of cleaned newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/gtld/cleaned` + +```kotlin +// Runnable example: Stream a sample of cleaned newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/sample/gtld/cleaned) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerGtldCleanedSampleKt +// Parameters for streamDomainerGtldCleanedSample (GET /v3.3/stream/domainer/sample/gtld/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi + +fun main() { + // Public endpoint: no API key needed. + val api = DatabasesStreamingApi() + + val result = api.streamDomainerGtldCleanedSample() + println(result) +} + +``` + +#### Stream a sample of newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/cctld` + +```kotlin +// Runnable example: Stream a sample of newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/sample/cctld) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerCctldSampleKt +// Parameters for streamDomainerCctldSample (GET /v3.3/stream/domainer/sample/cctld): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi + +fun main() { + // Public endpoint: no API key needed. + val api = DatabasesStreamingApi() + + val result = api.streamDomainerCctldSample() + println(result) +} + +``` + +#### Stream a sample of cleaned newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/cctld/cleaned` + +```kotlin +// Runnable example: Stream a sample of cleaned newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/sample/cctld/cleaned) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerCctldCleanedSampleKt +// Parameters for streamDomainerCctldCleanedSample (GET /v3.3/stream/domainer/sample/cctld/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi + +fun main() { + // Public endpoint: no API key needed. + val api = DatabasesStreamingApi() + + val result = api.streamDomainerCctldCleanedSample() + println(result) +} + +``` + +#### Stream a sample of expiring domains (CSV) + +`GET /v3.3/stream/domainer/sample/expired` + +```kotlin +// Runnable example: Stream a sample of expiring domains (CSV) (GET /v3.3/stream/domainer/sample/expired) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerExpiredSampleKt +// Parameters for streamDomainerExpiredSample (GET /v3.3/stream/domainer/sample/expired): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi + +fun main() { + // Public endpoint: no API key needed. + val api = DatabasesStreamingApi() + + val result = api.streamDomainerExpiredSample() + println(result) +} + +``` + +#### Stream a sample of cleaned expiring domains (CSV) + +`GET /v3.3/stream/domainer/sample/expired/cleaned` + +```kotlin +// Runnable example: Stream a sample of cleaned expiring domains (CSV) (GET /v3.3/stream/domainer/sample/expired/cleaned) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerExpiredCleanedSampleKt +// Parameters for streamDomainerExpiredCleanedSample (GET /v3.3/stream/domainer/sample/expired/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi + +fun main() { + // Public endpoint: no API key needed. + val api = DatabasesStreamingApi() + + val result = api.streamDomainerExpiredCleanedSample() + println(result) +} + +``` + +#### Stream a sample of dropped domains (CSV) + +`GET /v3.3/stream/domainer/sample/dropped` + +```kotlin +// Runnable example: Stream a sample of dropped domains (CSV) (GET /v3.3/stream/domainer/sample/dropped) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerDroppedSampleKt +// Parameters for streamDomainerDroppedSample (GET /v3.3/stream/domainer/sample/dropped): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi + +fun main() { + // Public endpoint: no API key needed. + val api = DatabasesStreamingApi() + + val result = api.streamDomainerDroppedSample() + println(result) +} + +``` + +#### Stream a sample of dropped domains with backlinks (CSV) + +`GET /v3.3/stream/domainer/sample/dropped/backlinks` + +```kotlin +// Runnable example: Stream a sample of dropped domains with backlinks (CSV) (GET /v3.3/stream/domainer/sample/dropped/backlinks) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerDroppedBacklinksSampleKt +// Parameters for streamDomainerDroppedBacklinksSample (GET /v3.3/stream/domainer/sample/dropped/backlinks): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi + +fun main() { + // Public endpoint: no API key needed. + val api = DatabasesStreamingApi() + + val result = api.streamDomainerDroppedBacklinksSample() + println(result) +} + +``` diff --git a/docs/languages/php.md b/docs/languages/php.md index 162eaa7..6b8b4a2 100644 --- a/docs/languages/php.md +++ b/docs/languages/php.md @@ -104,7 +104,7 @@ try { ## Endpoints -All 60 endpoints are shown below, grouped by category. Each includes its method, path, parameters, and a runnable example. See the [full endpoint reference](../endpoints/README.md) for response shapes and field details. +All 94 endpoints are shown below, grouped by category. Each includes its method, path, parameters, and a runnable example. See the [full endpoint reference](../endpoints/README.md) for response shapes and field details. ### WHOIS @@ -368,6 +368,164 @@ try { ``` +#### Historical DNS Lookup (v2.2) + +`GET /v2.2/dns/historical` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DNSApi(new Client(), $config); + +try { + $result = $api->dnsHistoricalV22('whoisfreaks.com', 'A,MX,TXT', 1); // domainName, type, page + echo $result, PHP_EOL; // models print as JSON +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Historical DNS Lookup (v2.3) + +`GET /v2.3/dns/historical` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DNSApi(new Client(), $config); + +try { + $result = $api->dnsHistoricalV23('whoisfreaks.com', 'A,MX,TXT', 1); // domainName, type, page + echo $result, PHP_EOL; // models print as JSON +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Reverse DNS Lookup (v2.2) + +`GET /v2.2/dns/reverse` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DNSApi(new Client(), $config); + +try { + $result = $api->dnsReverseV22('8.8.8.8', 'a', true, 1); // value, type, exact, page + echo $result, PHP_EOL; // models print as JSON +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Reverse DNS Lookup (v2.3) + +`GET /v2.3/dns/reverse` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DNSApi(new Client(), $config); + +try { + $result = $api->dnsReverseV23('8.8.8.8', 'a', true, 1); // value, type, exact, page + echo $result, PHP_EOL; // models print as JSON +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + #### Bulk DNS Lookup `POST /v2.0/dns/bulk/live` @@ -761,6 +919,81 @@ try { ``` +#### IP Reputation Lookup (v2.0) + +`GET /v2.0/security` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new IPReputationApi(new Client(), $config); + +try { + $result = $api->ipReputationV2('8.8.8.8'); + echo $result, PHP_EOL; // models print as JSON +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Bulk IP Reputation (v2.0) + +`POST /v2.0/security` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new IPReputationApi(new Client(), $config); + +$request = new BulkGeolocationRequest([ + 'ips' => ['1.1.1.1', '2.2.2.2', '8.8.8.8'], +]); + +try { + $results = $api->bulkIpReputationV2($request); + foreach ($results as $result) { + echo $result, PHP_EOL; // models print as JSON + } +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + ### Domain Reputation #### Domain Reputation Lookup @@ -2352,3 +2585,1035 @@ try { } ``` + +### Databases - Streaming + +#### Stream the daily phishing threat feed (CSV) + +`GET /v3.4/stream/threat-feed/phishing` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamThreatFeedPhishing('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream a sample of the phishing threat feed (CSV) + +`GET /v3.4/stream/threat-feed/phishing/sample` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamThreatFeedPhishingSample(); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream the daily malware threat feed (CSV) + +`GET /v3.4/stream/threat-feed/malware` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamThreatFeedMalware('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream a sample of the malware threat feed (CSV) + +`GET /v3.4/stream/threat-feed/malware/sample` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamThreatFeedMalwareSample(); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream the daily spam threat feed (CSV) + +`GET /v3.4/stream/threat-feed/spam` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamThreatFeedSpam('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream a sample of the spam threat feed (CSV) + +`GET /v3.4/stream/threat-feed/spam/sample` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamThreatFeedSpamSample(); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/gtld` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerGtld('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream cleaned newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerGtldCleaned('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream cleaned newly registered gTLD domains with an email (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned/email` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerGtldCleanedEmail('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream cleaned newly registered gTLD domains with a phone (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned/phone` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerGtldCleanedPhone('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/cctld` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerCctld('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream cleaned newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerCctldCleaned('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream cleaned newly registered ccTLD domains with an email (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned/email` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerCctldCleanedEmail('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream cleaned newly registered ccTLD domains with a phone (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned/phone` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerCctldCleanedPhone('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream expiring domains (CSV) + +`GET /v3.3/stream/domainer/expired` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerExpired('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream cleaned expiring domains (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerExpiredCleaned('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream cleaned expiring domains with an email (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned/email` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerExpiredCleanedEmail('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream cleaned expiring domains with a phone (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned/phone` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerExpiredCleanedPhone('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream dropped domains (CSV) + +`GET /v3.3/stream/domainer/dropped` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerDropped('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream dropped domains with backlinks (CSV) + +`GET /v3.3/stream/domainer/dropped/backlinks` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerDroppedBacklinks('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream a sample of newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/gtld` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerGtldSample(); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream a sample of cleaned newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/gtld/cleaned` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerGtldCleanedSample(); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream a sample of newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/cctld` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerCctldSample(); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream a sample of cleaned newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/cctld/cleaned` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerCctldCleanedSample(); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream a sample of expiring domains (CSV) + +`GET /v3.3/stream/domainer/sample/expired` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerExpiredSample(); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream a sample of cleaned expiring domains (CSV) + +`GET /v3.3/stream/domainer/sample/expired/cleaned` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerExpiredCleanedSample(); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream a sample of dropped domains (CSV) + +`GET /v3.3/stream/domainer/sample/dropped` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerDroppedSample(); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` + +#### Stream a sample of dropped domains with backlinks (CSV) + +`GET /v3.3/stream/domainer/sample/dropped/backlinks` + +```php +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerDroppedBacklinksSample(); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} + +``` diff --git a/docs/languages/python.md b/docs/languages/python.md index c446e1b..ef9cb35 100644 --- a/docs/languages/python.md +++ b/docs/languages/python.md @@ -92,7 +92,7 @@ with whoisfreaks.ApiClient(config) as client: ## Endpoints -All 60 endpoints are shown below, grouped by category. Each includes its method, path, parameters, and a runnable example. See the [full endpoint reference](../endpoints/README.md) for response shapes and field details. +All 94 endpoints are shown below, grouped by category. Each includes its method, path, parameters, and a runnable example. See the [full endpoint reference](../endpoints/README.md) for response shapes and field details. ### WHOIS @@ -303,6 +303,136 @@ with whoisfreaks.ApiClient(config) as client: print(json.dumps(result.to_dict(), indent=2)) ``` +#### Historical DNS Lookup (v2.2) + +`GET /v2.2/dns/historical` + +```python +"""Historical DNS Lookup (v2.2): GET https://api.whoisfreaks.com/v2.2/dns/historical + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python DnsHistoricalV22.py +""" +import json +import os + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DNSApi(client) + + # dns_historical_v22 parameters: + # domain_name (str, required) + # type (str, required): default "all" + # page (int, optional, keyword): default 1 + # sort (str, optional, keyword): Sort direction. Omit to leave the results unsorted; one of asc, desc + # sort_by (str, optional, keyword): Field to sort on. Only applies when sort is given; one of firstSeen, lastSeen; default "lastSeen" + # format (str, optional, keyword): one of json, xml; default "json" + result = api.dns_historical_v22("whoisfreaks.com", "A,MX,TXT", page=1) + print(json.dumps(result.to_dict(), indent=2)) +``` + +#### Historical DNS Lookup (v2.3) + +`GET /v2.3/dns/historical` + +```python +"""Historical DNS Lookup (v2.3): GET https://api.whoisfreaks.com/v2.3/dns/historical + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python DnsHistoricalV23.py +""" +import json +import os + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DNSApi(client) + + # dns_historical_v23 parameters: + # domain_name (str, required) + # type (str, required): default "all" + # page (int, optional, keyword): default 1 + # sort (str, optional, keyword): Sort direction. Omit to leave the results unsorted; one of asc, desc + # sort_by (str, optional, keyword): Field to sort on. Only applies when sort is given; one of firstSeen, lastSeen; default "lastSeen" + # format (str, optional, keyword): one of json, xml; default "json" + result = api.dns_historical_v23("whoisfreaks.com", "A,MX,TXT", page=1) + print(json.dumps(result.to_dict(), indent=2)) +``` + +#### Reverse DNS Lookup (v2.2) + +`GET /v2.2/dns/reverse` + +```python +"""Reverse DNS Lookup (v2.2): GET https://api.whoisfreaks.com/v2.2/dns/reverse + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python DnsReverseV22.py +""" +import json +import os + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DNSApi(client) + + # dns_reverse_v22 parameters: + # value (str, required): IP, CIDR, or record value + # type (str, required): one of a, mx, cname, ns, aaaa, txt, soa + # exact (bool, optional, keyword): When false the value is matched as a substring, which is far slower than an e...; default True + # page (int, optional, keyword): default 1 + # sort (str, optional, keyword): Sort direction. Omit to leave the results unsorted; one of asc, desc + # sort_by (str, optional, keyword): Field to sort on. Only applies when sort is given; one of firstSeen, lastSeen; default "lastSeen" + # format (str, optional, keyword): one of json, xml; default "json" + result = api.dns_reverse_v22("8.8.8.8", "a", page=1) + print(json.dumps(result.to_dict(), indent=2)) +``` + +#### Reverse DNS Lookup (v2.3) + +`GET /v2.3/dns/reverse` + +```python +"""Reverse DNS Lookup (v2.3): GET https://api.whoisfreaks.com/v2.3/dns/reverse + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python DnsReverseV23.py +""" +import json +import os + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DNSApi(client) + + # dns_reverse_v23 parameters: + # value (str, required): IP, CIDR, or record value + # type (str, required): one of a, mx, cname, ns, aaaa, txt, soa + # exact (bool, optional, keyword): When false the value is matched as a substring, which is far slower than an e...; default True + # page (int, optional, keyword): default 1 + # sort (str, optional, keyword): Sort direction. Omit to leave the results unsorted; one of asc, desc + # sort_by (str, optional, keyword): Field to sort on. Only applies when sort is given; one of firstSeen, lastSeen; default "lastSeen" + # format (str, optional, keyword): one of json, xml; default "json" + result = api.dns_reverse_v23("8.8.8.8", "a", page=1) + print(json.dumps(result.to_dict(), indent=2)) +``` + #### Bulk DNS Lookup `POST /v2.0/dns/bulk/live` @@ -606,6 +736,61 @@ with whoisfreaks.ApiClient(config) as client: print(json.dumps([item.to_dict() for item in results], indent=2)) ``` +#### IP Reputation Lookup (v2.0) + +`GET /v2.0/security` + +```python +"""IP Reputation Lookup (v2.0): GET https://api.whoisfreaks.com/v2.0/security + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python IpReputationV2.py +""" +import json +import os + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.IPReputationApi(client) + + # ip_reputation_v2 parameters: + # ip (str, required) + result = api.ip_reputation_v2("8.8.8.8") + print(json.dumps(result.to_dict(), indent=2)) +``` + +#### Bulk IP Reputation (v2.0) + +`POST /v2.0/security` + +```python +"""Bulk IP Reputation (v2.0): POST https://api.whoisfreaks.com/v2.0/security + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python BulkIpReputationV2.py +""" +import json +import os + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.IPReputationApi(client) + + # bulk_ip_reputation_v2 parameters: + # bulk_geolocation_request (BulkGeolocationRequest, required): request body + body = whoisfreaks.BulkGeolocationRequest(ips=["1.1.1.1", "2.2.2.2", "8.8.8.8"]) + results = api.bulk_ip_reputation_v2(body) + print(json.dumps([item.to_dict() for item in results], indent=2)) +``` + ### Domain Reputation #### Domain Reputation Lookup @@ -1878,3 +2063,806 @@ with whoisfreaks.ApiClient(config) as client: f.write(data) print(f"Saved {len(data)} bytes to {os.path.abspath(path)}") ``` + +### Databases - Streaming + +#### Stream the daily phishing threat feed (CSV) + +`GET /v3.4/stream/threat-feed/phishing` + +```python +"""Stream the daily phishing threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/phishing + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamThreatFeedPhishing.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_threat_feed_phishing parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_threat_feed_phishing(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream a sample of the phishing threat feed (CSV) + +`GET /v3.4/stream/threat-feed/phishing/sample` + +```python +"""Stream a sample of the phishing threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/phishing/sample + +Run it (public endpoint, no API key needed): + python StreamThreatFeedPhishingSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_threat_feed_phishing_sample parameters: + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_threat_feed_phishing_sample() # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream the daily malware threat feed (CSV) + +`GET /v3.4/stream/threat-feed/malware` + +```python +"""Stream the daily malware threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/malware + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamThreatFeedMalware.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_threat_feed_malware parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_threat_feed_malware(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream a sample of the malware threat feed (CSV) + +`GET /v3.4/stream/threat-feed/malware/sample` + +```python +"""Stream a sample of the malware threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/malware/sample + +Run it (public endpoint, no API key needed): + python StreamThreatFeedMalwareSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_threat_feed_malware_sample parameters: + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_threat_feed_malware_sample() # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream the daily spam threat feed (CSV) + +`GET /v3.4/stream/threat-feed/spam` + +```python +"""Stream the daily spam threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/spam + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamThreatFeedSpam.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_threat_feed_spam parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_threat_feed_spam(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream a sample of the spam threat feed (CSV) + +`GET /v3.4/stream/threat-feed/spam/sample` + +```python +"""Stream a sample of the spam threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/spam/sample + +Run it (public endpoint, no API key needed): + python StreamThreatFeedSpamSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_threat_feed_spam_sample parameters: + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_threat_feed_spam_sample() # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/gtld` + +```python +"""Stream newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerGtld.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_gtld parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_gtld(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream cleaned newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned` + +```python +"""Stream cleaned newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerGtldCleaned.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_gtld_cleaned parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_gtld_cleaned(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream cleaned newly registered gTLD domains with an email (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned/email` + +```python +"""Stream cleaned newly registered gTLD domains with an email (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned/email + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerGtldCleanedEmail.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_gtld_cleaned_email parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_gtld_cleaned_email(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream cleaned newly registered gTLD domains with a phone (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned/phone` + +```python +"""Stream cleaned newly registered gTLD domains with a phone (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned/phone + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerGtldCleanedPhone.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_gtld_cleaned_phone parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_gtld_cleaned_phone(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/cctld` + +```python +"""Stream newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerCctld.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_cctld parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_cctld(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream cleaned newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned` + +```python +"""Stream cleaned newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerCctldCleaned.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_cctld_cleaned parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_cctld_cleaned(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream cleaned newly registered ccTLD domains with an email (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned/email` + +```python +"""Stream cleaned newly registered ccTLD domains with an email (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned/email + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerCctldCleanedEmail.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_cctld_cleaned_email parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_cctld_cleaned_email(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream cleaned newly registered ccTLD domains with a phone (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned/phone` + +```python +"""Stream cleaned newly registered ccTLD domains with a phone (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned/phone + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerCctldCleanedPhone.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_cctld_cleaned_phone parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_cctld_cleaned_phone(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream expiring domains (CSV) + +`GET /v3.3/stream/domainer/expired` + +```python +"""Stream expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerExpired.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_expired parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_expired(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream cleaned expiring domains (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned` + +```python +"""Stream cleaned expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerExpiredCleaned.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_expired_cleaned parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_expired_cleaned(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream cleaned expiring domains with an email (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned/email` + +```python +"""Stream cleaned expiring domains with an email (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned/email + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerExpiredCleanedEmail.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_expired_cleaned_email parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_expired_cleaned_email(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream cleaned expiring domains with a phone (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned/phone` + +```python +"""Stream cleaned expiring domains with a phone (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned/phone + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerExpiredCleanedPhone.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_expired_cleaned_phone parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_expired_cleaned_phone(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream dropped domains (CSV) + +`GET /v3.3/stream/domainer/dropped` + +```python +"""Stream dropped domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/dropped + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerDropped.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_dropped parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_dropped(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream dropped domains with backlinks (CSV) + +`GET /v3.3/stream/domainer/dropped/backlinks` + +```python +"""Stream dropped domains with backlinks (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/dropped/backlinks + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerDroppedBacklinks.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_dropped_backlinks parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_dropped_backlinks(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream a sample of newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/gtld` + +```python +"""Stream a sample of newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/gtld + +Run it (public endpoint, no API key needed): + python StreamDomainerGtldSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_gtld_sample parameters: + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_gtld_sample() # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream a sample of cleaned newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/gtld/cleaned` + +```python +"""Stream a sample of cleaned newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/gtld/cleaned + +Run it (public endpoint, no API key needed): + python StreamDomainerGtldCleanedSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_gtld_cleaned_sample parameters: + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_gtld_cleaned_sample() # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream a sample of newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/cctld` + +```python +"""Stream a sample of newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/cctld + +Run it (public endpoint, no API key needed): + python StreamDomainerCctldSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_cctld_sample parameters: + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_cctld_sample() # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream a sample of cleaned newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/cctld/cleaned` + +```python +"""Stream a sample of cleaned newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/cctld/cleaned + +Run it (public endpoint, no API key needed): + python StreamDomainerCctldCleanedSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_cctld_cleaned_sample parameters: + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_cctld_cleaned_sample() # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream a sample of expiring domains (CSV) + +`GET /v3.3/stream/domainer/sample/expired` + +```python +"""Stream a sample of expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/expired + +Run it (public endpoint, no API key needed): + python StreamDomainerExpiredSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_expired_sample parameters: + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_expired_sample() # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream a sample of cleaned expiring domains (CSV) + +`GET /v3.3/stream/domainer/sample/expired/cleaned` + +```python +"""Stream a sample of cleaned expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/expired/cleaned + +Run it (public endpoint, no API key needed): + python StreamDomainerExpiredCleanedSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_expired_cleaned_sample parameters: + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_expired_cleaned_sample() # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream a sample of dropped domains (CSV) + +`GET /v3.3/stream/domainer/sample/dropped` + +```python +"""Stream a sample of dropped domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/dropped + +Run it (public endpoint, no API key needed): + python StreamDomainerDroppedSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_dropped_sample parameters: + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_dropped_sample() # plain CSV text, already decompressed + print(csv_text) +``` + +#### Stream a sample of dropped domains with backlinks (CSV) + +`GET /v3.3/stream/domainer/sample/dropped/backlinks` + +```python +"""Stream a sample of dropped domains with backlinks (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/dropped/backlinks + +Run it (public endpoint, no API key needed): + python StreamDomainerDroppedBacklinksSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_dropped_backlinks_sample parameters: + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_dropped_backlinks_sample() # plain CSV text, already decompressed + print(csv_text) +``` diff --git a/docs/languages/ruby.md b/docs/languages/ruby.md index 9b3bdf8..d4a4b1e 100644 --- a/docs/languages/ruby.md +++ b/docs/languages/ruby.md @@ -109,7 +109,7 @@ end ## Endpoints -All 60 endpoints are shown below, grouped by category. Each includes its method, path, parameters, and a runnable example. See the [full endpoint reference](../endpoints/README.md) for response shapes and field details. +All 94 endpoints are shown below, grouped by category. Each includes its method, path, parameters, and a runnable example. See the [full endpoint reference](../endpoints/README.md) for response shapes and field details. ### WHOIS @@ -342,6 +342,148 @@ end ``` +#### Historical DNS Lookup (v2.2) + +`GET /v2.2/dns/historical` + +```ruby +# Historical DNS Lookup (v2.2) +# +# Parameters for dnsHistoricalV22 (GET /v2.2/dns/historical): +# - domain_name (string, required) +# - type (string, required) +# - page (integer, optional) +# - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +# - sort_by (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +# - format (string (one of: json, xml), optional) + +require "json" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DNSApi.new + +begin + result = api.dns_historical_v22("whoisfreaks.com", "A,MX,TXT", page: 1) + puts JSON.pretty_generate(result.to_hash) +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Historical DNS Lookup (v2.3) + +`GET /v2.3/dns/historical` + +```ruby +# Historical DNS Lookup (v2.3) +# +# Parameters for dnsHistoricalV23 (GET /v2.3/dns/historical): +# - domain_name (string, required) +# - type (string, required) +# - page (integer, optional) +# - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +# - sort_by (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +# - format (string (one of: json, xml), optional) + +require "json" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DNSApi.new + +begin + result = api.dns_historical_v23("whoisfreaks.com", "A,MX,TXT", page: 1) + puts JSON.pretty_generate(result.to_hash) +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Reverse DNS Lookup (v2.2) + +`GET /v2.2/dns/reverse` + +```ruby +# Reverse DNS Lookup (v2.2) +# +# Parameters for dnsReverseV22 (GET /v2.2/dns/reverse): +# - value (string, required): IP, CIDR, or record value +# - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required) +# - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match... +# - page (integer, optional) +# - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +# - sort_by (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +# - format (string (one of: json, xml), optional) + +require "json" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DNSApi.new + +begin + result = api.dns_reverse_v22("8.8.8.8", "a", page: 1) + puts JSON.pretty_generate(result.to_hash) +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Reverse DNS Lookup (v2.3) + +`GET /v2.3/dns/reverse` + +```ruby +# Reverse DNS Lookup (v2.3) +# +# Parameters for dnsReverseV23 (GET /v2.3/dns/reverse): +# - value (string, required): IP, CIDR, or record value +# - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required) +# - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match... +# - page (integer, optional) +# - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +# - sort_by (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +# - format (string (one of: json, xml), optional) + +require "json" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DNSApi.new + +begin + result = api.dns_reverse_v23("8.8.8.8", "a", page: 1) + puts JSON.pretty_generate(result.to_hash) +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + #### Bulk DNS Lookup `POST /v2.0/dns/bulk/live` @@ -679,6 +821,68 @@ end ``` +#### IP Reputation Lookup (v2.0) + +`GET /v2.0/security` + +```ruby +# IP Reputation Lookup (v2.0) +# +# Parameters for ipReputationV2 (GET /v2.0/security): +# - ip (string, required) + +require "json" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::IPReputationApi.new + +begin + result = api.ip_reputation_v2("8.8.8.8") + puts JSON.pretty_generate(result.to_hash) +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Bulk IP Reputation (v2.0) + +`POST /v2.0/security` + +```ruby +# Bulk IP Reputation (v2.0) +# +# Parameters for bulkIpReputationV2 (POST /v2.0/security): +# - body: BulkGeolocationRequest (required): request body object + +require "json" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::IPReputationApi.new + +request = WhoisFreaks::BulkGeolocationRequest.new(ips: ["1.1.1.1", "2.2.2.2", "8.8.8.8"]) + +begin + results = api.bulk_ip_reputation_v2(request) + puts JSON.pretty_generate(results.map(&:to_hash)) +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + ### Domain Reputation #### Domain Reputation Lookup @@ -2120,3 +2324,912 @@ rescue WhoisFreaks::ApiError => e end ``` + +### Databases - Streaming + +#### Stream the daily phishing threat feed (CSV) + +`GET /v3.4/stream/threat-feed/phishing` + +```ruby +# Stream the daily phishing threat feed (CSV) +# +# Parameters for streamThreatFeedPhishing (GET /v3.4/stream/threat-feed/phishing): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_threat_feed_phishing(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream a sample of the phishing threat feed (CSV) + +`GET /v3.4/stream/threat-feed/phishing/sample` + +```ruby +# Stream a sample of the phishing threat feed (CSV) +# +# Parameters for streamThreatFeedPhishingSample (GET /v3.4/stream/threat-feed/phishing/sample): +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "whoisfreaks" + +# Read the API key from the environment and set it once. +# (This endpoint is public, so the key is not sent with this request.) +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_threat_feed_phishing_sample + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream the daily malware threat feed (CSV) + +`GET /v3.4/stream/threat-feed/malware` + +```ruby +# Stream the daily malware threat feed (CSV) +# +# Parameters for streamThreatFeedMalware (GET /v3.4/stream/threat-feed/malware): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_threat_feed_malware(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream a sample of the malware threat feed (CSV) + +`GET /v3.4/stream/threat-feed/malware/sample` + +```ruby +# Stream a sample of the malware threat feed (CSV) +# +# Parameters for streamThreatFeedMalwareSample (GET /v3.4/stream/threat-feed/malware/sample): +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "whoisfreaks" + +# Read the API key from the environment and set it once. +# (This endpoint is public, so the key is not sent with this request.) +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_threat_feed_malware_sample + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream the daily spam threat feed (CSV) + +`GET /v3.4/stream/threat-feed/spam` + +```ruby +# Stream the daily spam threat feed (CSV) +# +# Parameters for streamThreatFeedSpam (GET /v3.4/stream/threat-feed/spam): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_threat_feed_spam(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream a sample of the spam threat feed (CSV) + +`GET /v3.4/stream/threat-feed/spam/sample` + +```ruby +# Stream a sample of the spam threat feed (CSV) +# +# Parameters for streamThreatFeedSpamSample (GET /v3.4/stream/threat-feed/spam/sample): +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "whoisfreaks" + +# Read the API key from the environment and set it once. +# (This endpoint is public, so the key is not sent with this request.) +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_threat_feed_spam_sample + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/gtld` + +```ruby +# Stream newly registered gTLD domains (CSV) +# +# Parameters for streamDomainerGtld (GET /v3.3/stream/domainer/gtld): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_gtld(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream cleaned newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned` + +```ruby +# Stream cleaned newly registered gTLD domains (CSV) +# +# Parameters for streamDomainerGtldCleaned (GET /v3.3/stream/domainer/gtld/cleaned): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_gtld_cleaned(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream cleaned newly registered gTLD domains with an email (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned/email` + +```ruby +# Stream cleaned newly registered gTLD domains with an email (CSV) +# +# Parameters for streamDomainerGtldCleanedEmail (GET /v3.3/stream/domainer/gtld/cleaned/email): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_gtld_cleaned_email(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream cleaned newly registered gTLD domains with a phone (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned/phone` + +```ruby +# Stream cleaned newly registered gTLD domains with a phone (CSV) +# +# Parameters for streamDomainerGtldCleanedPhone (GET /v3.3/stream/domainer/gtld/cleaned/phone): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_gtld_cleaned_phone(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/cctld` + +```ruby +# Stream newly registered ccTLD domains (CSV) +# +# Parameters for streamDomainerCctld (GET /v3.3/stream/domainer/cctld): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_cctld(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream cleaned newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned` + +```ruby +# Stream cleaned newly registered ccTLD domains (CSV) +# +# Parameters for streamDomainerCctldCleaned (GET /v3.3/stream/domainer/cctld/cleaned): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_cctld_cleaned(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream cleaned newly registered ccTLD domains with an email (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned/email` + +```ruby +# Stream cleaned newly registered ccTLD domains with an email (CSV) +# +# Parameters for streamDomainerCctldCleanedEmail (GET /v3.3/stream/domainer/cctld/cleaned/email): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_cctld_cleaned_email(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream cleaned newly registered ccTLD domains with a phone (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned/phone` + +```ruby +# Stream cleaned newly registered ccTLD domains with a phone (CSV) +# +# Parameters for streamDomainerCctldCleanedPhone (GET /v3.3/stream/domainer/cctld/cleaned/phone): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_cctld_cleaned_phone(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream expiring domains (CSV) + +`GET /v3.3/stream/domainer/expired` + +```ruby +# Stream expiring domains (CSV) +# +# Parameters for streamDomainerExpired (GET /v3.3/stream/domainer/expired): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_expired(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream cleaned expiring domains (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned` + +```ruby +# Stream cleaned expiring domains (CSV) +# +# Parameters for streamDomainerExpiredCleaned (GET /v3.3/stream/domainer/expired/cleaned): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_expired_cleaned(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream cleaned expiring domains with an email (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned/email` + +```ruby +# Stream cleaned expiring domains with an email (CSV) +# +# Parameters for streamDomainerExpiredCleanedEmail (GET /v3.3/stream/domainer/expired/cleaned/email): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_expired_cleaned_email(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream cleaned expiring domains with a phone (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned/phone` + +```ruby +# Stream cleaned expiring domains with a phone (CSV) +# +# Parameters for streamDomainerExpiredCleanedPhone (GET /v3.3/stream/domainer/expired/cleaned/phone): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_expired_cleaned_phone(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream dropped domains (CSV) + +`GET /v3.3/stream/domainer/dropped` + +```ruby +# Stream dropped domains (CSV) +# +# Parameters for streamDomainerDropped (GET /v3.3/stream/domainer/dropped): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_dropped(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream dropped domains with backlinks (CSV) + +`GET /v3.3/stream/domainer/dropped/backlinks` + +```ruby +# Stream dropped domains with backlinks (CSV) +# +# Parameters for streamDomainerDroppedBacklinks (GET /v3.3/stream/domainer/dropped/backlinks): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_dropped_backlinks(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream a sample of newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/gtld` + +```ruby +# Stream a sample of newly registered gTLD domains (CSV) +# +# Parameters for streamDomainerGtldSample (GET /v3.3/stream/domainer/sample/gtld): +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "whoisfreaks" + +# Read the API key from the environment and set it once. +# (This endpoint is public, so the key is not sent with this request.) +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_gtld_sample + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream a sample of cleaned newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/gtld/cleaned` + +```ruby +# Stream a sample of cleaned newly registered gTLD domains (CSV) +# +# Parameters for streamDomainerGtldCleanedSample (GET /v3.3/stream/domainer/sample/gtld/cleaned): +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "whoisfreaks" + +# Read the API key from the environment and set it once. +# (This endpoint is public, so the key is not sent with this request.) +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_gtld_cleaned_sample + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream a sample of newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/cctld` + +```ruby +# Stream a sample of newly registered ccTLD domains (CSV) +# +# Parameters for streamDomainerCctldSample (GET /v3.3/stream/domainer/sample/cctld): +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "whoisfreaks" + +# Read the API key from the environment and set it once. +# (This endpoint is public, so the key is not sent with this request.) +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_cctld_sample + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream a sample of cleaned newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/cctld/cleaned` + +```ruby +# Stream a sample of cleaned newly registered ccTLD domains (CSV) +# +# Parameters for streamDomainerCctldCleanedSample (GET /v3.3/stream/domainer/sample/cctld/cleaned): +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "whoisfreaks" + +# Read the API key from the environment and set it once. +# (This endpoint is public, so the key is not sent with this request.) +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_cctld_cleaned_sample + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream a sample of expiring domains (CSV) + +`GET /v3.3/stream/domainer/sample/expired` + +```ruby +# Stream a sample of expiring domains (CSV) +# +# Parameters for streamDomainerExpiredSample (GET /v3.3/stream/domainer/sample/expired): +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "whoisfreaks" + +# Read the API key from the environment and set it once. +# (This endpoint is public, so the key is not sent with this request.) +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_expired_sample + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream a sample of cleaned expiring domains (CSV) + +`GET /v3.3/stream/domainer/sample/expired/cleaned` + +```ruby +# Stream a sample of cleaned expiring domains (CSV) +# +# Parameters for streamDomainerExpiredCleanedSample (GET /v3.3/stream/domainer/sample/expired/cleaned): +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "whoisfreaks" + +# Read the API key from the environment and set it once. +# (This endpoint is public, so the key is not sent with this request.) +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_expired_cleaned_sample + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream a sample of dropped domains (CSV) + +`GET /v3.3/stream/domainer/sample/dropped` + +```ruby +# Stream a sample of dropped domains (CSV) +# +# Parameters for streamDomainerDroppedSample (GET /v3.3/stream/domainer/sample/dropped): +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "whoisfreaks" + +# Read the API key from the environment and set it once. +# (This endpoint is public, so the key is not sent with this request.) +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_dropped_sample + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` + +#### Stream a sample of dropped domains with backlinks (CSV) + +`GET /v3.3/stream/domainer/sample/dropped/backlinks` + +```ruby +# Stream a sample of dropped domains with backlinks (CSV) +# +# Parameters for streamDomainerDroppedBacklinksSample (GET /v3.3/stream/domainer/sample/dropped/backlinks): +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "whoisfreaks" + +# Read the API key from the environment and set it once. +# (This endpoint is public, so the key is not sent with this request.) +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_dropped_backlinks_sample + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end + +``` diff --git a/docs/languages/swift.md b/docs/languages/swift.md index 6e6dc4d..12ea170 100644 --- a/docs/languages/swift.md +++ b/docs/languages/swift.md @@ -117,7 +117,7 @@ do { ## Endpoints -All 60 endpoints are shown below, grouped by category. Each includes its method, path, parameters, and a runnable example. See the [full endpoint reference](../endpoints/README.md) for response shapes and field details. +All 94 endpoints are shown below, grouped by category. Each includes its method, path, parameters, and a runnable example. See the [full endpoint reference](../endpoints/README.md) for response shapes and field details. ### WHOIS @@ -364,6 +364,156 @@ do { ``` +#### Historical DNS Lookup (v2.2) + +`GET /v2.2/dns/historical` + +```swift +// Historical DNS Lookup (v2.2) +// +// Parameters for dnsHistoricalV22 (GET /v2.2/dns/historical): +// - domainName (string, required) +// - type (string, required) +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DNSAPI.dnsHistoricalV22(domainName: "whoisfreaks.com", type: "A,MX,TXT", page: 1) + print(String(decoding: try CodableHelper.jsonEncoder.encode(result), as: UTF8.self)) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Historical DNS Lookup (v2.3) + +`GET /v2.3/dns/historical` + +```swift +// Historical DNS Lookup (v2.3) +// +// Parameters for dnsHistoricalV23 (GET /v2.3/dns/historical): +// - domainName (string, required) +// - type (string, required) +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DNSAPI.dnsHistoricalV23(domainName: "whoisfreaks.com", type: "A,MX,TXT", page: 1) + print(String(decoding: try CodableHelper.jsonEncoder.encode(result), as: UTF8.self)) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Reverse DNS Lookup (v2.2) + +`GET /v2.2/dns/reverse` + +```swift +// Reverse DNS Lookup (v2.2) +// +// Parameters for dnsReverseV22 (GET /v2.2/dns/reverse): +// - value (string, required): IP, CIDR, or record value +// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required) +// - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match... +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DNSAPI.dnsReverseV22(value: "8.8.8.8", type: .a, page: 1) + print(String(decoding: try CodableHelper.jsonEncoder.encode(result), as: UTF8.self)) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Reverse DNS Lookup (v2.3) + +`GET /v2.3/dns/reverse` + +```swift +// Reverse DNS Lookup (v2.3) +// +// Parameters for dnsReverseV23 (GET /v2.3/dns/reverse): +// - value (string, required): IP, CIDR, or record value +// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required) +// - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match... +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DNSAPI.dnsReverseV23(value: "8.8.8.8", type: .a, page: 1) + print(String(decoding: try CodableHelper.jsonEncoder.encode(result), as: UTF8.self)) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + #### Bulk DNS Lookup `POST /v2.0/dns/bulk/live` @@ -721,6 +871,72 @@ do { ``` +#### IP Reputation Lookup (v2.0) + +`GET /v2.0/security` + +```swift +// IP Reputation Lookup (v2.0) +// +// Parameters for ipReputationV2 (GET /v2.0/security): +// - ip (string, required) +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await IPReputationAPI.ipReputationV2(ip: "8.8.8.8") + print(String(decoding: try CodableHelper.jsonEncoder.encode(result), as: UTF8.self)) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Bulk IP Reputation (v2.0) + +`POST /v2.0/security` + +```swift +// Bulk IP Reputation (v2.0) +// +// Parameters for bulkIpReputationV2 (POST /v2.0/security): +// - body: BulkGeolocationRequest (required): request body object +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +let request = BulkGeolocationRequest(ips: ["1.1.1.1", "2.2.2.2", "8.8.8.8"]) + +do { + let result = try await IPReputationAPI.bulkIpReputationV2(bulkGeolocationRequest: request) + print(String(decoding: try CodableHelper.jsonEncoder.encode(result), as: UTF8.self)) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + ### Domain Reputation #### Domain Reputation Lookup @@ -2255,3 +2471,979 @@ do { } ``` + +### Databases - Streaming + +#### Stream the daily phishing threat feed (CSV) + +`GET /v3.4/stream/threat-feed/phishing` + +```swift +// Stream the daily phishing threat feed (CSV) +// +// Parameters for streamThreatFeedPhishing (GET /v3.4/stream/threat-feed/phishing): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamThreatFeedPhishing(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream a sample of the phishing threat feed (CSV) + +`GET /v3.4/stream/threat-feed/phishing/sample` + +```swift +// Stream a sample of the phishing threat feed (CSV) +// +// Parameters for streamThreatFeedPhishingSample (GET /v3.4/stream/threat-feed/phishing/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] +// (This endpoint is public, so the key is not sent with this request.) + +do { + let result = try await DatabasesStreamingAPI.streamThreatFeedPhishingSample() + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream the daily malware threat feed (CSV) + +`GET /v3.4/stream/threat-feed/malware` + +```swift +// Stream the daily malware threat feed (CSV) +// +// Parameters for streamThreatFeedMalware (GET /v3.4/stream/threat-feed/malware): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamThreatFeedMalware(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream a sample of the malware threat feed (CSV) + +`GET /v3.4/stream/threat-feed/malware/sample` + +```swift +// Stream a sample of the malware threat feed (CSV) +// +// Parameters for streamThreatFeedMalwareSample (GET /v3.4/stream/threat-feed/malware/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] +// (This endpoint is public, so the key is not sent with this request.) + +do { + let result = try await DatabasesStreamingAPI.streamThreatFeedMalwareSample() + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream the daily spam threat feed (CSV) + +`GET /v3.4/stream/threat-feed/spam` + +```swift +// Stream the daily spam threat feed (CSV) +// +// Parameters for streamThreatFeedSpam (GET /v3.4/stream/threat-feed/spam): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamThreatFeedSpam(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream a sample of the spam threat feed (CSV) + +`GET /v3.4/stream/threat-feed/spam/sample` + +```swift +// Stream a sample of the spam threat feed (CSV) +// +// Parameters for streamThreatFeedSpamSample (GET /v3.4/stream/threat-feed/spam/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] +// (This endpoint is public, so the key is not sent with this request.) + +do { + let result = try await DatabasesStreamingAPI.streamThreatFeedSpamSample() + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/gtld` + +```swift +// Stream newly registered gTLD domains (CSV) +// +// Parameters for streamDomainerGtld (GET /v3.3/stream/domainer/gtld): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerGtld(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream cleaned newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned` + +```swift +// Stream cleaned newly registered gTLD domains (CSV) +// +// Parameters for streamDomainerGtldCleaned (GET /v3.3/stream/domainer/gtld/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerGtldCleaned(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream cleaned newly registered gTLD domains with an email (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned/email` + +```swift +// Stream cleaned newly registered gTLD domains with an email (CSV) +// +// Parameters for streamDomainerGtldCleanedEmail (GET /v3.3/stream/domainer/gtld/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerGtldCleanedEmail(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream cleaned newly registered gTLD domains with a phone (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned/phone` + +```swift +// Stream cleaned newly registered gTLD domains with a phone (CSV) +// +// Parameters for streamDomainerGtldCleanedPhone (GET /v3.3/stream/domainer/gtld/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerGtldCleanedPhone(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/cctld` + +```swift +// Stream newly registered ccTLD domains (CSV) +// +// Parameters for streamDomainerCctld (GET /v3.3/stream/domainer/cctld): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerCctld(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream cleaned newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned` + +```swift +// Stream cleaned newly registered ccTLD domains (CSV) +// +// Parameters for streamDomainerCctldCleaned (GET /v3.3/stream/domainer/cctld/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerCctldCleaned(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream cleaned newly registered ccTLD domains with an email (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned/email` + +```swift +// Stream cleaned newly registered ccTLD domains with an email (CSV) +// +// Parameters for streamDomainerCctldCleanedEmail (GET /v3.3/stream/domainer/cctld/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerCctldCleanedEmail(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream cleaned newly registered ccTLD domains with a phone (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned/phone` + +```swift +// Stream cleaned newly registered ccTLD domains with a phone (CSV) +// +// Parameters for streamDomainerCctldCleanedPhone (GET /v3.3/stream/domainer/cctld/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerCctldCleanedPhone(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream expiring domains (CSV) + +`GET /v3.3/stream/domainer/expired` + +```swift +// Stream expiring domains (CSV) +// +// Parameters for streamDomainerExpired (GET /v3.3/stream/domainer/expired): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerExpired(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream cleaned expiring domains (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned` + +```swift +// Stream cleaned expiring domains (CSV) +// +// Parameters for streamDomainerExpiredCleaned (GET /v3.3/stream/domainer/expired/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerExpiredCleaned(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream cleaned expiring domains with an email (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned/email` + +```swift +// Stream cleaned expiring domains with an email (CSV) +// +// Parameters for streamDomainerExpiredCleanedEmail (GET /v3.3/stream/domainer/expired/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerExpiredCleanedEmail(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream cleaned expiring domains with a phone (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned/phone` + +```swift +// Stream cleaned expiring domains with a phone (CSV) +// +// Parameters for streamDomainerExpiredCleanedPhone (GET /v3.3/stream/domainer/expired/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerExpiredCleanedPhone(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream dropped domains (CSV) + +`GET /v3.3/stream/domainer/dropped` + +```swift +// Stream dropped domains (CSV) +// +// Parameters for streamDomainerDropped (GET /v3.3/stream/domainer/dropped): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerDropped(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream dropped domains with backlinks (CSV) + +`GET /v3.3/stream/domainer/dropped/backlinks` + +```swift +// Stream dropped domains with backlinks (CSV) +// +// Parameters for streamDomainerDroppedBacklinks (GET /v3.3/stream/domainer/dropped/backlinks): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerDroppedBacklinks(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream a sample of newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/gtld` + +```swift +// Stream a sample of newly registered gTLD domains (CSV) +// +// Parameters for streamDomainerGtldSample (GET /v3.3/stream/domainer/sample/gtld): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] +// (This endpoint is public, so the key is not sent with this request.) + +do { + let result = try await DatabasesStreamingAPI.streamDomainerGtldSample() + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream a sample of cleaned newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/gtld/cleaned` + +```swift +// Stream a sample of cleaned newly registered gTLD domains (CSV) +// +// Parameters for streamDomainerGtldCleanedSample (GET /v3.3/stream/domainer/sample/gtld/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] +// (This endpoint is public, so the key is not sent with this request.) + +do { + let result = try await DatabasesStreamingAPI.streamDomainerGtldCleanedSample() + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream a sample of newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/cctld` + +```swift +// Stream a sample of newly registered ccTLD domains (CSV) +// +// Parameters for streamDomainerCctldSample (GET /v3.3/stream/domainer/sample/cctld): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] +// (This endpoint is public, so the key is not sent with this request.) + +do { + let result = try await DatabasesStreamingAPI.streamDomainerCctldSample() + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream a sample of cleaned newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/cctld/cleaned` + +```swift +// Stream a sample of cleaned newly registered ccTLD domains (CSV) +// +// Parameters for streamDomainerCctldCleanedSample (GET /v3.3/stream/domainer/sample/cctld/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] +// (This endpoint is public, so the key is not sent with this request.) + +do { + let result = try await DatabasesStreamingAPI.streamDomainerCctldCleanedSample() + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream a sample of expiring domains (CSV) + +`GET /v3.3/stream/domainer/sample/expired` + +```swift +// Stream a sample of expiring domains (CSV) +// +// Parameters for streamDomainerExpiredSample (GET /v3.3/stream/domainer/sample/expired): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] +// (This endpoint is public, so the key is not sent with this request.) + +do { + let result = try await DatabasesStreamingAPI.streamDomainerExpiredSample() + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream a sample of cleaned expiring domains (CSV) + +`GET /v3.3/stream/domainer/sample/expired/cleaned` + +```swift +// Stream a sample of cleaned expiring domains (CSV) +// +// Parameters for streamDomainerExpiredCleanedSample (GET /v3.3/stream/domainer/sample/expired/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] +// (This endpoint is public, so the key is not sent with this request.) + +do { + let result = try await DatabasesStreamingAPI.streamDomainerExpiredCleanedSample() + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream a sample of dropped domains (CSV) + +`GET /v3.3/stream/domainer/sample/dropped` + +```swift +// Stream a sample of dropped domains (CSV) +// +// Parameters for streamDomainerDroppedSample (GET /v3.3/stream/domainer/sample/dropped): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] +// (This endpoint is public, so the key is not sent with this request.) + +do { + let result = try await DatabasesStreamingAPI.streamDomainerDroppedSample() + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` + +#### Stream a sample of dropped domains with backlinks (CSV) + +`GET /v3.3/stream/domainer/sample/dropped/backlinks` + +```swift +// Stream a sample of dropped domains with backlinks (CSV) +// +// Parameters for streamDomainerDroppedBacklinksSample (GET /v3.3/stream/domainer/sample/dropped/backlinks): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] +// (This endpoint is public, so the key is not sent with this request.) + +do { + let result = try await DatabasesStreamingAPI.streamDomainerDroppedBacklinksSample() + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} + +``` diff --git a/docs/languages/typescript.md b/docs/languages/typescript.md index 4847c26..617cb66 100644 --- a/docs/languages/typescript.md +++ b/docs/languages/typescript.md @@ -113,7 +113,7 @@ main().catch(async (err: unknown) => { ## Endpoints -All 60 endpoints are shown below, grouped by category. Each includes its method, path, parameters, and a runnable example. See the [full endpoint reference](../endpoints/README.md) for response shapes and field details. +All 94 endpoints are shown below, grouped by category. Each includes its method, path, parameters, and a runnable example. See the [full endpoint reference](../endpoints/README.md) for response shapes and field details. ### WHOIS @@ -352,6 +352,152 @@ main().catch(async (err: unknown) => { }); ``` +#### Historical DNS Lookup (v2.2) + +`GET /v2.2/dns/historical` + +```typescript +// Historical DNS Lookup (v2.2): GET https://api.whoisfreaks.com/v2.2/dns/historical +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx DnsHistoricalV22.ts +import { Configuration, DNSApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DNSApi(config); + +// dnsHistoricalV22({ domainName, type, page?, sort?, sortBy?, format? }) +// domainName (string, required) +// type (string, required): default "all" +// page (number, optional): default 1 +// sort ("asc" | "desc", optional): Sort direction. Omit to leave the results unsorted +// sortBy ("firstSeen" | "lastSeen", optional): Field to sort on. Only applies when sort is given; default "lastSeen" +// format ("json" | "xml", optional): default "json" +async function main(): Promise { + const result = await api.dnsHistoricalV22({ domainName: "whoisfreaks.com", type: "A,MX,TXT", page: 1 }); + console.log(JSON.stringify(result, null, 2)); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Historical DNS Lookup (v2.3) + +`GET /v2.3/dns/historical` + +```typescript +// Historical DNS Lookup (v2.3): GET https://api.whoisfreaks.com/v2.3/dns/historical +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx DnsHistoricalV23.ts +import { Configuration, DNSApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DNSApi(config); + +// dnsHistoricalV23({ domainName, type, page?, sort?, sortBy?, format? }) +// domainName (string, required) +// type (string, required): default "all" +// page (number, optional): default 1 +// sort ("asc" | "desc", optional): Sort direction. Omit to leave the results unsorted +// sortBy ("firstSeen" | "lastSeen", optional): Field to sort on. Only applies when sort is given; default "lastSeen" +// format ("json" | "xml", optional): default "json" +async function main(): Promise { + const result = await api.dnsHistoricalV23({ domainName: "whoisfreaks.com", type: "A,MX,TXT", page: 1 }); + console.log(JSON.stringify(result, null, 2)); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Reverse DNS Lookup (v2.2) + +`GET /v2.2/dns/reverse` + +```typescript +// Reverse DNS Lookup (v2.2): GET https://api.whoisfreaks.com/v2.2/dns/reverse +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx DnsReverseV22.ts +import { Configuration, DNSApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DNSApi(config); + +// dnsReverseV22({ value, type, exact?, page?, sort?, sortBy?, format? }) +// value (string, required): IP, CIDR, or record value +// type ("a" | "mx" | "cname" | "ns" | "aaaa" | "txt" | "soa", required) +// exact (boolean, optional): When false the value is matched as a substring, which is far slower than an e...; default true +// page (number, optional): default 1 +// sort ("asc" | "desc", optional): Sort direction. Omit to leave the results unsorted +// sortBy ("firstSeen" | "lastSeen", optional): Field to sort on. Only applies when sort is given; default "lastSeen" +// format ("json" | "xml", optional): default "json" +async function main(): Promise { + const result = await api.dnsReverseV22({ value: "8.8.8.8", type: "a", page: 1 }); + console.log(JSON.stringify(result, null, 2)); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Reverse DNS Lookup (v2.3) + +`GET /v2.3/dns/reverse` + +```typescript +// Reverse DNS Lookup (v2.3): GET https://api.whoisfreaks.com/v2.3/dns/reverse +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx DnsReverseV23.ts +import { Configuration, DNSApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DNSApi(config); + +// dnsReverseV23({ value, type, exact?, page?, sort?, sortBy?, format? }) +// value (string, required): IP, CIDR, or record value +// type ("a" | "mx" | "cname" | "ns" | "aaaa" | "txt" | "soa", required) +// exact (boolean, optional): When false the value is matched as a substring, which is far slower than an e...; default true +// page (number, optional): default 1 +// sort ("asc" | "desc", optional): Sort direction. Omit to leave the results unsorted +// sortBy ("firstSeen" | "lastSeen", optional): Field to sort on. Only applies when sort is given; default "lastSeen" +// format ("json" | "xml", optional): default "json" +async function main(): Promise { + const result = await api.dnsReverseV23({ value: "8.8.8.8", type: "a", page: 1 }); + console.log(JSON.stringify(result, null, 2)); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + #### Bulk DNS Lookup `POST /v2.0/dns/bulk/live` @@ -695,6 +841,69 @@ main().catch(async (err: unknown) => { }); ``` +#### IP Reputation Lookup (v2.0) + +`GET /v2.0/security` + +```typescript +// IP Reputation Lookup (v2.0): GET https://api.whoisfreaks.com/v2.0/security +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx IpReputationV2.ts +import { Configuration, IPReputationApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new IPReputationApi(config); + +// ipReputationV2({ ip }) +// ip (string, required) +async function main(): Promise { + const result = await api.ipReputationV2({ ip: "8.8.8.8" }); + console.log(JSON.stringify(result, null, 2)); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Bulk IP Reputation (v2.0) + +`POST /v2.0/security` + +```typescript +// Bulk IP Reputation (v2.0): POST https://api.whoisfreaks.com/v2.0/security +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx BulkIpReputationV2.ts +import { Configuration, IPReputationApi, ResponseError, type BulkGeolocationRequest } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new IPReputationApi(config); + +// bulkIpReputationV2({ bulkGeolocationRequest }) +// bulkGeolocationRequest (BulkGeolocationRequest, required): request body +async function main(): Promise { + const body: BulkGeolocationRequest = { ips: ["1.1.1.1", "2.2.2.2", "8.8.8.8"] }; + const results = await api.bulkIpReputationV2({ bulkGeolocationRequest: body }); + console.log(JSON.stringify(results, null, 2)); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + ### Domain Reputation #### Domain Reputation Lookup @@ -2175,3 +2384,929 @@ main().catch(async (err: unknown) => { process.exitCode = 1; }); ``` + +### Databases - Streaming + +#### Stream the daily phishing threat feed (CSV) + +`GET /v3.4/stream/threat-feed/phishing` + +```typescript +// Stream the daily phishing threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/phishing +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamThreatFeedPhishing.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamThreatFeedPhishing({ date, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamThreatFeedPhishing({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream a sample of the phishing threat feed (CSV) + +`GET /v3.4/stream/threat-feed/phishing/sample` + +```typescript +// Stream a sample of the phishing threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/phishing/sample +// Run (public endpoint, no API key needed): npx tsx StreamThreatFeedPhishingSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamThreatFeedPhishingSample({ offset?, limit? }) +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamThreatFeedPhishingSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream the daily malware threat feed (CSV) + +`GET /v3.4/stream/threat-feed/malware` + +```typescript +// Stream the daily malware threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/malware +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamThreatFeedMalware.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamThreatFeedMalware({ date, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamThreatFeedMalware({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream a sample of the malware threat feed (CSV) + +`GET /v3.4/stream/threat-feed/malware/sample` + +```typescript +// Stream a sample of the malware threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/malware/sample +// Run (public endpoint, no API key needed): npx tsx StreamThreatFeedMalwareSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamThreatFeedMalwareSample({ offset?, limit? }) +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamThreatFeedMalwareSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream the daily spam threat feed (CSV) + +`GET /v3.4/stream/threat-feed/spam` + +```typescript +// Stream the daily spam threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/spam +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamThreatFeedSpam.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamThreatFeedSpam({ date, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamThreatFeedSpam({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream a sample of the spam threat feed (CSV) + +`GET /v3.4/stream/threat-feed/spam/sample` + +```typescript +// Stream a sample of the spam threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/spam/sample +// Run (public endpoint, no API key needed): npx tsx StreamThreatFeedSpamSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamThreatFeedSpamSample({ offset?, limit? }) +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamThreatFeedSpamSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/gtld` + +```typescript +// Stream newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerGtld.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerGtld({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerGtld({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream cleaned newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned` + +```typescript +// Stream cleaned newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerGtldCleaned.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerGtldCleaned({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerGtldCleaned({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream cleaned newly registered gTLD domains with an email (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned/email` + +```typescript +// Stream cleaned newly registered gTLD domains with an email (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned/email +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerGtldCleanedEmail.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerGtldCleanedEmail({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerGtldCleanedEmail({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream cleaned newly registered gTLD domains with a phone (CSV) + +`GET /v3.3/stream/domainer/gtld/cleaned/phone` + +```typescript +// Stream cleaned newly registered gTLD domains with a phone (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned/phone +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerGtldCleanedPhone.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerGtldCleanedPhone({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerGtldCleanedPhone({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/cctld` + +```typescript +// Stream newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerCctld.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerCctld({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerCctld({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream cleaned newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned` + +```typescript +// Stream cleaned newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerCctldCleaned.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerCctldCleaned({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerCctldCleaned({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream cleaned newly registered ccTLD domains with an email (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned/email` + +```typescript +// Stream cleaned newly registered ccTLD domains with an email (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned/email +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerCctldCleanedEmail.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerCctldCleanedEmail({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerCctldCleanedEmail({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream cleaned newly registered ccTLD domains with a phone (CSV) + +`GET /v3.3/stream/domainer/cctld/cleaned/phone` + +```typescript +// Stream cleaned newly registered ccTLD domains with a phone (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned/phone +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerCctldCleanedPhone.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerCctldCleanedPhone({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerCctldCleanedPhone({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream expiring domains (CSV) + +`GET /v3.3/stream/domainer/expired` + +```typescript +// Stream expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerExpired.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerExpired({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerExpired({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream cleaned expiring domains (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned` + +```typescript +// Stream cleaned expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerExpiredCleaned.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerExpiredCleaned({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerExpiredCleaned({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream cleaned expiring domains with an email (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned/email` + +```typescript +// Stream cleaned expiring domains with an email (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned/email +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerExpiredCleanedEmail.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerExpiredCleanedEmail({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerExpiredCleanedEmail({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream cleaned expiring domains with a phone (CSV) + +`GET /v3.3/stream/domainer/expired/cleaned/phone` + +```typescript +// Stream cleaned expiring domains with a phone (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned/phone +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerExpiredCleanedPhone.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerExpiredCleanedPhone({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerExpiredCleanedPhone({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream dropped domains (CSV) + +`GET /v3.3/stream/domainer/dropped` + +```typescript +// Stream dropped domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/dropped +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerDropped.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerDropped({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerDropped({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream dropped domains with backlinks (CSV) + +`GET /v3.3/stream/domainer/dropped/backlinks` + +```typescript +// Stream dropped domains with backlinks (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/dropped/backlinks +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerDroppedBacklinks.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerDroppedBacklinks({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerDroppedBacklinks({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream a sample of newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/gtld` + +```typescript +// Stream a sample of newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/gtld +// Run (public endpoint, no API key needed): npx tsx StreamDomainerGtldSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerGtldSample({ whois?, offset?, limit? }) +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerGtldSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream a sample of cleaned newly registered gTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/gtld/cleaned` + +```typescript +// Stream a sample of cleaned newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/gtld/cleaned +// Run (public endpoint, no API key needed): npx tsx StreamDomainerGtldCleanedSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerGtldCleanedSample({ whois?, offset?, limit? }) +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerGtldCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream a sample of newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/cctld` + +```typescript +// Stream a sample of newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/cctld +// Run (public endpoint, no API key needed): npx tsx StreamDomainerCctldSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerCctldSample({ whois?, offset?, limit? }) +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerCctldSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream a sample of cleaned newly registered ccTLD domains (CSV) + +`GET /v3.3/stream/domainer/sample/cctld/cleaned` + +```typescript +// Stream a sample of cleaned newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/cctld/cleaned +// Run (public endpoint, no API key needed): npx tsx StreamDomainerCctldCleanedSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerCctldCleanedSample({ whois?, offset?, limit? }) +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerCctldCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream a sample of expiring domains (CSV) + +`GET /v3.3/stream/domainer/sample/expired` + +```typescript +// Stream a sample of expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/expired +// Run (public endpoint, no API key needed): npx tsx StreamDomainerExpiredSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerExpiredSample({ whois?, offset?, limit? }) +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerExpiredSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream a sample of cleaned expiring domains (CSV) + +`GET /v3.3/stream/domainer/sample/expired/cleaned` + +```typescript +// Stream a sample of cleaned expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/expired/cleaned +// Run (public endpoint, no API key needed): npx tsx StreamDomainerExpiredCleanedSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerExpiredCleanedSample({ whois?, offset?, limit? }) +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerExpiredCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream a sample of dropped domains (CSV) + +`GET /v3.3/stream/domainer/sample/dropped` + +```typescript +// Stream a sample of dropped domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/dropped +// Run (public endpoint, no API key needed): npx tsx StreamDomainerDroppedSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerDroppedSample({ whois?, offset?, limit? }) +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerDroppedSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` + +#### Stream a sample of dropped domains with backlinks (CSV) + +`GET /v3.3/stream/domainer/sample/dropped/backlinks` + +```typescript +// Stream a sample of dropped domains with backlinks (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/dropped/backlinks +// Run (public endpoint, no API key needed): npx tsx StreamDomainerDroppedBacklinksSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerDroppedBacklinksSample({ whois?, offset?, limit? }) +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerDroppedBacklinksSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); +``` diff --git a/examples/README.md b/examples/README.md index 0789df5..fe6534b 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,6 +1,6 @@ # Runnable Examples -Copy-paste, ready-to-run examples for **every one of the 60 endpoints** in **all 10 languages** (600 files). +Copy-paste, ready-to-run examples for **every one of the 94 endpoints** in **all 10 languages** (940 files). Set the `WHOISFREAKS_API_KEY` environment variable to your key (from ) and run. Layout: `examples//.`. @@ -13,6 +13,10 @@ Set the `WHOISFREAKS_API_KEY` environment variable to your key (from { "1.1.1.1", "2.2.2.2", "8.8.8.8" }); +List result = api.BulkIpReputationV2(body); +foreach (var item in result) +{ + Console.WriteLine(item.ToJson()); +} diff --git a/examples/csharp/DnsHistoricalV22.cs b/examples/csharp/DnsHistoricalV22.cs new file mode 100644 index 0000000..a37e5f4 --- /dev/null +++ b/examples/csharp/DnsHistoricalV22.cs @@ -0,0 +1,22 @@ +// Runnable example: Historical DNS Lookup (v2.2) (GET /v2.2/dns/historical) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for dnsHistoricalV22 (GET /v2.2/dns/historical): +// - domainName (string, required) +// - type (string, required) +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; +using WhoisFreaks.Model; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DNSApi(config); + +HistoricalDnsResponseV2_2 result = api.DnsHistoricalV22("whoisfreaks.com", "A,MX,TXT", page: 1); +Console.WriteLine(result.ToJson()); diff --git a/examples/csharp/DnsHistoricalV23.cs b/examples/csharp/DnsHistoricalV23.cs new file mode 100644 index 0000000..3ed2c0d --- /dev/null +++ b/examples/csharp/DnsHistoricalV23.cs @@ -0,0 +1,22 @@ +// Runnable example: Historical DNS Lookup (v2.3) (GET /v2.3/dns/historical) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for dnsHistoricalV23 (GET /v2.3/dns/historical): +// - domainName (string, required) +// - type (string, required) +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; +using WhoisFreaks.Model; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DNSApi(config); + +HistoricalDnsResponseV2_2 result = api.DnsHistoricalV23("whoisfreaks.com", "A,MX,TXT", page: 1); +Console.WriteLine(result.ToJson()); diff --git a/examples/csharp/DnsReverseV22.cs b/examples/csharp/DnsReverseV22.cs new file mode 100644 index 0000000..09a5f39 --- /dev/null +++ b/examples/csharp/DnsReverseV22.cs @@ -0,0 +1,23 @@ +// Runnable example: Reverse DNS Lookup (v2.2) (GET /v2.2/dns/reverse) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for dnsReverseV22 (GET /v2.2/dns/reverse): +// - value (string, required): IP, CIDR, or record value +// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required) +// - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match... +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; +using WhoisFreaks.Model; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DNSApi(config); + +ReverseDnsResponseV2_2 result = api.DnsReverseV22("8.8.8.8", "a", page: 1); +Console.WriteLine(result.ToJson()); diff --git a/examples/csharp/DnsReverseV23.cs b/examples/csharp/DnsReverseV23.cs new file mode 100644 index 0000000..3520039 --- /dev/null +++ b/examples/csharp/DnsReverseV23.cs @@ -0,0 +1,23 @@ +// Runnable example: Reverse DNS Lookup (v2.3) (GET /v2.3/dns/reverse) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for dnsReverseV23 (GET /v2.3/dns/reverse): +// - value (string, required): IP, CIDR, or record value +// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required) +// - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match... +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; +using WhoisFreaks.Model; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DNSApi(config); + +ReverseDnsResponseV2_3 result = api.DnsReverseV23("8.8.8.8", "a", page: 1); +Console.WriteLine(result.ToJson()); diff --git a/examples/csharp/IpReputationV2.cs b/examples/csharp/IpReputationV2.cs new file mode 100644 index 0000000..fa4cf11 --- /dev/null +++ b/examples/csharp/IpReputationV2.cs @@ -0,0 +1,17 @@ +// Runnable example: IP Reputation Lookup (v2.0) (GET /v2.0/security) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for ipReputationV2 (GET /v2.0/security): +// - ip (string, required) +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; +using WhoisFreaks.Model; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new IPReputationApi(config); + +IpReputationResponse result = api.IpReputationV2("8.8.8.8"); +Console.WriteLine(result.ToJson()); diff --git a/examples/csharp/README.md b/examples/csharp/README.md index e7fd537..45363c2 100644 --- a/examples/csharp/README.md +++ b/examples/csharp/README.md @@ -12,6 +12,10 @@ Install: see the [C# / .NET guide](../../docs/languages/csharp.md). Set the `WHO - [`DnsLive.cs`](DnsLive.cs): Live DNS Lookup (`GET /v2.0/dns/live`) - [`DnsHistorical.cs`](DnsHistorical.cs): Historical DNS Lookup (`GET /v2.0/dns/historical`) - [`DnsReverse.cs`](DnsReverse.cs): Reverse DNS Lookup (`GET /v2.1/dns/reverse`) +- [`DnsHistoricalV22.cs`](DnsHistoricalV22.cs): Historical DNS Lookup (v2.2) (`GET /v2.2/dns/historical`) +- [`DnsHistoricalV23.cs`](DnsHistoricalV23.cs): Historical DNS Lookup (v2.3) (`GET /v2.3/dns/historical`) +- [`DnsReverseV22.cs`](DnsReverseV22.cs): Reverse DNS Lookup (v2.2) (`GET /v2.2/dns/reverse`) +- [`DnsReverseV23.cs`](DnsReverseV23.cs): Reverse DNS Lookup (v2.3) (`GET /v2.3/dns/reverse`) - [`DnsBulk.cs`](DnsBulk.cs): Bulk DNS Lookup (`POST /v2.0/dns/bulk/live`) ## Domain Availability @@ -34,6 +38,8 @@ Install: see the [C# / .NET guide](../../docs/languages/csharp.md). Set the `WHO ## IP Reputation - [`IpReputation.cs`](IpReputation.cs): IP Reputation Lookup (`GET /v1.0/security`) - [`BulkIpReputation.cs`](BulkIpReputation.cs): Bulk IP Reputation (`POST /v1.0/security`) +- [`IpReputationV2.cs`](IpReputationV2.cs): IP Reputation Lookup (v2.0) (`GET /v2.0/security`) +- [`BulkIpReputationV2.cs`](BulkIpReputationV2.cs): Bulk IP Reputation (v2.0) (`POST /v2.0/security`) ## Domain Reputation - [`DomainReputation.cs`](DomainReputation.cs): Domain Reputation Lookup (`GET /v1/domain/security`) @@ -105,3 +111,33 @@ Install: see the [C# / .NET guide](../../docs/languages/csharp.md). Set the `WHO - [`DownloadThreatFeedMalwareSample.cs`](DownloadThreatFeedMalwareSample.cs): Download a sample of the malware threat feed (CSV) (`GET /v3.4/download/threat-feed/malware/sample`) - [`DownloadThreatFeedSpam.cs`](DownloadThreatFeedSpam.cs): Download the daily spam threat feed (CSV) (`GET /v3.4/download/threat-feed/spam`) - [`DownloadThreatFeedSpamSample.cs`](DownloadThreatFeedSpamSample.cs): Download a sample of the spam threat feed (CSV) (`GET /v3.4/download/threat-feed/spam/sample`) + +## Databases - Streaming +- [`StreamThreatFeedPhishing.cs`](StreamThreatFeedPhishing.cs): Stream the daily phishing threat feed (CSV) (`GET /v3.4/stream/threat-feed/phishing`) +- [`StreamThreatFeedPhishingSample.cs`](StreamThreatFeedPhishingSample.cs): Stream a sample of the phishing threat feed (CSV) (`GET /v3.4/stream/threat-feed/phishing/sample`) +- [`StreamThreatFeedMalware.cs`](StreamThreatFeedMalware.cs): Stream the daily malware threat feed (CSV) (`GET /v3.4/stream/threat-feed/malware`) +- [`StreamThreatFeedMalwareSample.cs`](StreamThreatFeedMalwareSample.cs): Stream a sample of the malware threat feed (CSV) (`GET /v3.4/stream/threat-feed/malware/sample`) +- [`StreamThreatFeedSpam.cs`](StreamThreatFeedSpam.cs): Stream the daily spam threat feed (CSV) (`GET /v3.4/stream/threat-feed/spam`) +- [`StreamThreatFeedSpamSample.cs`](StreamThreatFeedSpamSample.cs): Stream a sample of the spam threat feed (CSV) (`GET /v3.4/stream/threat-feed/spam/sample`) +- [`StreamDomainerGtld.cs`](StreamDomainerGtld.cs): Stream newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/gtld`) +- [`StreamDomainerGtldCleaned.cs`](StreamDomainerGtldCleaned.cs): Stream cleaned newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned`) +- [`StreamDomainerGtldCleanedEmail.cs`](StreamDomainerGtldCleanedEmail.cs): Stream cleaned newly registered gTLD domains with an email (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned/email`) +- [`StreamDomainerGtldCleanedPhone.cs`](StreamDomainerGtldCleanedPhone.cs): Stream cleaned newly registered gTLD domains with a phone (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned/phone`) +- [`StreamDomainerCctld.cs`](StreamDomainerCctld.cs): Stream newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/cctld`) +- [`StreamDomainerCctldCleaned.cs`](StreamDomainerCctldCleaned.cs): Stream cleaned newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned`) +- [`StreamDomainerCctldCleanedEmail.cs`](StreamDomainerCctldCleanedEmail.cs): Stream cleaned newly registered ccTLD domains with an email (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned/email`) +- [`StreamDomainerCctldCleanedPhone.cs`](StreamDomainerCctldCleanedPhone.cs): Stream cleaned newly registered ccTLD domains with a phone (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned/phone`) +- [`StreamDomainerExpired.cs`](StreamDomainerExpired.cs): Stream expiring domains (CSV) (`GET /v3.3/stream/domainer/expired`) +- [`StreamDomainerExpiredCleaned.cs`](StreamDomainerExpiredCleaned.cs): Stream cleaned expiring domains (CSV) (`GET /v3.3/stream/domainer/expired/cleaned`) +- [`StreamDomainerExpiredCleanedEmail.cs`](StreamDomainerExpiredCleanedEmail.cs): Stream cleaned expiring domains with an email (CSV) (`GET /v3.3/stream/domainer/expired/cleaned/email`) +- [`StreamDomainerExpiredCleanedPhone.cs`](StreamDomainerExpiredCleanedPhone.cs): Stream cleaned expiring domains with a phone (CSV) (`GET /v3.3/stream/domainer/expired/cleaned/phone`) +- [`StreamDomainerDropped.cs`](StreamDomainerDropped.cs): Stream dropped domains (CSV) (`GET /v3.3/stream/domainer/dropped`) +- [`StreamDomainerDroppedBacklinks.cs`](StreamDomainerDroppedBacklinks.cs): Stream dropped domains with backlinks (CSV) (`GET /v3.3/stream/domainer/dropped/backlinks`) +- [`StreamDomainerGtldSample.cs`](StreamDomainerGtldSample.cs): Stream a sample of newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/gtld`) +- [`StreamDomainerGtldCleanedSample.cs`](StreamDomainerGtldCleanedSample.cs): Stream a sample of cleaned newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/gtld/cleaned`) +- [`StreamDomainerCctldSample.cs`](StreamDomainerCctldSample.cs): Stream a sample of newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/cctld`) +- [`StreamDomainerCctldCleanedSample.cs`](StreamDomainerCctldCleanedSample.cs): Stream a sample of cleaned newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/cctld/cleaned`) +- [`StreamDomainerExpiredSample.cs`](StreamDomainerExpiredSample.cs): Stream a sample of expiring domains (CSV) (`GET /v3.3/stream/domainer/sample/expired`) +- [`StreamDomainerExpiredCleanedSample.cs`](StreamDomainerExpiredCleanedSample.cs): Stream a sample of cleaned expiring domains (CSV) (`GET /v3.3/stream/domainer/sample/expired/cleaned`) +- [`StreamDomainerDroppedSample.cs`](StreamDomainerDroppedSample.cs): Stream a sample of dropped domains (CSV) (`GET /v3.3/stream/domainer/sample/dropped`) +- [`StreamDomainerDroppedBacklinksSample.cs`](StreamDomainerDroppedBacklinksSample.cs): Stream a sample of dropped domains with backlinks (CSV) (`GET /v3.3/stream/domainer/sample/dropped/backlinks`) diff --git a/examples/csharp/StreamDomainerCctld.cs b/examples/csharp/StreamDomainerCctld.cs new file mode 100644 index 0000000..50b5193 --- /dev/null +++ b/examples/csharp/StreamDomainerCctld.cs @@ -0,0 +1,19 @@ +// Runnable example: Stream newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/cctld) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerCctld (GET /v3.3/stream/domainer/cctld): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerCctld(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); diff --git a/examples/csharp/StreamDomainerCctldCleaned.cs b/examples/csharp/StreamDomainerCctldCleaned.cs new file mode 100644 index 0000000..8659eff --- /dev/null +++ b/examples/csharp/StreamDomainerCctldCleaned.cs @@ -0,0 +1,19 @@ +// Runnable example: Stream cleaned newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/cctld/cleaned) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerCctldCleaned (GET /v3.3/stream/domainer/cctld/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerCctldCleaned(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); diff --git a/examples/csharp/StreamDomainerCctldCleanedEmail.cs b/examples/csharp/StreamDomainerCctldCleanedEmail.cs new file mode 100644 index 0000000..13ededb --- /dev/null +++ b/examples/csharp/StreamDomainerCctldCleanedEmail.cs @@ -0,0 +1,19 @@ +// Runnable example: Stream cleaned newly registered ccTLD domains with an email (CSV) (GET /v3.3/stream/domainer/cctld/cleaned/email) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerCctldCleanedEmail (GET /v3.3/stream/domainer/cctld/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerCctldCleanedEmail(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); diff --git a/examples/csharp/StreamDomainerCctldCleanedPhone.cs b/examples/csharp/StreamDomainerCctldCleanedPhone.cs new file mode 100644 index 0000000..7ced440 --- /dev/null +++ b/examples/csharp/StreamDomainerCctldCleanedPhone.cs @@ -0,0 +1,19 @@ +// Runnable example: Stream cleaned newly registered ccTLD domains with a phone (CSV) (GET /v3.3/stream/domainer/cctld/cleaned/phone) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerCctldCleanedPhone (GET /v3.3/stream/domainer/cctld/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerCctldCleanedPhone(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); diff --git a/examples/csharp/StreamDomainerCctldCleanedSample.cs b/examples/csharp/StreamDomainerCctldCleanedSample.cs new file mode 100644 index 0000000..8091124 --- /dev/null +++ b/examples/csharp/StreamDomainerCctldCleanedSample.cs @@ -0,0 +1,16 @@ +// Runnable example: Stream a sample of cleaned newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/sample/cctld/cleaned) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerCctldCleanedSample (GET /v3.3/stream/domainer/sample/cctld/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +// Public endpoint: no API key needed. +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerCctldCleanedSample(); +Console.WriteLine(result); diff --git a/examples/csharp/StreamDomainerCctldSample.cs b/examples/csharp/StreamDomainerCctldSample.cs new file mode 100644 index 0000000..c36b341 --- /dev/null +++ b/examples/csharp/StreamDomainerCctldSample.cs @@ -0,0 +1,16 @@ +// Runnable example: Stream a sample of newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/sample/cctld) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerCctldSample (GET /v3.3/stream/domainer/sample/cctld): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +// Public endpoint: no API key needed. +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerCctldSample(); +Console.WriteLine(result); diff --git a/examples/csharp/StreamDomainerDropped.cs b/examples/csharp/StreamDomainerDropped.cs new file mode 100644 index 0000000..32d4422 --- /dev/null +++ b/examples/csharp/StreamDomainerDropped.cs @@ -0,0 +1,19 @@ +// Runnable example: Stream dropped domains (CSV) (GET /v3.3/stream/domainer/dropped) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerDropped (GET /v3.3/stream/domainer/dropped): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerDropped(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); diff --git a/examples/csharp/StreamDomainerDroppedBacklinks.cs b/examples/csharp/StreamDomainerDroppedBacklinks.cs new file mode 100644 index 0000000..ff9c4f8 --- /dev/null +++ b/examples/csharp/StreamDomainerDroppedBacklinks.cs @@ -0,0 +1,19 @@ +// Runnable example: Stream dropped domains with backlinks (CSV) (GET /v3.3/stream/domainer/dropped/backlinks) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerDroppedBacklinks (GET /v3.3/stream/domainer/dropped/backlinks): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerDroppedBacklinks(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); diff --git a/examples/csharp/StreamDomainerDroppedBacklinksSample.cs b/examples/csharp/StreamDomainerDroppedBacklinksSample.cs new file mode 100644 index 0000000..0d47715 --- /dev/null +++ b/examples/csharp/StreamDomainerDroppedBacklinksSample.cs @@ -0,0 +1,16 @@ +// Runnable example: Stream a sample of dropped domains with backlinks (CSV) (GET /v3.3/stream/domainer/sample/dropped/backlinks) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerDroppedBacklinksSample (GET /v3.3/stream/domainer/sample/dropped/backlinks): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +// Public endpoint: no API key needed. +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerDroppedBacklinksSample(); +Console.WriteLine(result); diff --git a/examples/csharp/StreamDomainerDroppedSample.cs b/examples/csharp/StreamDomainerDroppedSample.cs new file mode 100644 index 0000000..a245a25 --- /dev/null +++ b/examples/csharp/StreamDomainerDroppedSample.cs @@ -0,0 +1,16 @@ +// Runnable example: Stream a sample of dropped domains (CSV) (GET /v3.3/stream/domainer/sample/dropped) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerDroppedSample (GET /v3.3/stream/domainer/sample/dropped): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +// Public endpoint: no API key needed. +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerDroppedSample(); +Console.WriteLine(result); diff --git a/examples/csharp/StreamDomainerExpired.cs b/examples/csharp/StreamDomainerExpired.cs new file mode 100644 index 0000000..eb2b7c9 --- /dev/null +++ b/examples/csharp/StreamDomainerExpired.cs @@ -0,0 +1,19 @@ +// Runnable example: Stream expiring domains (CSV) (GET /v3.3/stream/domainer/expired) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerExpired (GET /v3.3/stream/domainer/expired): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerExpired(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); diff --git a/examples/csharp/StreamDomainerExpiredCleaned.cs b/examples/csharp/StreamDomainerExpiredCleaned.cs new file mode 100644 index 0000000..bc1401a --- /dev/null +++ b/examples/csharp/StreamDomainerExpiredCleaned.cs @@ -0,0 +1,19 @@ +// Runnable example: Stream cleaned expiring domains (CSV) (GET /v3.3/stream/domainer/expired/cleaned) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerExpiredCleaned (GET /v3.3/stream/domainer/expired/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerExpiredCleaned(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); diff --git a/examples/csharp/StreamDomainerExpiredCleanedEmail.cs b/examples/csharp/StreamDomainerExpiredCleanedEmail.cs new file mode 100644 index 0000000..0284fe7 --- /dev/null +++ b/examples/csharp/StreamDomainerExpiredCleanedEmail.cs @@ -0,0 +1,19 @@ +// Runnable example: Stream cleaned expiring domains with an email (CSV) (GET /v3.3/stream/domainer/expired/cleaned/email) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerExpiredCleanedEmail (GET /v3.3/stream/domainer/expired/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerExpiredCleanedEmail(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); diff --git a/examples/csharp/StreamDomainerExpiredCleanedPhone.cs b/examples/csharp/StreamDomainerExpiredCleanedPhone.cs new file mode 100644 index 0000000..79539c7 --- /dev/null +++ b/examples/csharp/StreamDomainerExpiredCleanedPhone.cs @@ -0,0 +1,19 @@ +// Runnable example: Stream cleaned expiring domains with a phone (CSV) (GET /v3.3/stream/domainer/expired/cleaned/phone) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerExpiredCleanedPhone (GET /v3.3/stream/domainer/expired/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerExpiredCleanedPhone(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); diff --git a/examples/csharp/StreamDomainerExpiredCleanedSample.cs b/examples/csharp/StreamDomainerExpiredCleanedSample.cs new file mode 100644 index 0000000..c11d6a3 --- /dev/null +++ b/examples/csharp/StreamDomainerExpiredCleanedSample.cs @@ -0,0 +1,16 @@ +// Runnable example: Stream a sample of cleaned expiring domains (CSV) (GET /v3.3/stream/domainer/sample/expired/cleaned) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerExpiredCleanedSample (GET /v3.3/stream/domainer/sample/expired/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +// Public endpoint: no API key needed. +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerExpiredCleanedSample(); +Console.WriteLine(result); diff --git a/examples/csharp/StreamDomainerExpiredSample.cs b/examples/csharp/StreamDomainerExpiredSample.cs new file mode 100644 index 0000000..659c724 --- /dev/null +++ b/examples/csharp/StreamDomainerExpiredSample.cs @@ -0,0 +1,16 @@ +// Runnable example: Stream a sample of expiring domains (CSV) (GET /v3.3/stream/domainer/sample/expired) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerExpiredSample (GET /v3.3/stream/domainer/sample/expired): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +// Public endpoint: no API key needed. +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerExpiredSample(); +Console.WriteLine(result); diff --git a/examples/csharp/StreamDomainerGtld.cs b/examples/csharp/StreamDomainerGtld.cs new file mode 100644 index 0000000..7c3b3ab --- /dev/null +++ b/examples/csharp/StreamDomainerGtld.cs @@ -0,0 +1,19 @@ +// Runnable example: Stream newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/gtld) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerGtld (GET /v3.3/stream/domainer/gtld): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerGtld(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); diff --git a/examples/csharp/StreamDomainerGtldCleaned.cs b/examples/csharp/StreamDomainerGtldCleaned.cs new file mode 100644 index 0000000..7ddbb81 --- /dev/null +++ b/examples/csharp/StreamDomainerGtldCleaned.cs @@ -0,0 +1,19 @@ +// Runnable example: Stream cleaned newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/gtld/cleaned) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerGtldCleaned (GET /v3.3/stream/domainer/gtld/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerGtldCleaned(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); diff --git a/examples/csharp/StreamDomainerGtldCleanedEmail.cs b/examples/csharp/StreamDomainerGtldCleanedEmail.cs new file mode 100644 index 0000000..68d781f --- /dev/null +++ b/examples/csharp/StreamDomainerGtldCleanedEmail.cs @@ -0,0 +1,19 @@ +// Runnable example: Stream cleaned newly registered gTLD domains with an email (CSV) (GET /v3.3/stream/domainer/gtld/cleaned/email) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerGtldCleanedEmail (GET /v3.3/stream/domainer/gtld/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerGtldCleanedEmail(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); diff --git a/examples/csharp/StreamDomainerGtldCleanedPhone.cs b/examples/csharp/StreamDomainerGtldCleanedPhone.cs new file mode 100644 index 0000000..dd928eb --- /dev/null +++ b/examples/csharp/StreamDomainerGtldCleanedPhone.cs @@ -0,0 +1,19 @@ +// Runnable example: Stream cleaned newly registered gTLD domains with a phone (CSV) (GET /v3.3/stream/domainer/gtld/cleaned/phone) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerGtldCleanedPhone (GET /v3.3/stream/domainer/gtld/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerGtldCleanedPhone(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); diff --git a/examples/csharp/StreamDomainerGtldCleanedSample.cs b/examples/csharp/StreamDomainerGtldCleanedSample.cs new file mode 100644 index 0000000..5089e6c --- /dev/null +++ b/examples/csharp/StreamDomainerGtldCleanedSample.cs @@ -0,0 +1,16 @@ +// Runnable example: Stream a sample of cleaned newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/sample/gtld/cleaned) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerGtldCleanedSample (GET /v3.3/stream/domainer/sample/gtld/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +// Public endpoint: no API key needed. +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerGtldCleanedSample(); +Console.WriteLine(result); diff --git a/examples/csharp/StreamDomainerGtldSample.cs b/examples/csharp/StreamDomainerGtldSample.cs new file mode 100644 index 0000000..d02cd44 --- /dev/null +++ b/examples/csharp/StreamDomainerGtldSample.cs @@ -0,0 +1,16 @@ +// Runnable example: Stream a sample of newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/sample/gtld) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamDomainerGtldSample (GET /v3.3/stream/domainer/sample/gtld): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +// Public endpoint: no API key needed. +var api = new DatabasesStreamingApi(config); + +string result = api.StreamDomainerGtldSample(); +Console.WriteLine(result); diff --git a/examples/csharp/StreamThreatFeedMalware.cs b/examples/csharp/StreamThreatFeedMalware.cs new file mode 100644 index 0000000..d84c77e --- /dev/null +++ b/examples/csharp/StreamThreatFeedMalware.cs @@ -0,0 +1,18 @@ +// Runnable example: Stream the daily malware threat feed (CSV) (GET /v3.4/stream/threat-feed/malware) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamThreatFeedMalware (GET /v3.4/stream/threat-feed/malware): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamThreatFeedMalware(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); diff --git a/examples/csharp/StreamThreatFeedMalwareSample.cs b/examples/csharp/StreamThreatFeedMalwareSample.cs new file mode 100644 index 0000000..673fab9 --- /dev/null +++ b/examples/csharp/StreamThreatFeedMalwareSample.cs @@ -0,0 +1,15 @@ +// Runnable example: Stream a sample of the malware threat feed (CSV) (GET /v3.4/stream/threat-feed/malware/sample) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamThreatFeedMalwareSample (GET /v3.4/stream/threat-feed/malware/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +// Public endpoint: no API key needed. +var api = new DatabasesStreamingApi(config); + +string result = api.StreamThreatFeedMalwareSample(); +Console.WriteLine(result); diff --git a/examples/csharp/StreamThreatFeedPhishing.cs b/examples/csharp/StreamThreatFeedPhishing.cs new file mode 100644 index 0000000..add40f2 --- /dev/null +++ b/examples/csharp/StreamThreatFeedPhishing.cs @@ -0,0 +1,18 @@ +// Runnable example: Stream the daily phishing threat feed (CSV) (GET /v3.4/stream/threat-feed/phishing) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamThreatFeedPhishing (GET /v3.4/stream/threat-feed/phishing): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamThreatFeedPhishing(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); diff --git a/examples/csharp/StreamThreatFeedPhishingSample.cs b/examples/csharp/StreamThreatFeedPhishingSample.cs new file mode 100644 index 0000000..45d73ad --- /dev/null +++ b/examples/csharp/StreamThreatFeedPhishingSample.cs @@ -0,0 +1,15 @@ +// Runnable example: Stream a sample of the phishing threat feed (CSV) (GET /v3.4/stream/threat-feed/phishing/sample) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamThreatFeedPhishingSample (GET /v3.4/stream/threat-feed/phishing/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +// Public endpoint: no API key needed. +var api = new DatabasesStreamingApi(config); + +string result = api.StreamThreatFeedPhishingSample(); +Console.WriteLine(result); diff --git a/examples/csharp/StreamThreatFeedSpam.cs b/examples/csharp/StreamThreatFeedSpam.cs new file mode 100644 index 0000000..8c9f114 --- /dev/null +++ b/examples/csharp/StreamThreatFeedSpam.cs @@ -0,0 +1,18 @@ +// Runnable example: Stream the daily spam threat feed (CSV) (GET /v3.4/stream/threat-feed/spam) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamThreatFeedSpam (GET /v3.4/stream/threat-feed/spam): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +var apiKey = Environment.GetEnvironmentVariable("WHOISFREAKS_API_KEY") + ?? throw new InvalidOperationException("Set the WHOISFREAKS_API_KEY environment variable"); +config.AddApiKey("apiKey", apiKey); // set once, sent with every call +var api = new DatabasesStreamingApi(config); + +string result = api.StreamThreatFeedSpam(new DateOnly(2026, 10, 1)); +Console.WriteLine(result); diff --git a/examples/csharp/StreamThreatFeedSpamSample.cs b/examples/csharp/StreamThreatFeedSpamSample.cs new file mode 100644 index 0000000..68efe0a --- /dev/null +++ b/examples/csharp/StreamThreatFeedSpamSample.cs @@ -0,0 +1,15 @@ +// Runnable example: Stream a sample of the spam threat feed (CSV) (GET /v3.4/stream/threat-feed/spam/sample) +// Run it from the Getting Started project: replace Program.cs with this file, then `dotnet run` +// Parameters for streamThreatFeedSpamSample (GET /v3.4/stream/threat-feed/spam/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +using System; +using WhoisFreaks.Api; +using WhoisFreaks.Client; + +var config = new Configuration(); +// Public endpoint: no API key needed. +var api = new DatabasesStreamingApi(config); + +string result = api.StreamThreatFeedSpamSample(); +Console.WriteLine(result); diff --git a/examples/go/BulkIpReputationV2.go b/examples/go/BulkIpReputationV2.go new file mode 100644 index 0000000..ab60ce1 --- /dev/null +++ b/examples/go/BulkIpReputationV2.go @@ -0,0 +1,32 @@ +// Runnable example: Bulk IP Reputation (v2.0) (POST /v2.0/security) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for bulkIpReputationV2 (POST /v2.0/security): +// - body: BulkGeolocationRequest (required): request body object + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + body := whoisfreaks.NewBulkGeolocationRequest([]string{"1.1.1.1", "2.2.2.2", "8.8.8.8"}) + result, _, err := client.IPReputationAPI.BulkIpReputationV2(ctx). + BulkGeolocationRequest(*body).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/DnsHistoricalV22.go b/examples/go/DnsHistoricalV22.go new file mode 100644 index 0000000..f1843ad --- /dev/null +++ b/examples/go/DnsHistoricalV22.go @@ -0,0 +1,36 @@ +// Runnable example: Historical DNS Lookup (v2.2) (GET /v2.2/dns/historical) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for dnsHistoricalV22 (GET /v2.2/dns/historical): +// - domainName (string, required) +// - type (string, required) +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DNSAPI.DnsHistoricalV22(ctx). + DomainName("whoisfreaks.com").Type_("A,MX,TXT").Page(1).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/DnsHistoricalV23.go b/examples/go/DnsHistoricalV23.go new file mode 100644 index 0000000..9794108 --- /dev/null +++ b/examples/go/DnsHistoricalV23.go @@ -0,0 +1,36 @@ +// Runnable example: Historical DNS Lookup (v2.3) (GET /v2.3/dns/historical) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for dnsHistoricalV23 (GET /v2.3/dns/historical): +// - domainName (string, required) +// - type (string, required) +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DNSAPI.DnsHistoricalV23(ctx). + DomainName("whoisfreaks.com").Type_("A,MX,TXT").Page(1).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/DnsReverseV22.go b/examples/go/DnsReverseV22.go new file mode 100644 index 0000000..2e1588a --- /dev/null +++ b/examples/go/DnsReverseV22.go @@ -0,0 +1,36 @@ +// Runnable example: Reverse DNS Lookup (v2.2) (GET /v2.2/dns/reverse) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for dnsReverseV22 (GET /v2.2/dns/reverse): +// - value (string, required): IP, CIDR, or record value +// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required) +// - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match... +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DNSAPI.DnsReverseV22(ctx).Value("8.8.8.8").Type_("a").Page(1).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/DnsReverseV23.go b/examples/go/DnsReverseV23.go new file mode 100644 index 0000000..c0ed511 --- /dev/null +++ b/examples/go/DnsReverseV23.go @@ -0,0 +1,36 @@ +// Runnable example: Reverse DNS Lookup (v2.3) (GET /v2.3/dns/reverse) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for dnsReverseV23 (GET /v2.3/dns/reverse): +// - value (string, required): IP, CIDR, or record value +// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required) +// - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match... +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DNSAPI.DnsReverseV23(ctx).Value("8.8.8.8").Type_("a").Page(1).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/IpReputationV2.go b/examples/go/IpReputationV2.go new file mode 100644 index 0000000..280eadc --- /dev/null +++ b/examples/go/IpReputationV2.go @@ -0,0 +1,30 @@ +// Runnable example: IP Reputation Lookup (v2.0) (GET /v2.0/security) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for ipReputationV2 (GET /v2.0/security): +// - ip (string, required) + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.IPReputationAPI.IpReputationV2(ctx).Ip("8.8.8.8").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/README.md b/examples/go/README.md index a25f27b..1584ed8 100644 --- a/examples/go/README.md +++ b/examples/go/README.md @@ -12,6 +12,10 @@ Install: see the [Go guide](../../docs/languages/go.md). Set the `WHOISFREAKS_AP - [`DnsLive.go`](DnsLive.go): Live DNS Lookup (`GET /v2.0/dns/live`) - [`DnsHistorical.go`](DnsHistorical.go): Historical DNS Lookup (`GET /v2.0/dns/historical`) - [`DnsReverse.go`](DnsReverse.go): Reverse DNS Lookup (`GET /v2.1/dns/reverse`) +- [`DnsHistoricalV22.go`](DnsHistoricalV22.go): Historical DNS Lookup (v2.2) (`GET /v2.2/dns/historical`) +- [`DnsHistoricalV23.go`](DnsHistoricalV23.go): Historical DNS Lookup (v2.3) (`GET /v2.3/dns/historical`) +- [`DnsReverseV22.go`](DnsReverseV22.go): Reverse DNS Lookup (v2.2) (`GET /v2.2/dns/reverse`) +- [`DnsReverseV23.go`](DnsReverseV23.go): Reverse DNS Lookup (v2.3) (`GET /v2.3/dns/reverse`) - [`DnsBulk.go`](DnsBulk.go): Bulk DNS Lookup (`POST /v2.0/dns/bulk/live`) ## Domain Availability @@ -34,6 +38,8 @@ Install: see the [Go guide](../../docs/languages/go.md). Set the `WHOISFREAKS_AP ## IP Reputation - [`IpReputation.go`](IpReputation.go): IP Reputation Lookup (`GET /v1.0/security`) - [`BulkIpReputation.go`](BulkIpReputation.go): Bulk IP Reputation (`POST /v1.0/security`) +- [`IpReputationV2.go`](IpReputationV2.go): IP Reputation Lookup (v2.0) (`GET /v2.0/security`) +- [`BulkIpReputationV2.go`](BulkIpReputationV2.go): Bulk IP Reputation (v2.0) (`POST /v2.0/security`) ## Domain Reputation - [`DomainReputation.go`](DomainReputation.go): Domain Reputation Lookup (`GET /v1/domain/security`) @@ -105,3 +111,33 @@ Install: see the [Go guide](../../docs/languages/go.md). Set the `WHOISFREAKS_AP - [`DownloadThreatFeedMalwareSample.go`](DownloadThreatFeedMalwareSample.go): Download a sample of the malware threat feed (CSV) (`GET /v3.4/download/threat-feed/malware/sample`) - [`DownloadThreatFeedSpam.go`](DownloadThreatFeedSpam.go): Download the daily spam threat feed (CSV) (`GET /v3.4/download/threat-feed/spam`) - [`DownloadThreatFeedSpamSample.go`](DownloadThreatFeedSpamSample.go): Download a sample of the spam threat feed (CSV) (`GET /v3.4/download/threat-feed/spam/sample`) + +## Databases - Streaming +- [`StreamThreatFeedPhishing.go`](StreamThreatFeedPhishing.go): Stream the daily phishing threat feed (CSV) (`GET /v3.4/stream/threat-feed/phishing`) +- [`StreamThreatFeedPhishingSample.go`](StreamThreatFeedPhishingSample.go): Stream a sample of the phishing threat feed (CSV) (`GET /v3.4/stream/threat-feed/phishing/sample`) +- [`StreamThreatFeedMalware.go`](StreamThreatFeedMalware.go): Stream the daily malware threat feed (CSV) (`GET /v3.4/stream/threat-feed/malware`) +- [`StreamThreatFeedMalwareSample.go`](StreamThreatFeedMalwareSample.go): Stream a sample of the malware threat feed (CSV) (`GET /v3.4/stream/threat-feed/malware/sample`) +- [`StreamThreatFeedSpam.go`](StreamThreatFeedSpam.go): Stream the daily spam threat feed (CSV) (`GET /v3.4/stream/threat-feed/spam`) +- [`StreamThreatFeedSpamSample.go`](StreamThreatFeedSpamSample.go): Stream a sample of the spam threat feed (CSV) (`GET /v3.4/stream/threat-feed/spam/sample`) +- [`StreamDomainerGtld.go`](StreamDomainerGtld.go): Stream newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/gtld`) +- [`StreamDomainerGtldCleaned.go`](StreamDomainerGtldCleaned.go): Stream cleaned newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned`) +- [`StreamDomainerGtldCleanedEmail.go`](StreamDomainerGtldCleanedEmail.go): Stream cleaned newly registered gTLD domains with an email (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned/email`) +- [`StreamDomainerGtldCleanedPhone.go`](StreamDomainerGtldCleanedPhone.go): Stream cleaned newly registered gTLD domains with a phone (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned/phone`) +- [`StreamDomainerCctld.go`](StreamDomainerCctld.go): Stream newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/cctld`) +- [`StreamDomainerCctldCleaned.go`](StreamDomainerCctldCleaned.go): Stream cleaned newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned`) +- [`StreamDomainerCctldCleanedEmail.go`](StreamDomainerCctldCleanedEmail.go): Stream cleaned newly registered ccTLD domains with an email (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned/email`) +- [`StreamDomainerCctldCleanedPhone.go`](StreamDomainerCctldCleanedPhone.go): Stream cleaned newly registered ccTLD domains with a phone (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned/phone`) +- [`StreamDomainerExpired.go`](StreamDomainerExpired.go): Stream expiring domains (CSV) (`GET /v3.3/stream/domainer/expired`) +- [`StreamDomainerExpiredCleaned.go`](StreamDomainerExpiredCleaned.go): Stream cleaned expiring domains (CSV) (`GET /v3.3/stream/domainer/expired/cleaned`) +- [`StreamDomainerExpiredCleanedEmail.go`](StreamDomainerExpiredCleanedEmail.go): Stream cleaned expiring domains with an email (CSV) (`GET /v3.3/stream/domainer/expired/cleaned/email`) +- [`StreamDomainerExpiredCleanedPhone.go`](StreamDomainerExpiredCleanedPhone.go): Stream cleaned expiring domains with a phone (CSV) (`GET /v3.3/stream/domainer/expired/cleaned/phone`) +- [`StreamDomainerDropped.go`](StreamDomainerDropped.go): Stream dropped domains (CSV) (`GET /v3.3/stream/domainer/dropped`) +- [`StreamDomainerDroppedBacklinks.go`](StreamDomainerDroppedBacklinks.go): Stream dropped domains with backlinks (CSV) (`GET /v3.3/stream/domainer/dropped/backlinks`) +- [`StreamDomainerGtldSample.go`](StreamDomainerGtldSample.go): Stream a sample of newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/gtld`) +- [`StreamDomainerGtldCleanedSample.go`](StreamDomainerGtldCleanedSample.go): Stream a sample of cleaned newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/gtld/cleaned`) +- [`StreamDomainerCctldSample.go`](StreamDomainerCctldSample.go): Stream a sample of newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/cctld`) +- [`StreamDomainerCctldCleanedSample.go`](StreamDomainerCctldCleanedSample.go): Stream a sample of cleaned newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/cctld/cleaned`) +- [`StreamDomainerExpiredSample.go`](StreamDomainerExpiredSample.go): Stream a sample of expiring domains (CSV) (`GET /v3.3/stream/domainer/sample/expired`) +- [`StreamDomainerExpiredCleanedSample.go`](StreamDomainerExpiredCleanedSample.go): Stream a sample of cleaned expiring domains (CSV) (`GET /v3.3/stream/domainer/sample/expired/cleaned`) +- [`StreamDomainerDroppedSample.go`](StreamDomainerDroppedSample.go): Stream a sample of dropped domains (CSV) (`GET /v3.3/stream/domainer/sample/dropped`) +- [`StreamDomainerDroppedBacklinksSample.go`](StreamDomainerDroppedBacklinksSample.go): Stream a sample of dropped domains with backlinks (CSV) (`GET /v3.3/stream/domainer/sample/dropped/backlinks`) diff --git a/examples/go/StreamDomainerCctld.go b/examples/go/StreamDomainerCctld.go new file mode 100644 index 0000000..1aa9b5e --- /dev/null +++ b/examples/go/StreamDomainerCctld.go @@ -0,0 +1,34 @@ +// Runnable example: Stream newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/cctld) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerCctld (GET /v3.3/stream/domainer/cctld): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerCctld(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamDomainerCctldCleaned.go b/examples/go/StreamDomainerCctldCleaned.go new file mode 100644 index 0000000..9b0b919 --- /dev/null +++ b/examples/go/StreamDomainerCctldCleaned.go @@ -0,0 +1,34 @@ +// Runnable example: Stream cleaned newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/cctld/cleaned) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerCctldCleaned (GET /v3.3/stream/domainer/cctld/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerCctldCleaned(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamDomainerCctldCleanedEmail.go b/examples/go/StreamDomainerCctldCleanedEmail.go new file mode 100644 index 0000000..e58aeea --- /dev/null +++ b/examples/go/StreamDomainerCctldCleanedEmail.go @@ -0,0 +1,34 @@ +// Runnable example: Stream cleaned newly registered ccTLD domains with an email (CSV) (GET /v3.3/stream/domainer/cctld/cleaned/email) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerCctldCleanedEmail (GET /v3.3/stream/domainer/cctld/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerCctldCleanedEmail(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamDomainerCctldCleanedPhone.go b/examples/go/StreamDomainerCctldCleanedPhone.go new file mode 100644 index 0000000..ad69536 --- /dev/null +++ b/examples/go/StreamDomainerCctldCleanedPhone.go @@ -0,0 +1,34 @@ +// Runnable example: Stream cleaned newly registered ccTLD domains with a phone (CSV) (GET /v3.3/stream/domainer/cctld/cleaned/phone) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerCctldCleanedPhone (GET /v3.3/stream/domainer/cctld/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerCctldCleanedPhone(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamDomainerCctldCleanedSample.go b/examples/go/StreamDomainerCctldCleanedSample.go new file mode 100644 index 0000000..4e95bdd --- /dev/null +++ b/examples/go/StreamDomainerCctldCleanedSample.go @@ -0,0 +1,30 @@ +// Runnable example: Stream a sample of cleaned newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/sample/cctld/cleaned) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerCctldCleanedSample (GET /v3.3/stream/domainer/sample/cctld/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerCctldCleanedSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamDomainerCctldSample.go b/examples/go/StreamDomainerCctldSample.go new file mode 100644 index 0000000..e0af3ba --- /dev/null +++ b/examples/go/StreamDomainerCctldSample.go @@ -0,0 +1,30 @@ +// Runnable example: Stream a sample of newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/sample/cctld) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerCctldSample (GET /v3.3/stream/domainer/sample/cctld): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerCctldSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamDomainerDropped.go b/examples/go/StreamDomainerDropped.go new file mode 100644 index 0000000..b3bcdc1 --- /dev/null +++ b/examples/go/StreamDomainerDropped.go @@ -0,0 +1,34 @@ +// Runnable example: Stream dropped domains (CSV) (GET /v3.3/stream/domainer/dropped) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerDropped (GET /v3.3/stream/domainer/dropped): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerDropped(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamDomainerDroppedBacklinks.go b/examples/go/StreamDomainerDroppedBacklinks.go new file mode 100644 index 0000000..7fadba2 --- /dev/null +++ b/examples/go/StreamDomainerDroppedBacklinks.go @@ -0,0 +1,34 @@ +// Runnable example: Stream dropped domains with backlinks (CSV) (GET /v3.3/stream/domainer/dropped/backlinks) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerDroppedBacklinks (GET /v3.3/stream/domainer/dropped/backlinks): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerDroppedBacklinks(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamDomainerDroppedBacklinksSample.go b/examples/go/StreamDomainerDroppedBacklinksSample.go new file mode 100644 index 0000000..8992f99 --- /dev/null +++ b/examples/go/StreamDomainerDroppedBacklinksSample.go @@ -0,0 +1,30 @@ +// Runnable example: Stream a sample of dropped domains with backlinks (CSV) (GET /v3.3/stream/domainer/sample/dropped/backlinks) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerDroppedBacklinksSample (GET /v3.3/stream/domainer/sample/dropped/backlinks): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerDroppedBacklinksSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamDomainerDroppedSample.go b/examples/go/StreamDomainerDroppedSample.go new file mode 100644 index 0000000..afb3a3e --- /dev/null +++ b/examples/go/StreamDomainerDroppedSample.go @@ -0,0 +1,30 @@ +// Runnable example: Stream a sample of dropped domains (CSV) (GET /v3.3/stream/domainer/sample/dropped) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerDroppedSample (GET /v3.3/stream/domainer/sample/dropped): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerDroppedSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamDomainerExpired.go b/examples/go/StreamDomainerExpired.go new file mode 100644 index 0000000..5a14979 --- /dev/null +++ b/examples/go/StreamDomainerExpired.go @@ -0,0 +1,34 @@ +// Runnable example: Stream expiring domains (CSV) (GET /v3.3/stream/domainer/expired) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerExpired (GET /v3.3/stream/domainer/expired): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerExpired(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamDomainerExpiredCleaned.go b/examples/go/StreamDomainerExpiredCleaned.go new file mode 100644 index 0000000..33591f7 --- /dev/null +++ b/examples/go/StreamDomainerExpiredCleaned.go @@ -0,0 +1,34 @@ +// Runnable example: Stream cleaned expiring domains (CSV) (GET /v3.3/stream/domainer/expired/cleaned) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerExpiredCleaned (GET /v3.3/stream/domainer/expired/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerExpiredCleaned(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamDomainerExpiredCleanedEmail.go b/examples/go/StreamDomainerExpiredCleanedEmail.go new file mode 100644 index 0000000..cd88331 --- /dev/null +++ b/examples/go/StreamDomainerExpiredCleanedEmail.go @@ -0,0 +1,34 @@ +// Runnable example: Stream cleaned expiring domains with an email (CSV) (GET /v3.3/stream/domainer/expired/cleaned/email) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerExpiredCleanedEmail (GET /v3.3/stream/domainer/expired/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerExpiredCleanedEmail(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamDomainerExpiredCleanedPhone.go b/examples/go/StreamDomainerExpiredCleanedPhone.go new file mode 100644 index 0000000..182cade --- /dev/null +++ b/examples/go/StreamDomainerExpiredCleanedPhone.go @@ -0,0 +1,34 @@ +// Runnable example: Stream cleaned expiring domains with a phone (CSV) (GET /v3.3/stream/domainer/expired/cleaned/phone) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerExpiredCleanedPhone (GET /v3.3/stream/domainer/expired/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerExpiredCleanedPhone(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamDomainerExpiredCleanedSample.go b/examples/go/StreamDomainerExpiredCleanedSample.go new file mode 100644 index 0000000..a7e4ae8 --- /dev/null +++ b/examples/go/StreamDomainerExpiredCleanedSample.go @@ -0,0 +1,30 @@ +// Runnable example: Stream a sample of cleaned expiring domains (CSV) (GET /v3.3/stream/domainer/sample/expired/cleaned) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerExpiredCleanedSample (GET /v3.3/stream/domainer/sample/expired/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerExpiredCleanedSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamDomainerExpiredSample.go b/examples/go/StreamDomainerExpiredSample.go new file mode 100644 index 0000000..43845ce --- /dev/null +++ b/examples/go/StreamDomainerExpiredSample.go @@ -0,0 +1,30 @@ +// Runnable example: Stream a sample of expiring domains (CSV) (GET /v3.3/stream/domainer/sample/expired) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerExpiredSample (GET /v3.3/stream/domainer/sample/expired): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerExpiredSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamDomainerGtld.go b/examples/go/StreamDomainerGtld.go new file mode 100644 index 0000000..8e871a6 --- /dev/null +++ b/examples/go/StreamDomainerGtld.go @@ -0,0 +1,34 @@ +// Runnable example: Stream newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/gtld) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerGtld (GET /v3.3/stream/domainer/gtld): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerGtld(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamDomainerGtldCleaned.go b/examples/go/StreamDomainerGtldCleaned.go new file mode 100644 index 0000000..31564e8 --- /dev/null +++ b/examples/go/StreamDomainerGtldCleaned.go @@ -0,0 +1,34 @@ +// Runnable example: Stream cleaned newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/gtld/cleaned) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerGtldCleaned (GET /v3.3/stream/domainer/gtld/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerGtldCleaned(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamDomainerGtldCleanedEmail.go b/examples/go/StreamDomainerGtldCleanedEmail.go new file mode 100644 index 0000000..74e9d45 --- /dev/null +++ b/examples/go/StreamDomainerGtldCleanedEmail.go @@ -0,0 +1,34 @@ +// Runnable example: Stream cleaned newly registered gTLD domains with an email (CSV) (GET /v3.3/stream/domainer/gtld/cleaned/email) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerGtldCleanedEmail (GET /v3.3/stream/domainer/gtld/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerGtldCleanedEmail(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamDomainerGtldCleanedPhone.go b/examples/go/StreamDomainerGtldCleanedPhone.go new file mode 100644 index 0000000..82e1c31 --- /dev/null +++ b/examples/go/StreamDomainerGtldCleanedPhone.go @@ -0,0 +1,34 @@ +// Runnable example: Stream cleaned newly registered gTLD domains with a phone (CSV) (GET /v3.3/stream/domainer/gtld/cleaned/phone) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerGtldCleanedPhone (GET /v3.3/stream/domainer/gtld/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerGtldCleanedPhone(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamDomainerGtldCleanedSample.go b/examples/go/StreamDomainerGtldCleanedSample.go new file mode 100644 index 0000000..13e70b7 --- /dev/null +++ b/examples/go/StreamDomainerGtldCleanedSample.go @@ -0,0 +1,30 @@ +// Runnable example: Stream a sample of cleaned newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/sample/gtld/cleaned) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerGtldCleanedSample (GET /v3.3/stream/domainer/sample/gtld/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerGtldCleanedSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamDomainerGtldSample.go b/examples/go/StreamDomainerGtldSample.go new file mode 100644 index 0000000..2f99041 --- /dev/null +++ b/examples/go/StreamDomainerGtldSample.go @@ -0,0 +1,30 @@ +// Runnable example: Stream a sample of newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/sample/gtld) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamDomainerGtldSample (GET /v3.3/stream/domainer/sample/gtld): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamDomainerGtldSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamThreatFeedMalware.go b/examples/go/StreamThreatFeedMalware.go new file mode 100644 index 0000000..26168ff --- /dev/null +++ b/examples/go/StreamThreatFeedMalware.go @@ -0,0 +1,33 @@ +// Runnable example: Stream the daily malware threat feed (CSV) (GET /v3.4/stream/threat-feed/malware) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamThreatFeedMalware (GET /v3.4/stream/threat-feed/malware): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamThreatFeedMalware(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamThreatFeedMalwareSample.go b/examples/go/StreamThreatFeedMalwareSample.go new file mode 100644 index 0000000..2ba6c9f --- /dev/null +++ b/examples/go/StreamThreatFeedMalwareSample.go @@ -0,0 +1,29 @@ +// Runnable example: Stream a sample of the malware threat feed (CSV) (GET /v3.4/stream/threat-feed/malware/sample) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamThreatFeedMalwareSample (GET /v3.4/stream/threat-feed/malware/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamThreatFeedMalwareSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamThreatFeedPhishing.go b/examples/go/StreamThreatFeedPhishing.go new file mode 100644 index 0000000..2cee86e --- /dev/null +++ b/examples/go/StreamThreatFeedPhishing.go @@ -0,0 +1,33 @@ +// Runnable example: Stream the daily phishing threat feed (CSV) (GET /v3.4/stream/threat-feed/phishing) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamThreatFeedPhishing (GET /v3.4/stream/threat-feed/phishing): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamThreatFeedPhishing(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamThreatFeedPhishingSample.go b/examples/go/StreamThreatFeedPhishingSample.go new file mode 100644 index 0000000..2e8cade --- /dev/null +++ b/examples/go/StreamThreatFeedPhishingSample.go @@ -0,0 +1,29 @@ +// Runnable example: Stream a sample of the phishing threat feed (CSV) (GET /v3.4/stream/threat-feed/phishing/sample) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamThreatFeedPhishingSample (GET /v3.4/stream/threat-feed/phishing/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamThreatFeedPhishingSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamThreatFeedSpam.go b/examples/go/StreamThreatFeedSpam.go new file mode 100644 index 0000000..dc74ce7 --- /dev/null +++ b/examples/go/StreamThreatFeedSpam.go @@ -0,0 +1,33 @@ +// Runnable example: Stream the daily spam threat feed (CSV) (GET /v3.4/stream/threat-feed/spam) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamThreatFeedSpam (GET /v3.4/stream/threat-feed/spam): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "os" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Set the API key once on the context; every call made with ctx sends it. + ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys, + map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}}) + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamThreatFeedSpam(ctx). + Date("2026-10-01").Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/go/StreamThreatFeedSpamSample.go b/examples/go/StreamThreatFeedSpamSample.go new file mode 100644 index 0000000..fa36ec7 --- /dev/null +++ b/examples/go/StreamThreatFeedSpamSample.go @@ -0,0 +1,29 @@ +// Runnable example: Stream a sample of the spam threat feed (CSV) (GET /v3.4/stream/threat-feed/spam/sample) +// Run it from the Getting Started module: save it as main.go, then `go run .` +// Parameters for streamThreatFeedSpamSample (GET /v3.4/stream/threat-feed/spam/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + + whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go" +) + +func main() { + // Public endpoint: no API key needed. + ctx := context.Background() + client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration()) + + result, _, err := client.DatabasesStreamingAPI.StreamThreatFeedSpamSample(ctx).Execute() + if err != nil { + log.Fatal(err) + } + out, _ := json.MarshalIndent(result, "", " ") + fmt.Println(string(out)) +} diff --git a/examples/java/BulkIpReputationV2.java b/examples/java/BulkIpReputationV2.java new file mode 100644 index 0000000..1a4dfef --- /dev/null +++ b/examples/java/BulkIpReputationV2.java @@ -0,0 +1,27 @@ +// Runnable example: Bulk IP Reputation (v2.0) (POST /v2.0/security) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=BulkIpReputationV2 +// Parameters for bulkIpReputationV2 (POST /v2.0/security): +// - body: BulkGeolocationRequest (required): request body object +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.IpReputationApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; +import com.whoisfreaks.client.model.BulkGeolocationRequest; +import com.whoisfreaks.client.model.IpReputationResponse; + +import java.util.Arrays; +import java.util.List; + +public class BulkIpReputationV2 { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + IpReputationApi api = new IpReputationApi(client); + + BulkGeolocationRequest body = new BulkGeolocationRequest() + .ips(Arrays.asList("1.1.1.1", "2.2.2.2", "8.8.8.8")); + List result = api.bulkIpReputationV2(body); + System.out.println(result); + } +} diff --git a/examples/java/DnsHistoricalV22.java b/examples/java/DnsHistoricalV22.java new file mode 100644 index 0000000..6441c4e --- /dev/null +++ b/examples/java/DnsHistoricalV22.java @@ -0,0 +1,27 @@ +// Runnable example: Historical DNS Lookup (v2.2) (GET /v2.2/dns/historical) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=DnsHistoricalV22 +// Parameters for dnsHistoricalV22 (GET /v2.2/dns/historical): +// - domainName (string, required) +// - type (string, required) +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DnsApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; +import com.whoisfreaks.client.model.HistoricalDnsResponseV2_2; + +public class DnsHistoricalV22 { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DnsApi api = new DnsApi(client); + + // dnsHistoricalV22(domainName, type, page, sort, sortBy, format); null leaves an optional parameter unset + HistoricalDnsResponseV2_2 result = api.dnsHistoricalV22("whoisfreaks.com", "A,MX,TXT", 1, null, null, null); + System.out.println(result); + } +} diff --git a/examples/java/DnsHistoricalV23.java b/examples/java/DnsHistoricalV23.java new file mode 100644 index 0000000..f996948 --- /dev/null +++ b/examples/java/DnsHistoricalV23.java @@ -0,0 +1,27 @@ +// Runnable example: Historical DNS Lookup (v2.3) (GET /v2.3/dns/historical) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=DnsHistoricalV23 +// Parameters for dnsHistoricalV23 (GET /v2.3/dns/historical): +// - domainName (string, required) +// - type (string, required) +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DnsApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; +import com.whoisfreaks.client.model.HistoricalDnsResponseV2_2; + +public class DnsHistoricalV23 { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DnsApi api = new DnsApi(client); + + // dnsHistoricalV23(domainName, type, page, sort, sortBy, format); null leaves an optional parameter unset + HistoricalDnsResponseV2_2 result = api.dnsHistoricalV23("whoisfreaks.com", "A,MX,TXT", 1, null, null, null); + System.out.println(result); + } +} diff --git a/examples/java/DnsReverseV22.java b/examples/java/DnsReverseV22.java new file mode 100644 index 0000000..ff013d8 --- /dev/null +++ b/examples/java/DnsReverseV22.java @@ -0,0 +1,28 @@ +// Runnable example: Reverse DNS Lookup (v2.2) (GET /v2.2/dns/reverse) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=DnsReverseV22 +// Parameters for dnsReverseV22 (GET /v2.2/dns/reverse): +// - value (string, required): IP, CIDR, or record value +// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required) +// - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match... +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DnsApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; +import com.whoisfreaks.client.model.ReverseDnsResponseV2_2; + +public class DnsReverseV22 { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DnsApi api = new DnsApi(client); + + // dnsReverseV22(value, type, exact, page, sort, sortBy, format); null leaves an optional parameter unset + ReverseDnsResponseV2_2 result = api.dnsReverseV22("8.8.8.8", "a", null, 1, null, null, null); + System.out.println(result); + } +} diff --git a/examples/java/DnsReverseV23.java b/examples/java/DnsReverseV23.java new file mode 100644 index 0000000..f19bd27 --- /dev/null +++ b/examples/java/DnsReverseV23.java @@ -0,0 +1,28 @@ +// Runnable example: Reverse DNS Lookup (v2.3) (GET /v2.3/dns/reverse) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=DnsReverseV23 +// Parameters for dnsReverseV23 (GET /v2.3/dns/reverse): +// - value (string, required): IP, CIDR, or record value +// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required) +// - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match... +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DnsApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; +import com.whoisfreaks.client.model.ReverseDnsResponseV2_3; + +public class DnsReverseV23 { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DnsApi api = new DnsApi(client); + + // dnsReverseV23(value, type, exact, page, sort, sortBy, format); null leaves an optional parameter unset + ReverseDnsResponseV2_3 result = api.dnsReverseV23("8.8.8.8", "a", null, 1, null, null, null); + System.out.println(result); + } +} diff --git a/examples/java/IpReputationV2.java b/examples/java/IpReputationV2.java new file mode 100644 index 0000000..1e8698a --- /dev/null +++ b/examples/java/IpReputationV2.java @@ -0,0 +1,21 @@ +// Runnable example: IP Reputation Lookup (v2.0) (GET /v2.0/security) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=IpReputationV2 +// Parameters for ipReputationV2 (GET /v2.0/security): +// - ip (string, required) +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.IpReputationApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; +import com.whoisfreaks.client.model.IpReputationResponse; + +public class IpReputationV2 { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + IpReputationApi api = new IpReputationApi(client); + + IpReputationResponse result = api.ipReputationV2("8.8.8.8"); + System.out.println(result); + } +} diff --git a/examples/java/README.md b/examples/java/README.md index 697daa9..ca12a2a 100644 --- a/examples/java/README.md +++ b/examples/java/README.md @@ -12,6 +12,10 @@ Install: see the [Java guide](../../docs/languages/java.md). Set the `WHOISFREAK - [`DnsLive.java`](DnsLive.java): Live DNS Lookup (`GET /v2.0/dns/live`) - [`DnsHistorical.java`](DnsHistorical.java): Historical DNS Lookup (`GET /v2.0/dns/historical`) - [`DnsReverse.java`](DnsReverse.java): Reverse DNS Lookup (`GET /v2.1/dns/reverse`) +- [`DnsHistoricalV22.java`](DnsHistoricalV22.java): Historical DNS Lookup (v2.2) (`GET /v2.2/dns/historical`) +- [`DnsHistoricalV23.java`](DnsHistoricalV23.java): Historical DNS Lookup (v2.3) (`GET /v2.3/dns/historical`) +- [`DnsReverseV22.java`](DnsReverseV22.java): Reverse DNS Lookup (v2.2) (`GET /v2.2/dns/reverse`) +- [`DnsReverseV23.java`](DnsReverseV23.java): Reverse DNS Lookup (v2.3) (`GET /v2.3/dns/reverse`) - [`DnsBulk.java`](DnsBulk.java): Bulk DNS Lookup (`POST /v2.0/dns/bulk/live`) ## Domain Availability @@ -34,6 +38,8 @@ Install: see the [Java guide](../../docs/languages/java.md). Set the `WHOISFREAK ## IP Reputation - [`IpReputation.java`](IpReputation.java): IP Reputation Lookup (`GET /v1.0/security`) - [`BulkIpReputation.java`](BulkIpReputation.java): Bulk IP Reputation (`POST /v1.0/security`) +- [`IpReputationV2.java`](IpReputationV2.java): IP Reputation Lookup (v2.0) (`GET /v2.0/security`) +- [`BulkIpReputationV2.java`](BulkIpReputationV2.java): Bulk IP Reputation (v2.0) (`POST /v2.0/security`) ## Domain Reputation - [`DomainReputation.java`](DomainReputation.java): Domain Reputation Lookup (`GET /v1/domain/security`) @@ -105,3 +111,33 @@ Install: see the [Java guide](../../docs/languages/java.md). Set the `WHOISFREAK - [`DownloadThreatFeedMalwareSample.java`](DownloadThreatFeedMalwareSample.java): Download a sample of the malware threat feed (CSV) (`GET /v3.4/download/threat-feed/malware/sample`) - [`DownloadThreatFeedSpam.java`](DownloadThreatFeedSpam.java): Download the daily spam threat feed (CSV) (`GET /v3.4/download/threat-feed/spam`) - [`DownloadThreatFeedSpamSample.java`](DownloadThreatFeedSpamSample.java): Download a sample of the spam threat feed (CSV) (`GET /v3.4/download/threat-feed/spam/sample`) + +## Databases - Streaming +- [`StreamThreatFeedPhishing.java`](StreamThreatFeedPhishing.java): Stream the daily phishing threat feed (CSV) (`GET /v3.4/stream/threat-feed/phishing`) +- [`StreamThreatFeedPhishingSample.java`](StreamThreatFeedPhishingSample.java): Stream a sample of the phishing threat feed (CSV) (`GET /v3.4/stream/threat-feed/phishing/sample`) +- [`StreamThreatFeedMalware.java`](StreamThreatFeedMalware.java): Stream the daily malware threat feed (CSV) (`GET /v3.4/stream/threat-feed/malware`) +- [`StreamThreatFeedMalwareSample.java`](StreamThreatFeedMalwareSample.java): Stream a sample of the malware threat feed (CSV) (`GET /v3.4/stream/threat-feed/malware/sample`) +- [`StreamThreatFeedSpam.java`](StreamThreatFeedSpam.java): Stream the daily spam threat feed (CSV) (`GET /v3.4/stream/threat-feed/spam`) +- [`StreamThreatFeedSpamSample.java`](StreamThreatFeedSpamSample.java): Stream a sample of the spam threat feed (CSV) (`GET /v3.4/stream/threat-feed/spam/sample`) +- [`StreamDomainerGtld.java`](StreamDomainerGtld.java): Stream newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/gtld`) +- [`StreamDomainerGtldCleaned.java`](StreamDomainerGtldCleaned.java): Stream cleaned newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned`) +- [`StreamDomainerGtldCleanedEmail.java`](StreamDomainerGtldCleanedEmail.java): Stream cleaned newly registered gTLD domains with an email (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned/email`) +- [`StreamDomainerGtldCleanedPhone.java`](StreamDomainerGtldCleanedPhone.java): Stream cleaned newly registered gTLD domains with a phone (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned/phone`) +- [`StreamDomainerCctld.java`](StreamDomainerCctld.java): Stream newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/cctld`) +- [`StreamDomainerCctldCleaned.java`](StreamDomainerCctldCleaned.java): Stream cleaned newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned`) +- [`StreamDomainerCctldCleanedEmail.java`](StreamDomainerCctldCleanedEmail.java): Stream cleaned newly registered ccTLD domains with an email (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned/email`) +- [`StreamDomainerCctldCleanedPhone.java`](StreamDomainerCctldCleanedPhone.java): Stream cleaned newly registered ccTLD domains with a phone (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned/phone`) +- [`StreamDomainerExpired.java`](StreamDomainerExpired.java): Stream expiring domains (CSV) (`GET /v3.3/stream/domainer/expired`) +- [`StreamDomainerExpiredCleaned.java`](StreamDomainerExpiredCleaned.java): Stream cleaned expiring domains (CSV) (`GET /v3.3/stream/domainer/expired/cleaned`) +- [`StreamDomainerExpiredCleanedEmail.java`](StreamDomainerExpiredCleanedEmail.java): Stream cleaned expiring domains with an email (CSV) (`GET /v3.3/stream/domainer/expired/cleaned/email`) +- [`StreamDomainerExpiredCleanedPhone.java`](StreamDomainerExpiredCleanedPhone.java): Stream cleaned expiring domains with a phone (CSV) (`GET /v3.3/stream/domainer/expired/cleaned/phone`) +- [`StreamDomainerDropped.java`](StreamDomainerDropped.java): Stream dropped domains (CSV) (`GET /v3.3/stream/domainer/dropped`) +- [`StreamDomainerDroppedBacklinks.java`](StreamDomainerDroppedBacklinks.java): Stream dropped domains with backlinks (CSV) (`GET /v3.3/stream/domainer/dropped/backlinks`) +- [`StreamDomainerGtldSample.java`](StreamDomainerGtldSample.java): Stream a sample of newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/gtld`) +- [`StreamDomainerGtldCleanedSample.java`](StreamDomainerGtldCleanedSample.java): Stream a sample of cleaned newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/gtld/cleaned`) +- [`StreamDomainerCctldSample.java`](StreamDomainerCctldSample.java): Stream a sample of newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/cctld`) +- [`StreamDomainerCctldCleanedSample.java`](StreamDomainerCctldCleanedSample.java): Stream a sample of cleaned newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/cctld/cleaned`) +- [`StreamDomainerExpiredSample.java`](StreamDomainerExpiredSample.java): Stream a sample of expiring domains (CSV) (`GET /v3.3/stream/domainer/sample/expired`) +- [`StreamDomainerExpiredCleanedSample.java`](StreamDomainerExpiredCleanedSample.java): Stream a sample of cleaned expiring domains (CSV) (`GET /v3.3/stream/domainer/sample/expired/cleaned`) +- [`StreamDomainerDroppedSample.java`](StreamDomainerDroppedSample.java): Stream a sample of dropped domains (CSV) (`GET /v3.3/stream/domainer/sample/dropped`) +- [`StreamDomainerDroppedBacklinksSample.java`](StreamDomainerDroppedBacklinksSample.java): Stream a sample of dropped domains with backlinks (CSV) (`GET /v3.3/stream/domainer/sample/dropped/backlinks`) diff --git a/examples/java/StreamDomainerCctld.java b/examples/java/StreamDomainerCctld.java new file mode 100644 index 0000000..577c9bf --- /dev/null +++ b/examples/java/StreamDomainerCctld.java @@ -0,0 +1,26 @@ +// Runnable example: Stream newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/cctld) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerCctld +// Parameters for streamDomainerCctld (GET /v3.3/stream/domainer/cctld): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerCctld { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerCctld(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerCctld(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamDomainerCctldCleaned.java b/examples/java/StreamDomainerCctldCleaned.java new file mode 100644 index 0000000..3543d58 --- /dev/null +++ b/examples/java/StreamDomainerCctldCleaned.java @@ -0,0 +1,26 @@ +// Runnable example: Stream cleaned newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/cctld/cleaned) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerCctldCleaned +// Parameters for streamDomainerCctldCleaned (GET /v3.3/stream/domainer/cctld/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerCctldCleaned { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerCctldCleaned(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerCctldCleaned(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamDomainerCctldCleanedEmail.java b/examples/java/StreamDomainerCctldCleanedEmail.java new file mode 100644 index 0000000..81566bd --- /dev/null +++ b/examples/java/StreamDomainerCctldCleanedEmail.java @@ -0,0 +1,26 @@ +// Runnable example: Stream cleaned newly registered ccTLD domains with an email (CSV) (GET /v3.3/stream/domainer/cctld/cleaned/email) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerCctldCleanedEmail +// Parameters for streamDomainerCctldCleanedEmail (GET /v3.3/stream/domainer/cctld/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerCctldCleanedEmail { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerCctldCleanedEmail(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerCctldCleanedEmail(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamDomainerCctldCleanedPhone.java b/examples/java/StreamDomainerCctldCleanedPhone.java new file mode 100644 index 0000000..3666826 --- /dev/null +++ b/examples/java/StreamDomainerCctldCleanedPhone.java @@ -0,0 +1,26 @@ +// Runnable example: Stream cleaned newly registered ccTLD domains with a phone (CSV) (GET /v3.3/stream/domainer/cctld/cleaned/phone) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerCctldCleanedPhone +// Parameters for streamDomainerCctldCleanedPhone (GET /v3.3/stream/domainer/cctld/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerCctldCleanedPhone { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerCctldCleanedPhone(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerCctldCleanedPhone(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamDomainerCctldCleanedSample.java b/examples/java/StreamDomainerCctldCleanedSample.java new file mode 100644 index 0000000..1d7546a --- /dev/null +++ b/examples/java/StreamDomainerCctldCleanedSample.java @@ -0,0 +1,21 @@ +// Runnable example: Stream a sample of cleaned newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/sample/cctld/cleaned) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerCctldCleanedSample +// Parameters for streamDomainerCctldCleanedSample (GET /v3.3/stream/domainer/sample/cctld/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; + +public class StreamDomainerCctldCleanedSample { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + // Public endpoint: no API key needed. + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerCctldCleanedSample(whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerCctldCleanedSample(null, null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamDomainerCctldSample.java b/examples/java/StreamDomainerCctldSample.java new file mode 100644 index 0000000..f51177a --- /dev/null +++ b/examples/java/StreamDomainerCctldSample.java @@ -0,0 +1,21 @@ +// Runnable example: Stream a sample of newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/sample/cctld) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerCctldSample +// Parameters for streamDomainerCctldSample (GET /v3.3/stream/domainer/sample/cctld): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; + +public class StreamDomainerCctldSample { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + // Public endpoint: no API key needed. + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerCctldSample(whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerCctldSample(null, null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamDomainerDropped.java b/examples/java/StreamDomainerDropped.java new file mode 100644 index 0000000..01dc0ff --- /dev/null +++ b/examples/java/StreamDomainerDropped.java @@ -0,0 +1,26 @@ +// Runnable example: Stream dropped domains (CSV) (GET /v3.3/stream/domainer/dropped) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerDropped +// Parameters for streamDomainerDropped (GET /v3.3/stream/domainer/dropped): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerDropped { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerDropped(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerDropped(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamDomainerDroppedBacklinks.java b/examples/java/StreamDomainerDroppedBacklinks.java new file mode 100644 index 0000000..61f1301 --- /dev/null +++ b/examples/java/StreamDomainerDroppedBacklinks.java @@ -0,0 +1,26 @@ +// Runnable example: Stream dropped domains with backlinks (CSV) (GET /v3.3/stream/domainer/dropped/backlinks) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerDroppedBacklinks +// Parameters for streamDomainerDroppedBacklinks (GET /v3.3/stream/domainer/dropped/backlinks): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerDroppedBacklinks { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerDroppedBacklinks(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerDroppedBacklinks(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamDomainerDroppedBacklinksSample.java b/examples/java/StreamDomainerDroppedBacklinksSample.java new file mode 100644 index 0000000..1ae071e --- /dev/null +++ b/examples/java/StreamDomainerDroppedBacklinksSample.java @@ -0,0 +1,21 @@ +// Runnable example: Stream a sample of dropped domains with backlinks (CSV) (GET /v3.3/stream/domainer/sample/dropped/backlinks) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerDroppedBacklinksSample +// Parameters for streamDomainerDroppedBacklinksSample (GET /v3.3/stream/domainer/sample/dropped/backlinks): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; + +public class StreamDomainerDroppedBacklinksSample { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + // Public endpoint: no API key needed. + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerDroppedBacklinksSample(whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerDroppedBacklinksSample(null, null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamDomainerDroppedSample.java b/examples/java/StreamDomainerDroppedSample.java new file mode 100644 index 0000000..2e229de --- /dev/null +++ b/examples/java/StreamDomainerDroppedSample.java @@ -0,0 +1,21 @@ +// Runnable example: Stream a sample of dropped domains (CSV) (GET /v3.3/stream/domainer/sample/dropped) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerDroppedSample +// Parameters for streamDomainerDroppedSample (GET /v3.3/stream/domainer/sample/dropped): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; + +public class StreamDomainerDroppedSample { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + // Public endpoint: no API key needed. + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerDroppedSample(whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerDroppedSample(null, null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamDomainerExpired.java b/examples/java/StreamDomainerExpired.java new file mode 100644 index 0000000..4abd4f3 --- /dev/null +++ b/examples/java/StreamDomainerExpired.java @@ -0,0 +1,26 @@ +// Runnable example: Stream expiring domains (CSV) (GET /v3.3/stream/domainer/expired) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerExpired +// Parameters for streamDomainerExpired (GET /v3.3/stream/domainer/expired): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerExpired { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerExpired(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerExpired(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamDomainerExpiredCleaned.java b/examples/java/StreamDomainerExpiredCleaned.java new file mode 100644 index 0000000..c604e6d --- /dev/null +++ b/examples/java/StreamDomainerExpiredCleaned.java @@ -0,0 +1,26 @@ +// Runnable example: Stream cleaned expiring domains (CSV) (GET /v3.3/stream/domainer/expired/cleaned) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerExpiredCleaned +// Parameters for streamDomainerExpiredCleaned (GET /v3.3/stream/domainer/expired/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerExpiredCleaned { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerExpiredCleaned(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerExpiredCleaned(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamDomainerExpiredCleanedEmail.java b/examples/java/StreamDomainerExpiredCleanedEmail.java new file mode 100644 index 0000000..2180c57 --- /dev/null +++ b/examples/java/StreamDomainerExpiredCleanedEmail.java @@ -0,0 +1,26 @@ +// Runnable example: Stream cleaned expiring domains with an email (CSV) (GET /v3.3/stream/domainer/expired/cleaned/email) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerExpiredCleanedEmail +// Parameters for streamDomainerExpiredCleanedEmail (GET /v3.3/stream/domainer/expired/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerExpiredCleanedEmail { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerExpiredCleanedEmail(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerExpiredCleanedEmail(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamDomainerExpiredCleanedPhone.java b/examples/java/StreamDomainerExpiredCleanedPhone.java new file mode 100644 index 0000000..bc53f92 --- /dev/null +++ b/examples/java/StreamDomainerExpiredCleanedPhone.java @@ -0,0 +1,26 @@ +// Runnable example: Stream cleaned expiring domains with a phone (CSV) (GET /v3.3/stream/domainer/expired/cleaned/phone) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerExpiredCleanedPhone +// Parameters for streamDomainerExpiredCleanedPhone (GET /v3.3/stream/domainer/expired/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerExpiredCleanedPhone { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerExpiredCleanedPhone(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerExpiredCleanedPhone(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamDomainerExpiredCleanedSample.java b/examples/java/StreamDomainerExpiredCleanedSample.java new file mode 100644 index 0000000..724a7c5 --- /dev/null +++ b/examples/java/StreamDomainerExpiredCleanedSample.java @@ -0,0 +1,21 @@ +// Runnable example: Stream a sample of cleaned expiring domains (CSV) (GET /v3.3/stream/domainer/sample/expired/cleaned) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerExpiredCleanedSample +// Parameters for streamDomainerExpiredCleanedSample (GET /v3.3/stream/domainer/sample/expired/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; + +public class StreamDomainerExpiredCleanedSample { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + // Public endpoint: no API key needed. + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerExpiredCleanedSample(whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerExpiredCleanedSample(null, null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamDomainerExpiredSample.java b/examples/java/StreamDomainerExpiredSample.java new file mode 100644 index 0000000..2e30f14 --- /dev/null +++ b/examples/java/StreamDomainerExpiredSample.java @@ -0,0 +1,21 @@ +// Runnable example: Stream a sample of expiring domains (CSV) (GET /v3.3/stream/domainer/sample/expired) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerExpiredSample +// Parameters for streamDomainerExpiredSample (GET /v3.3/stream/domainer/sample/expired): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; + +public class StreamDomainerExpiredSample { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + // Public endpoint: no API key needed. + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerExpiredSample(whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerExpiredSample(null, null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamDomainerGtld.java b/examples/java/StreamDomainerGtld.java new file mode 100644 index 0000000..9a4d05a --- /dev/null +++ b/examples/java/StreamDomainerGtld.java @@ -0,0 +1,26 @@ +// Runnable example: Stream newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/gtld) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerGtld +// Parameters for streamDomainerGtld (GET /v3.3/stream/domainer/gtld): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerGtld { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerGtld(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerGtld(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamDomainerGtldCleaned.java b/examples/java/StreamDomainerGtldCleaned.java new file mode 100644 index 0000000..e4be320 --- /dev/null +++ b/examples/java/StreamDomainerGtldCleaned.java @@ -0,0 +1,26 @@ +// Runnable example: Stream cleaned newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/gtld/cleaned) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerGtldCleaned +// Parameters for streamDomainerGtldCleaned (GET /v3.3/stream/domainer/gtld/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerGtldCleaned { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerGtldCleaned(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerGtldCleaned(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamDomainerGtldCleanedEmail.java b/examples/java/StreamDomainerGtldCleanedEmail.java new file mode 100644 index 0000000..b5371e2 --- /dev/null +++ b/examples/java/StreamDomainerGtldCleanedEmail.java @@ -0,0 +1,26 @@ +// Runnable example: Stream cleaned newly registered gTLD domains with an email (CSV) (GET /v3.3/stream/domainer/gtld/cleaned/email) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerGtldCleanedEmail +// Parameters for streamDomainerGtldCleanedEmail (GET /v3.3/stream/domainer/gtld/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerGtldCleanedEmail { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerGtldCleanedEmail(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerGtldCleanedEmail(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamDomainerGtldCleanedPhone.java b/examples/java/StreamDomainerGtldCleanedPhone.java new file mode 100644 index 0000000..c7be69b --- /dev/null +++ b/examples/java/StreamDomainerGtldCleanedPhone.java @@ -0,0 +1,26 @@ +// Runnable example: Stream cleaned newly registered gTLD domains with a phone (CSV) (GET /v3.3/stream/domainer/gtld/cleaned/phone) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerGtldCleanedPhone +// Parameters for streamDomainerGtldCleanedPhone (GET /v3.3/stream/domainer/gtld/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamDomainerGtldCleanedPhone { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerGtldCleanedPhone(date, whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerGtldCleanedPhone(LocalDate.of(2026, 10, 1), null, null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamDomainerGtldCleanedSample.java b/examples/java/StreamDomainerGtldCleanedSample.java new file mode 100644 index 0000000..bfcd998 --- /dev/null +++ b/examples/java/StreamDomainerGtldCleanedSample.java @@ -0,0 +1,21 @@ +// Runnable example: Stream a sample of cleaned newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/sample/gtld/cleaned) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerGtldCleanedSample +// Parameters for streamDomainerGtldCleanedSample (GET /v3.3/stream/domainer/sample/gtld/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; + +public class StreamDomainerGtldCleanedSample { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + // Public endpoint: no API key needed. + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerGtldCleanedSample(whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerGtldCleanedSample(null, null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamDomainerGtldSample.java b/examples/java/StreamDomainerGtldSample.java new file mode 100644 index 0000000..24391c0 --- /dev/null +++ b/examples/java/StreamDomainerGtldSample.java @@ -0,0 +1,21 @@ +// Runnable example: Stream a sample of newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/sample/gtld) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamDomainerGtldSample +// Parameters for streamDomainerGtldSample (GET /v3.3/stream/domainer/sample/gtld): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; + +public class StreamDomainerGtldSample { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + // Public endpoint: no API key needed. + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamDomainerGtldSample(whois, offset, limit); null leaves an optional parameter unset + String result = api.streamDomainerGtldSample(null, null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamThreatFeedMalware.java b/examples/java/StreamThreatFeedMalware.java new file mode 100644 index 0000000..5ff329a --- /dev/null +++ b/examples/java/StreamThreatFeedMalware.java @@ -0,0 +1,25 @@ +// Runnable example: Stream the daily malware threat feed (CSV) (GET /v3.4/stream/threat-feed/malware) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamThreatFeedMalware +// Parameters for streamThreatFeedMalware (GET /v3.4/stream/threat-feed/malware): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamThreatFeedMalware { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamThreatFeedMalware(date, offset, limit); null leaves an optional parameter unset + String result = api.streamThreatFeedMalware(LocalDate.of(2026, 10, 1), null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamThreatFeedMalwareSample.java b/examples/java/StreamThreatFeedMalwareSample.java new file mode 100644 index 0000000..c0ab303 --- /dev/null +++ b/examples/java/StreamThreatFeedMalwareSample.java @@ -0,0 +1,20 @@ +// Runnable example: Stream a sample of the malware threat feed (CSV) (GET /v3.4/stream/threat-feed/malware/sample) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamThreatFeedMalwareSample +// Parameters for streamThreatFeedMalwareSample (GET /v3.4/stream/threat-feed/malware/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; + +public class StreamThreatFeedMalwareSample { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + // Public endpoint: no API key needed. + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamThreatFeedMalwareSample(offset, limit); null leaves an optional parameter unset + String result = api.streamThreatFeedMalwareSample(null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamThreatFeedPhishing.java b/examples/java/StreamThreatFeedPhishing.java new file mode 100644 index 0000000..34c65a9 --- /dev/null +++ b/examples/java/StreamThreatFeedPhishing.java @@ -0,0 +1,25 @@ +// Runnable example: Stream the daily phishing threat feed (CSV) (GET /v3.4/stream/threat-feed/phishing) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamThreatFeedPhishing +// Parameters for streamThreatFeedPhishing (GET /v3.4/stream/threat-feed/phishing): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamThreatFeedPhishing { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamThreatFeedPhishing(date, offset, limit); null leaves an optional parameter unset + String result = api.streamThreatFeedPhishing(LocalDate.of(2026, 10, 1), null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamThreatFeedPhishingSample.java b/examples/java/StreamThreatFeedPhishingSample.java new file mode 100644 index 0000000..c7a4df7 --- /dev/null +++ b/examples/java/StreamThreatFeedPhishingSample.java @@ -0,0 +1,20 @@ +// Runnable example: Stream a sample of the phishing threat feed (CSV) (GET /v3.4/stream/threat-feed/phishing/sample) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamThreatFeedPhishingSample +// Parameters for streamThreatFeedPhishingSample (GET /v3.4/stream/threat-feed/phishing/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; + +public class StreamThreatFeedPhishingSample { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + // Public endpoint: no API key needed. + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamThreatFeedPhishingSample(offset, limit); null leaves an optional parameter unset + String result = api.streamThreatFeedPhishingSample(null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamThreatFeedSpam.java b/examples/java/StreamThreatFeedSpam.java new file mode 100644 index 0000000..4def943 --- /dev/null +++ b/examples/java/StreamThreatFeedSpam.java @@ -0,0 +1,25 @@ +// Runnable example: Stream the daily spam threat feed (CSV) (GET /v3.4/stream/threat-feed/spam) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamThreatFeedSpam +// Parameters for streamThreatFeedSpam (GET /v3.4/stream/threat-feed/spam): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; +import com.whoisfreaks.client.auth.ApiKeyAuth; + +import java.time.LocalDate; + +public class StreamThreatFeedSpam { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + ApiKeyAuth auth = (ApiKeyAuth) client.getAuthentication("ApiKeyAuth"); + auth.setApiKey(System.getenv("WHOISFREAKS_API_KEY")); // set once, sent with every call + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamThreatFeedSpam(date, offset, limit); null leaves an optional parameter unset + String result = api.streamThreatFeedSpam(LocalDate.of(2026, 10, 1), null, null); + System.out.println(result); + } +} diff --git a/examples/java/StreamThreatFeedSpamSample.java b/examples/java/StreamThreatFeedSpamSample.java new file mode 100644 index 0000000..f0c51bc --- /dev/null +++ b/examples/java/StreamThreatFeedSpamSample.java @@ -0,0 +1,20 @@ +// Runnable example: Stream a sample of the spam threat feed (CSV) (GET /v3.4/stream/threat-feed/spam/sample) +// Run it from the Getting Started project: mvn -q compile exec:java -Dexec.mainClass=StreamThreatFeedSpamSample +// Parameters for streamThreatFeedSpamSample (GET /v3.4/stream/threat-feed/spam/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.ApiClient; +import com.whoisfreaks.client.Configuration; +import com.whoisfreaks.client.api.DatabasesStreamingApi; + +public class StreamThreatFeedSpamSample { + public static void main(String[] args) throws Exception { + ApiClient client = Configuration.getDefaultApiClient(); + // Public endpoint: no API key needed. + DatabasesStreamingApi api = new DatabasesStreamingApi(client); + + // streamThreatFeedSpamSample(offset, limit); null leaves an optional parameter unset + String result = api.streamThreatFeedSpamSample(null, null); + System.out.println(result); + } +} diff --git a/examples/javascript/BulkIpReputationV2.js b/examples/javascript/BulkIpReputationV2.js new file mode 100644 index 0000000..f92d52f --- /dev/null +++ b/examples/javascript/BulkIpReputationV2.js @@ -0,0 +1,22 @@ +// Bulk IP Reputation (v2.0): POST https://api.whoisfreaks.com/v2.0/security +// Run: WHOISFREAKS_API_KEY=your_api_key node BulkIpReputationV2.js +const { ApiClient, IPReputationApi, BulkGeolocationRequest } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new IPReputationApi(client); + +// bulkIpReputationV2(bulkGeolocationRequest) +// bulkGeolocationRequest (BulkGeolocationRequest, required): request body +async function main() { + const body = BulkGeolocationRequest.constructFromObject({ ips: ["1.1.1.1", "2.2.2.2", "8.8.8.8"] }); + const results = await api.bulkIpReputationV2(body); + console.log(JSON.stringify(results, null, 2)); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/DnsHistoricalV22.js b/examples/javascript/DnsHistoricalV22.js new file mode 100644 index 0000000..3f34adb --- /dev/null +++ b/examples/javascript/DnsHistoricalV22.js @@ -0,0 +1,26 @@ +// Historical DNS Lookup (v2.2): GET https://api.whoisfreaks.com/v2.2/dns/historical +// Run: WHOISFREAKS_API_KEY=your_api_key node DnsHistoricalV22.js +const { ApiClient, DNSApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DNSApi(client); + +// dnsHistoricalV22(domainName, type, opts) +// domainName (string, required) +// type (string, required): default "all" +// opts.page (number, optional): default 1 +// opts.sort (string, optional): Sort direction. Omit to leave the results unsorted; one of asc, desc +// opts.sortBy (string, optional): Field to sort on. Only applies when sort is given; one of firstSeen, lastSeen; default "lastSeen" +// opts.format (string, optional): one of json, xml; default "json" +async function main() { + const result = await api.dnsHistoricalV22("whoisfreaks.com", "A,MX,TXT", { page: 1 }); + console.log(JSON.stringify(result, null, 2)); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/DnsHistoricalV23.js b/examples/javascript/DnsHistoricalV23.js new file mode 100644 index 0000000..72564c5 --- /dev/null +++ b/examples/javascript/DnsHistoricalV23.js @@ -0,0 +1,26 @@ +// Historical DNS Lookup (v2.3): GET https://api.whoisfreaks.com/v2.3/dns/historical +// Run: WHOISFREAKS_API_KEY=your_api_key node DnsHistoricalV23.js +const { ApiClient, DNSApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DNSApi(client); + +// dnsHistoricalV23(domainName, type, opts) +// domainName (string, required) +// type (string, required): default "all" +// opts.page (number, optional): default 1 +// opts.sort (string, optional): Sort direction. Omit to leave the results unsorted; one of asc, desc +// opts.sortBy (string, optional): Field to sort on. Only applies when sort is given; one of firstSeen, lastSeen; default "lastSeen" +// opts.format (string, optional): one of json, xml; default "json" +async function main() { + const result = await api.dnsHistoricalV23("whoisfreaks.com", "A,MX,TXT", { page: 1 }); + console.log(JSON.stringify(result, null, 2)); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/DnsReverseV22.js b/examples/javascript/DnsReverseV22.js new file mode 100644 index 0000000..f3ae069 --- /dev/null +++ b/examples/javascript/DnsReverseV22.js @@ -0,0 +1,27 @@ +// Reverse DNS Lookup (v2.2): GET https://api.whoisfreaks.com/v2.2/dns/reverse +// Run: WHOISFREAKS_API_KEY=your_api_key node DnsReverseV22.js +const { ApiClient, DNSApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DNSApi(client); + +// dnsReverseV22(value, type, opts) +// value (string, required): IP, CIDR, or record value +// type (string, required): one of a, mx, cname, ns, aaaa, txt, soa +// opts.exact (boolean, optional): When false the value is matched as a substring, which is far slower than an e...; default true +// opts.page (number, optional): default 1 +// opts.sort (string, optional): Sort direction. Omit to leave the results unsorted; one of asc, desc +// opts.sortBy (string, optional): Field to sort on. Only applies when sort is given; one of firstSeen, lastSeen; default "lastSeen" +// opts.format (string, optional): one of json, xml; default "json" +async function main() { + const result = await api.dnsReverseV22("8.8.8.8", "a", { page: 1 }); + console.log(JSON.stringify(result, null, 2)); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/DnsReverseV23.js b/examples/javascript/DnsReverseV23.js new file mode 100644 index 0000000..04548bf --- /dev/null +++ b/examples/javascript/DnsReverseV23.js @@ -0,0 +1,27 @@ +// Reverse DNS Lookup (v2.3): GET https://api.whoisfreaks.com/v2.3/dns/reverse +// Run: WHOISFREAKS_API_KEY=your_api_key node DnsReverseV23.js +const { ApiClient, DNSApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DNSApi(client); + +// dnsReverseV23(value, type, opts) +// value (string, required): IP, CIDR, or record value +// type (string, required): one of a, mx, cname, ns, aaaa, txt, soa +// opts.exact (boolean, optional): When false the value is matched as a substring, which is far slower than an e...; default true +// opts.page (number, optional): default 1 +// opts.sort (string, optional): Sort direction. Omit to leave the results unsorted; one of asc, desc +// opts.sortBy (string, optional): Field to sort on. Only applies when sort is given; one of firstSeen, lastSeen; default "lastSeen" +// opts.format (string, optional): one of json, xml; default "json" +async function main() { + const result = await api.dnsReverseV23("8.8.8.8", "a", { page: 1 }); + console.log(JSON.stringify(result, null, 2)); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/IpReputationV2.js b/examples/javascript/IpReputationV2.js new file mode 100644 index 0000000..f9203c6 --- /dev/null +++ b/examples/javascript/IpReputationV2.js @@ -0,0 +1,21 @@ +// IP Reputation Lookup (v2.0): GET https://api.whoisfreaks.com/v2.0/security +// Run: WHOISFREAKS_API_KEY=your_api_key node IpReputationV2.js +const { ApiClient, IPReputationApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new IPReputationApi(client); + +// ipReputationV2(ip) +// ip (string, required) +async function main() { + const result = await api.ipReputationV2("8.8.8.8"); + console.log(JSON.stringify(result, null, 2)); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/README.md b/examples/javascript/README.md index 4c57d9b..4277695 100644 --- a/examples/javascript/README.md +++ b/examples/javascript/README.md @@ -12,6 +12,10 @@ Install: see the [JavaScript guide](../../docs/languages/javascript.md). Set the - [`DnsLive.js`](DnsLive.js): Live DNS Lookup (`GET /v2.0/dns/live`) - [`DnsHistorical.js`](DnsHistorical.js): Historical DNS Lookup (`GET /v2.0/dns/historical`) - [`DnsReverse.js`](DnsReverse.js): Reverse DNS Lookup (`GET /v2.1/dns/reverse`) +- [`DnsHistoricalV22.js`](DnsHistoricalV22.js): Historical DNS Lookup (v2.2) (`GET /v2.2/dns/historical`) +- [`DnsHistoricalV23.js`](DnsHistoricalV23.js): Historical DNS Lookup (v2.3) (`GET /v2.3/dns/historical`) +- [`DnsReverseV22.js`](DnsReverseV22.js): Reverse DNS Lookup (v2.2) (`GET /v2.2/dns/reverse`) +- [`DnsReverseV23.js`](DnsReverseV23.js): Reverse DNS Lookup (v2.3) (`GET /v2.3/dns/reverse`) - [`DnsBulk.js`](DnsBulk.js): Bulk DNS Lookup (`POST /v2.0/dns/bulk/live`) ## Domain Availability @@ -34,6 +38,8 @@ Install: see the [JavaScript guide](../../docs/languages/javascript.md). Set the ## IP Reputation - [`IpReputation.js`](IpReputation.js): IP Reputation Lookup (`GET /v1.0/security`) - [`BulkIpReputation.js`](BulkIpReputation.js): Bulk IP Reputation (`POST /v1.0/security`) +- [`IpReputationV2.js`](IpReputationV2.js): IP Reputation Lookup (v2.0) (`GET /v2.0/security`) +- [`BulkIpReputationV2.js`](BulkIpReputationV2.js): Bulk IP Reputation (v2.0) (`POST /v2.0/security`) ## Domain Reputation - [`DomainReputation.js`](DomainReputation.js): Domain Reputation Lookup (`GET /v1/domain/security`) @@ -105,3 +111,33 @@ Install: see the [JavaScript guide](../../docs/languages/javascript.md). Set the - [`DownloadThreatFeedMalwareSample.js`](DownloadThreatFeedMalwareSample.js): Download a sample of the malware threat feed (CSV) (`GET /v3.4/download/threat-feed/malware/sample`) - [`DownloadThreatFeedSpam.js`](DownloadThreatFeedSpam.js): Download the daily spam threat feed (CSV) (`GET /v3.4/download/threat-feed/spam`) - [`DownloadThreatFeedSpamSample.js`](DownloadThreatFeedSpamSample.js): Download a sample of the spam threat feed (CSV) (`GET /v3.4/download/threat-feed/spam/sample`) + +## Databases - Streaming +- [`StreamThreatFeedPhishing.js`](StreamThreatFeedPhishing.js): Stream the daily phishing threat feed (CSV) (`GET /v3.4/stream/threat-feed/phishing`) +- [`StreamThreatFeedPhishingSample.js`](StreamThreatFeedPhishingSample.js): Stream a sample of the phishing threat feed (CSV) (`GET /v3.4/stream/threat-feed/phishing/sample`) +- [`StreamThreatFeedMalware.js`](StreamThreatFeedMalware.js): Stream the daily malware threat feed (CSV) (`GET /v3.4/stream/threat-feed/malware`) +- [`StreamThreatFeedMalwareSample.js`](StreamThreatFeedMalwareSample.js): Stream a sample of the malware threat feed (CSV) (`GET /v3.4/stream/threat-feed/malware/sample`) +- [`StreamThreatFeedSpam.js`](StreamThreatFeedSpam.js): Stream the daily spam threat feed (CSV) (`GET /v3.4/stream/threat-feed/spam`) +- [`StreamThreatFeedSpamSample.js`](StreamThreatFeedSpamSample.js): Stream a sample of the spam threat feed (CSV) (`GET /v3.4/stream/threat-feed/spam/sample`) +- [`StreamDomainerGtld.js`](StreamDomainerGtld.js): Stream newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/gtld`) +- [`StreamDomainerGtldCleaned.js`](StreamDomainerGtldCleaned.js): Stream cleaned newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned`) +- [`StreamDomainerGtldCleanedEmail.js`](StreamDomainerGtldCleanedEmail.js): Stream cleaned newly registered gTLD domains with an email (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned/email`) +- [`StreamDomainerGtldCleanedPhone.js`](StreamDomainerGtldCleanedPhone.js): Stream cleaned newly registered gTLD domains with a phone (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned/phone`) +- [`StreamDomainerCctld.js`](StreamDomainerCctld.js): Stream newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/cctld`) +- [`StreamDomainerCctldCleaned.js`](StreamDomainerCctldCleaned.js): Stream cleaned newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned`) +- [`StreamDomainerCctldCleanedEmail.js`](StreamDomainerCctldCleanedEmail.js): Stream cleaned newly registered ccTLD domains with an email (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned/email`) +- [`StreamDomainerCctldCleanedPhone.js`](StreamDomainerCctldCleanedPhone.js): Stream cleaned newly registered ccTLD domains with a phone (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned/phone`) +- [`StreamDomainerExpired.js`](StreamDomainerExpired.js): Stream expiring domains (CSV) (`GET /v3.3/stream/domainer/expired`) +- [`StreamDomainerExpiredCleaned.js`](StreamDomainerExpiredCleaned.js): Stream cleaned expiring domains (CSV) (`GET /v3.3/stream/domainer/expired/cleaned`) +- [`StreamDomainerExpiredCleanedEmail.js`](StreamDomainerExpiredCleanedEmail.js): Stream cleaned expiring domains with an email (CSV) (`GET /v3.3/stream/domainer/expired/cleaned/email`) +- [`StreamDomainerExpiredCleanedPhone.js`](StreamDomainerExpiredCleanedPhone.js): Stream cleaned expiring domains with a phone (CSV) (`GET /v3.3/stream/domainer/expired/cleaned/phone`) +- [`StreamDomainerDropped.js`](StreamDomainerDropped.js): Stream dropped domains (CSV) (`GET /v3.3/stream/domainer/dropped`) +- [`StreamDomainerDroppedBacklinks.js`](StreamDomainerDroppedBacklinks.js): Stream dropped domains with backlinks (CSV) (`GET /v3.3/stream/domainer/dropped/backlinks`) +- [`StreamDomainerGtldSample.js`](StreamDomainerGtldSample.js): Stream a sample of newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/gtld`) +- [`StreamDomainerGtldCleanedSample.js`](StreamDomainerGtldCleanedSample.js): Stream a sample of cleaned newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/gtld/cleaned`) +- [`StreamDomainerCctldSample.js`](StreamDomainerCctldSample.js): Stream a sample of newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/cctld`) +- [`StreamDomainerCctldCleanedSample.js`](StreamDomainerCctldCleanedSample.js): Stream a sample of cleaned newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/cctld/cleaned`) +- [`StreamDomainerExpiredSample.js`](StreamDomainerExpiredSample.js): Stream a sample of expiring domains (CSV) (`GET /v3.3/stream/domainer/sample/expired`) +- [`StreamDomainerExpiredCleanedSample.js`](StreamDomainerExpiredCleanedSample.js): Stream a sample of cleaned expiring domains (CSV) (`GET /v3.3/stream/domainer/sample/expired/cleaned`) +- [`StreamDomainerDroppedSample.js`](StreamDomainerDroppedSample.js): Stream a sample of dropped domains (CSV) (`GET /v3.3/stream/domainer/sample/dropped`) +- [`StreamDomainerDroppedBacklinksSample.js`](StreamDomainerDroppedBacklinksSample.js): Stream a sample of dropped domains with backlinks (CSV) (`GET /v3.3/stream/domainer/sample/dropped/backlinks`) diff --git a/examples/javascript/StreamDomainerCctld.js b/examples/javascript/StreamDomainerCctld.js new file mode 100644 index 0000000..381a31a --- /dev/null +++ b/examples/javascript/StreamDomainerCctld.js @@ -0,0 +1,24 @@ +// Stream newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerCctld.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerCctld(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerCctld("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamDomainerCctldCleaned.js b/examples/javascript/StreamDomainerCctldCleaned.js new file mode 100644 index 0000000..2c3422b --- /dev/null +++ b/examples/javascript/StreamDomainerCctldCleaned.js @@ -0,0 +1,24 @@ +// Stream cleaned newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerCctldCleaned.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerCctldCleaned(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerCctldCleaned("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamDomainerCctldCleanedEmail.js b/examples/javascript/StreamDomainerCctldCleanedEmail.js new file mode 100644 index 0000000..90e21f5 --- /dev/null +++ b/examples/javascript/StreamDomainerCctldCleanedEmail.js @@ -0,0 +1,24 @@ +// Stream cleaned newly registered ccTLD domains with an email (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned/email +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerCctldCleanedEmail.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerCctldCleanedEmail(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerCctldCleanedEmail("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamDomainerCctldCleanedPhone.js b/examples/javascript/StreamDomainerCctldCleanedPhone.js new file mode 100644 index 0000000..205568c --- /dev/null +++ b/examples/javascript/StreamDomainerCctldCleanedPhone.js @@ -0,0 +1,24 @@ +// Stream cleaned newly registered ccTLD domains with a phone (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned/phone +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerCctldCleanedPhone.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerCctldCleanedPhone(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerCctldCleanedPhone("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamDomainerCctldCleanedSample.js b/examples/javascript/StreamDomainerCctldCleanedSample.js new file mode 100644 index 0000000..92f2e3e --- /dev/null +++ b/examples/javascript/StreamDomainerCctldCleanedSample.js @@ -0,0 +1,21 @@ +// Stream a sample of cleaned newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/cctld/cleaned +// Run (public endpoint, no API key needed): node StreamDomainerCctldCleanedSample.js +const { DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerCctldCleanedSample(opts) +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerCctldCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamDomainerCctldSample.js b/examples/javascript/StreamDomainerCctldSample.js new file mode 100644 index 0000000..1c600f7 --- /dev/null +++ b/examples/javascript/StreamDomainerCctldSample.js @@ -0,0 +1,21 @@ +// Stream a sample of newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/cctld +// Run (public endpoint, no API key needed): node StreamDomainerCctldSample.js +const { DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerCctldSample(opts) +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerCctldSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamDomainerDropped.js b/examples/javascript/StreamDomainerDropped.js new file mode 100644 index 0000000..e08096c --- /dev/null +++ b/examples/javascript/StreamDomainerDropped.js @@ -0,0 +1,24 @@ +// Stream dropped domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/dropped +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerDropped.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerDropped(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerDropped("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamDomainerDroppedBacklinks.js b/examples/javascript/StreamDomainerDroppedBacklinks.js new file mode 100644 index 0000000..7b5b628 --- /dev/null +++ b/examples/javascript/StreamDomainerDroppedBacklinks.js @@ -0,0 +1,24 @@ +// Stream dropped domains with backlinks (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/dropped/backlinks +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerDroppedBacklinks.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerDroppedBacklinks(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerDroppedBacklinks("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamDomainerDroppedBacklinksSample.js b/examples/javascript/StreamDomainerDroppedBacklinksSample.js new file mode 100644 index 0000000..a49cca2 --- /dev/null +++ b/examples/javascript/StreamDomainerDroppedBacklinksSample.js @@ -0,0 +1,21 @@ +// Stream a sample of dropped domains with backlinks (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/dropped/backlinks +// Run (public endpoint, no API key needed): node StreamDomainerDroppedBacklinksSample.js +const { DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerDroppedBacklinksSample(opts) +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerDroppedBacklinksSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamDomainerDroppedSample.js b/examples/javascript/StreamDomainerDroppedSample.js new file mode 100644 index 0000000..9493e09 --- /dev/null +++ b/examples/javascript/StreamDomainerDroppedSample.js @@ -0,0 +1,21 @@ +// Stream a sample of dropped domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/dropped +// Run (public endpoint, no API key needed): node StreamDomainerDroppedSample.js +const { DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerDroppedSample(opts) +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerDroppedSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamDomainerExpired.js b/examples/javascript/StreamDomainerExpired.js new file mode 100644 index 0000000..cf4bd60 --- /dev/null +++ b/examples/javascript/StreamDomainerExpired.js @@ -0,0 +1,24 @@ +// Stream expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerExpired.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerExpired(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerExpired("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamDomainerExpiredCleaned.js b/examples/javascript/StreamDomainerExpiredCleaned.js new file mode 100644 index 0000000..2571dbb --- /dev/null +++ b/examples/javascript/StreamDomainerExpiredCleaned.js @@ -0,0 +1,24 @@ +// Stream cleaned expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerExpiredCleaned.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerExpiredCleaned(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerExpiredCleaned("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamDomainerExpiredCleanedEmail.js b/examples/javascript/StreamDomainerExpiredCleanedEmail.js new file mode 100644 index 0000000..d3dae62 --- /dev/null +++ b/examples/javascript/StreamDomainerExpiredCleanedEmail.js @@ -0,0 +1,24 @@ +// Stream cleaned expiring domains with an email (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned/email +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerExpiredCleanedEmail.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerExpiredCleanedEmail(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerExpiredCleanedEmail("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamDomainerExpiredCleanedPhone.js b/examples/javascript/StreamDomainerExpiredCleanedPhone.js new file mode 100644 index 0000000..a201dde --- /dev/null +++ b/examples/javascript/StreamDomainerExpiredCleanedPhone.js @@ -0,0 +1,24 @@ +// Stream cleaned expiring domains with a phone (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned/phone +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerExpiredCleanedPhone.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerExpiredCleanedPhone(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerExpiredCleanedPhone("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamDomainerExpiredCleanedSample.js b/examples/javascript/StreamDomainerExpiredCleanedSample.js new file mode 100644 index 0000000..2a42f42 --- /dev/null +++ b/examples/javascript/StreamDomainerExpiredCleanedSample.js @@ -0,0 +1,21 @@ +// Stream a sample of cleaned expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/expired/cleaned +// Run (public endpoint, no API key needed): node StreamDomainerExpiredCleanedSample.js +const { DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerExpiredCleanedSample(opts) +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerExpiredCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamDomainerExpiredSample.js b/examples/javascript/StreamDomainerExpiredSample.js new file mode 100644 index 0000000..9ce5140 --- /dev/null +++ b/examples/javascript/StreamDomainerExpiredSample.js @@ -0,0 +1,21 @@ +// Stream a sample of expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/expired +// Run (public endpoint, no API key needed): node StreamDomainerExpiredSample.js +const { DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerExpiredSample(opts) +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerExpiredSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamDomainerGtld.js b/examples/javascript/StreamDomainerGtld.js new file mode 100644 index 0000000..265e6cc --- /dev/null +++ b/examples/javascript/StreamDomainerGtld.js @@ -0,0 +1,24 @@ +// Stream newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerGtld.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerGtld(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerGtld("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamDomainerGtldCleaned.js b/examples/javascript/StreamDomainerGtldCleaned.js new file mode 100644 index 0000000..ec25501 --- /dev/null +++ b/examples/javascript/StreamDomainerGtldCleaned.js @@ -0,0 +1,24 @@ +// Stream cleaned newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerGtldCleaned.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerGtldCleaned(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerGtldCleaned("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamDomainerGtldCleanedEmail.js b/examples/javascript/StreamDomainerGtldCleanedEmail.js new file mode 100644 index 0000000..176417e --- /dev/null +++ b/examples/javascript/StreamDomainerGtldCleanedEmail.js @@ -0,0 +1,24 @@ +// Stream cleaned newly registered gTLD domains with an email (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned/email +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerGtldCleanedEmail.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerGtldCleanedEmail(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerGtldCleanedEmail("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamDomainerGtldCleanedPhone.js b/examples/javascript/StreamDomainerGtldCleanedPhone.js new file mode 100644 index 0000000..8d3e8e7 --- /dev/null +++ b/examples/javascript/StreamDomainerGtldCleanedPhone.js @@ -0,0 +1,24 @@ +// Stream cleaned newly registered gTLD domains with a phone (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned/phone +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamDomainerGtldCleanedPhone.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamDomainerGtldCleanedPhone(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerGtldCleanedPhone("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamDomainerGtldCleanedSample.js b/examples/javascript/StreamDomainerGtldCleanedSample.js new file mode 100644 index 0000000..6b070f6 --- /dev/null +++ b/examples/javascript/StreamDomainerGtldCleanedSample.js @@ -0,0 +1,21 @@ +// Stream a sample of cleaned newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/gtld/cleaned +// Run (public endpoint, no API key needed): node StreamDomainerGtldCleanedSample.js +const { DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerGtldCleanedSample(opts) +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerGtldCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamDomainerGtldSample.js b/examples/javascript/StreamDomainerGtldSample.js new file mode 100644 index 0000000..30cf555 --- /dev/null +++ b/examples/javascript/StreamDomainerGtldSample.js @@ -0,0 +1,21 @@ +// Stream a sample of newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/gtld +// Run (public endpoint, no API key needed): node StreamDomainerGtldSample.js +const { DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerGtldSample(opts) +// opts.whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamDomainerGtldSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamThreatFeedMalware.js b/examples/javascript/StreamThreatFeedMalware.js new file mode 100644 index 0000000..867baf8 --- /dev/null +++ b/examples/javascript/StreamThreatFeedMalware.js @@ -0,0 +1,23 @@ +// Stream the daily malware threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/malware +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamThreatFeedMalware.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamThreatFeedMalware(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamThreatFeedMalware("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamThreatFeedMalwareSample.js b/examples/javascript/StreamThreatFeedMalwareSample.js new file mode 100644 index 0000000..dacce61 --- /dev/null +++ b/examples/javascript/StreamThreatFeedMalwareSample.js @@ -0,0 +1,20 @@ +// Stream a sample of the malware threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/malware/sample +// Run (public endpoint, no API key needed): node StreamThreatFeedMalwareSample.js +const { DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamThreatFeedMalwareSample(opts) +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamThreatFeedMalwareSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamThreatFeedPhishing.js b/examples/javascript/StreamThreatFeedPhishing.js new file mode 100644 index 0000000..a2758a1 --- /dev/null +++ b/examples/javascript/StreamThreatFeedPhishing.js @@ -0,0 +1,23 @@ +// Stream the daily phishing threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/phishing +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamThreatFeedPhishing.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamThreatFeedPhishing(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamThreatFeedPhishing("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamThreatFeedPhishingSample.js b/examples/javascript/StreamThreatFeedPhishingSample.js new file mode 100644 index 0000000..50199f5 --- /dev/null +++ b/examples/javascript/StreamThreatFeedPhishingSample.js @@ -0,0 +1,20 @@ +// Stream a sample of the phishing threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/phishing/sample +// Run (public endpoint, no API key needed): node StreamThreatFeedPhishingSample.js +const { DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamThreatFeedPhishingSample(opts) +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamThreatFeedPhishingSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamThreatFeedSpam.js b/examples/javascript/StreamThreatFeedSpam.js new file mode 100644 index 0000000..0dc1a13 --- /dev/null +++ b/examples/javascript/StreamThreatFeedSpam.js @@ -0,0 +1,23 @@ +// Stream the daily spam threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/spam +// Run: WHOISFREAKS_API_KEY=your_api_key node StreamThreatFeedSpam.js +const { ApiClient, DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Set the API key once; the client adds it to every request. +const client = ApiClient.instance; +client.authentications["ApiKeyAuth"].apiKey = process.env.WHOISFREAKS_API_KEY; +const api = new DatabasesStreamingApi(client); + +// streamThreatFeedSpam(date, opts) +// date (string, "yyyy-MM-dd", required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamThreatFeedSpam("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/javascript/StreamThreatFeedSpamSample.js b/examples/javascript/StreamThreatFeedSpamSample.js new file mode 100644 index 0000000..3502327 --- /dev/null +++ b/examples/javascript/StreamThreatFeedSpamSample.js @@ -0,0 +1,20 @@ +// Stream a sample of the spam threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/spam/sample +// Run (public endpoint, no API key needed): node StreamThreatFeedSpamSample.js +const { DatabasesStreamingApi } = require("whoisfreaks-js"); + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamThreatFeedSpamSample(opts) +// opts.offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// opts.limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main() { + const csvText = await api.streamThreatFeedSpamSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch((err) => { + // API errors carry the HTTP status and the parsed error body + console.error(err.status ? `HTTP ${err.status}: ${JSON.stringify(err.body)}` : err); + process.exitCode = 1; +}); diff --git a/examples/kotlin/BulkIpReputationV2.kt b/examples/kotlin/BulkIpReputationV2.kt new file mode 100644 index 0000000..f0a739f --- /dev/null +++ b/examples/kotlin/BulkIpReputationV2.kt @@ -0,0 +1,16 @@ +// Runnable example: Bulk IP Reputation (v2.0) (POST /v2.0/security) +// Run it from the Getting Started project: gradle run -PmainClass=BulkIpReputationV2Kt +// Parameters for bulkIpReputationV2 (POST /v2.0/security): +// - body: BulkGeolocationRequest (required): request body object +import com.whoisfreaks.client.apis.IPReputationApi +import com.whoisfreaks.client.infrastructure.ApiClient +import com.whoisfreaks.client.models.BulkGeolocationRequest + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = IPReputationApi() + + val body = BulkGeolocationRequest(ips = listOf("1.1.1.1", "2.2.2.2", "8.8.8.8")) + val result = api.bulkIpReputationV2(body) + println(result) +} diff --git a/examples/kotlin/DnsHistoricalV22.kt b/examples/kotlin/DnsHistoricalV22.kt new file mode 100644 index 0000000..19aa1d7 --- /dev/null +++ b/examples/kotlin/DnsHistoricalV22.kt @@ -0,0 +1,19 @@ +// Runnable example: Historical DNS Lookup (v2.2) (GET /v2.2/dns/historical) +// Run it from the Getting Started project: gradle run -PmainClass=DnsHistoricalV22Kt +// Parameters for dnsHistoricalV22 (GET /v2.2/dns/historical): +// - domainName (string, required) +// - type (string, required) +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +import com.whoisfreaks.client.apis.DNSApi +import com.whoisfreaks.client.infrastructure.ApiClient + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DNSApi() + + val result = api.dnsHistoricalV22("whoisfreaks.com", "A,MX,TXT", page = 1) + println(result) +} diff --git a/examples/kotlin/DnsHistoricalV23.kt b/examples/kotlin/DnsHistoricalV23.kt new file mode 100644 index 0000000..ef0e22b --- /dev/null +++ b/examples/kotlin/DnsHistoricalV23.kt @@ -0,0 +1,19 @@ +// Runnable example: Historical DNS Lookup (v2.3) (GET /v2.3/dns/historical) +// Run it from the Getting Started project: gradle run -PmainClass=DnsHistoricalV23Kt +// Parameters for dnsHistoricalV23 (GET /v2.3/dns/historical): +// - domainName (string, required) +// - type (string, required) +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +import com.whoisfreaks.client.apis.DNSApi +import com.whoisfreaks.client.infrastructure.ApiClient + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DNSApi() + + val result = api.dnsHistoricalV23("whoisfreaks.com", "A,MX,TXT", page = 1) + println(result) +} diff --git a/examples/kotlin/DnsReverseV22.kt b/examples/kotlin/DnsReverseV22.kt new file mode 100644 index 0000000..1544b13 --- /dev/null +++ b/examples/kotlin/DnsReverseV22.kt @@ -0,0 +1,20 @@ +// Runnable example: Reverse DNS Lookup (v2.2) (GET /v2.2/dns/reverse) +// Run it from the Getting Started project: gradle run -PmainClass=DnsReverseV22Kt +// Parameters for dnsReverseV22 (GET /v2.2/dns/reverse): +// - value (string, required): IP, CIDR, or record value +// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required) +// - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match... +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +import com.whoisfreaks.client.apis.DNSApi +import com.whoisfreaks.client.infrastructure.ApiClient + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DNSApi() + + val result = api.dnsReverseV22("8.8.8.8", DNSApi.TypeDnsReverseV22.a, page = 1) + println(result) +} diff --git a/examples/kotlin/DnsReverseV23.kt b/examples/kotlin/DnsReverseV23.kt new file mode 100644 index 0000000..b1baf32 --- /dev/null +++ b/examples/kotlin/DnsReverseV23.kt @@ -0,0 +1,20 @@ +// Runnable example: Reverse DNS Lookup (v2.3) (GET /v2.3/dns/reverse) +// Run it from the Getting Started project: gradle run -PmainClass=DnsReverseV23Kt +// Parameters for dnsReverseV23 (GET /v2.3/dns/reverse): +// - value (string, required): IP, CIDR, or record value +// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required) +// - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match... +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +import com.whoisfreaks.client.apis.DNSApi +import com.whoisfreaks.client.infrastructure.ApiClient + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DNSApi() + + val result = api.dnsReverseV23("8.8.8.8", DNSApi.TypeDnsReverseV23.a, page = 1) + println(result) +} diff --git a/examples/kotlin/IpReputationV2.kt b/examples/kotlin/IpReputationV2.kt new file mode 100644 index 0000000..7bf8100 --- /dev/null +++ b/examples/kotlin/IpReputationV2.kt @@ -0,0 +1,14 @@ +// Runnable example: IP Reputation Lookup (v2.0) (GET /v2.0/security) +// Run it from the Getting Started project: gradle run -PmainClass=IpReputationV2Kt +// Parameters for ipReputationV2 (GET /v2.0/security): +// - ip (string, required) +import com.whoisfreaks.client.apis.IPReputationApi +import com.whoisfreaks.client.infrastructure.ApiClient + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = IPReputationApi() + + val result = api.ipReputationV2("8.8.8.8") + println(result) +} diff --git a/examples/kotlin/README.md b/examples/kotlin/README.md index 69064d1..1e7a6d6 100644 --- a/examples/kotlin/README.md +++ b/examples/kotlin/README.md @@ -12,6 +12,10 @@ Install: see the [Kotlin guide](../../docs/languages/kotlin.md). Set the `WHOISF - [`DnsLive.kt`](DnsLive.kt): Live DNS Lookup (`GET /v2.0/dns/live`) - [`DnsHistorical.kt`](DnsHistorical.kt): Historical DNS Lookup (`GET /v2.0/dns/historical`) - [`DnsReverse.kt`](DnsReverse.kt): Reverse DNS Lookup (`GET /v2.1/dns/reverse`) +- [`DnsHistoricalV22.kt`](DnsHistoricalV22.kt): Historical DNS Lookup (v2.2) (`GET /v2.2/dns/historical`) +- [`DnsHistoricalV23.kt`](DnsHistoricalV23.kt): Historical DNS Lookup (v2.3) (`GET /v2.3/dns/historical`) +- [`DnsReverseV22.kt`](DnsReverseV22.kt): Reverse DNS Lookup (v2.2) (`GET /v2.2/dns/reverse`) +- [`DnsReverseV23.kt`](DnsReverseV23.kt): Reverse DNS Lookup (v2.3) (`GET /v2.3/dns/reverse`) - [`DnsBulk.kt`](DnsBulk.kt): Bulk DNS Lookup (`POST /v2.0/dns/bulk/live`) ## Domain Availability @@ -34,6 +38,8 @@ Install: see the [Kotlin guide](../../docs/languages/kotlin.md). Set the `WHOISF ## IP Reputation - [`IpReputation.kt`](IpReputation.kt): IP Reputation Lookup (`GET /v1.0/security`) - [`BulkIpReputation.kt`](BulkIpReputation.kt): Bulk IP Reputation (`POST /v1.0/security`) +- [`IpReputationV2.kt`](IpReputationV2.kt): IP Reputation Lookup (v2.0) (`GET /v2.0/security`) +- [`BulkIpReputationV2.kt`](BulkIpReputationV2.kt): Bulk IP Reputation (v2.0) (`POST /v2.0/security`) ## Domain Reputation - [`DomainReputation.kt`](DomainReputation.kt): Domain Reputation Lookup (`GET /v1/domain/security`) @@ -105,3 +111,33 @@ Install: see the [Kotlin guide](../../docs/languages/kotlin.md). Set the `WHOISF - [`DownloadThreatFeedMalwareSample.kt`](DownloadThreatFeedMalwareSample.kt): Download a sample of the malware threat feed (CSV) (`GET /v3.4/download/threat-feed/malware/sample`) - [`DownloadThreatFeedSpam.kt`](DownloadThreatFeedSpam.kt): Download the daily spam threat feed (CSV) (`GET /v3.4/download/threat-feed/spam`) - [`DownloadThreatFeedSpamSample.kt`](DownloadThreatFeedSpamSample.kt): Download a sample of the spam threat feed (CSV) (`GET /v3.4/download/threat-feed/spam/sample`) + +## Databases - Streaming +- [`StreamThreatFeedPhishing.kt`](StreamThreatFeedPhishing.kt): Stream the daily phishing threat feed (CSV) (`GET /v3.4/stream/threat-feed/phishing`) +- [`StreamThreatFeedPhishingSample.kt`](StreamThreatFeedPhishingSample.kt): Stream a sample of the phishing threat feed (CSV) (`GET /v3.4/stream/threat-feed/phishing/sample`) +- [`StreamThreatFeedMalware.kt`](StreamThreatFeedMalware.kt): Stream the daily malware threat feed (CSV) (`GET /v3.4/stream/threat-feed/malware`) +- [`StreamThreatFeedMalwareSample.kt`](StreamThreatFeedMalwareSample.kt): Stream a sample of the malware threat feed (CSV) (`GET /v3.4/stream/threat-feed/malware/sample`) +- [`StreamThreatFeedSpam.kt`](StreamThreatFeedSpam.kt): Stream the daily spam threat feed (CSV) (`GET /v3.4/stream/threat-feed/spam`) +- [`StreamThreatFeedSpamSample.kt`](StreamThreatFeedSpamSample.kt): Stream a sample of the spam threat feed (CSV) (`GET /v3.4/stream/threat-feed/spam/sample`) +- [`StreamDomainerGtld.kt`](StreamDomainerGtld.kt): Stream newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/gtld`) +- [`StreamDomainerGtldCleaned.kt`](StreamDomainerGtldCleaned.kt): Stream cleaned newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned`) +- [`StreamDomainerGtldCleanedEmail.kt`](StreamDomainerGtldCleanedEmail.kt): Stream cleaned newly registered gTLD domains with an email (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned/email`) +- [`StreamDomainerGtldCleanedPhone.kt`](StreamDomainerGtldCleanedPhone.kt): Stream cleaned newly registered gTLD domains with a phone (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned/phone`) +- [`StreamDomainerCctld.kt`](StreamDomainerCctld.kt): Stream newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/cctld`) +- [`StreamDomainerCctldCleaned.kt`](StreamDomainerCctldCleaned.kt): Stream cleaned newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned`) +- [`StreamDomainerCctldCleanedEmail.kt`](StreamDomainerCctldCleanedEmail.kt): Stream cleaned newly registered ccTLD domains with an email (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned/email`) +- [`StreamDomainerCctldCleanedPhone.kt`](StreamDomainerCctldCleanedPhone.kt): Stream cleaned newly registered ccTLD domains with a phone (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned/phone`) +- [`StreamDomainerExpired.kt`](StreamDomainerExpired.kt): Stream expiring domains (CSV) (`GET /v3.3/stream/domainer/expired`) +- [`StreamDomainerExpiredCleaned.kt`](StreamDomainerExpiredCleaned.kt): Stream cleaned expiring domains (CSV) (`GET /v3.3/stream/domainer/expired/cleaned`) +- [`StreamDomainerExpiredCleanedEmail.kt`](StreamDomainerExpiredCleanedEmail.kt): Stream cleaned expiring domains with an email (CSV) (`GET /v3.3/stream/domainer/expired/cleaned/email`) +- [`StreamDomainerExpiredCleanedPhone.kt`](StreamDomainerExpiredCleanedPhone.kt): Stream cleaned expiring domains with a phone (CSV) (`GET /v3.3/stream/domainer/expired/cleaned/phone`) +- [`StreamDomainerDropped.kt`](StreamDomainerDropped.kt): Stream dropped domains (CSV) (`GET /v3.3/stream/domainer/dropped`) +- [`StreamDomainerDroppedBacklinks.kt`](StreamDomainerDroppedBacklinks.kt): Stream dropped domains with backlinks (CSV) (`GET /v3.3/stream/domainer/dropped/backlinks`) +- [`StreamDomainerGtldSample.kt`](StreamDomainerGtldSample.kt): Stream a sample of newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/gtld`) +- [`StreamDomainerGtldCleanedSample.kt`](StreamDomainerGtldCleanedSample.kt): Stream a sample of cleaned newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/gtld/cleaned`) +- [`StreamDomainerCctldSample.kt`](StreamDomainerCctldSample.kt): Stream a sample of newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/cctld`) +- [`StreamDomainerCctldCleanedSample.kt`](StreamDomainerCctldCleanedSample.kt): Stream a sample of cleaned newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/cctld/cleaned`) +- [`StreamDomainerExpiredSample.kt`](StreamDomainerExpiredSample.kt): Stream a sample of expiring domains (CSV) (`GET /v3.3/stream/domainer/sample/expired`) +- [`StreamDomainerExpiredCleanedSample.kt`](StreamDomainerExpiredCleanedSample.kt): Stream a sample of cleaned expiring domains (CSV) (`GET /v3.3/stream/domainer/sample/expired/cleaned`) +- [`StreamDomainerDroppedSample.kt`](StreamDomainerDroppedSample.kt): Stream a sample of dropped domains (CSV) (`GET /v3.3/stream/domainer/sample/dropped`) +- [`StreamDomainerDroppedBacklinksSample.kt`](StreamDomainerDroppedBacklinksSample.kt): Stream a sample of dropped domains with backlinks (CSV) (`GET /v3.3/stream/domainer/sample/dropped/backlinks`) diff --git a/examples/kotlin/StreamDomainerCctld.kt b/examples/kotlin/StreamDomainerCctld.kt new file mode 100644 index 0000000..ec4159b --- /dev/null +++ b/examples/kotlin/StreamDomainerCctld.kt @@ -0,0 +1,18 @@ +// Runnable example: Stream newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/cctld) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerCctldKt +// Parameters for streamDomainerCctld (GET /v3.3/stream/domainer/cctld): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerCctld(LocalDate.of(2026, 10, 1)) + println(result) +} diff --git a/examples/kotlin/StreamDomainerCctldCleaned.kt b/examples/kotlin/StreamDomainerCctldCleaned.kt new file mode 100644 index 0000000..b4dae2e --- /dev/null +++ b/examples/kotlin/StreamDomainerCctldCleaned.kt @@ -0,0 +1,18 @@ +// Runnable example: Stream cleaned newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/cctld/cleaned) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerCctldCleanedKt +// Parameters for streamDomainerCctldCleaned (GET /v3.3/stream/domainer/cctld/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerCctldCleaned(LocalDate.of(2026, 10, 1)) + println(result) +} diff --git a/examples/kotlin/StreamDomainerCctldCleanedEmail.kt b/examples/kotlin/StreamDomainerCctldCleanedEmail.kt new file mode 100644 index 0000000..49c192f --- /dev/null +++ b/examples/kotlin/StreamDomainerCctldCleanedEmail.kt @@ -0,0 +1,18 @@ +// Runnable example: Stream cleaned newly registered ccTLD domains with an email (CSV) (GET /v3.3/stream/domainer/cctld/cleaned/email) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerCctldCleanedEmailKt +// Parameters for streamDomainerCctldCleanedEmail (GET /v3.3/stream/domainer/cctld/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerCctldCleanedEmail(LocalDate.of(2026, 10, 1)) + println(result) +} diff --git a/examples/kotlin/StreamDomainerCctldCleanedPhone.kt b/examples/kotlin/StreamDomainerCctldCleanedPhone.kt new file mode 100644 index 0000000..ee40378 --- /dev/null +++ b/examples/kotlin/StreamDomainerCctldCleanedPhone.kt @@ -0,0 +1,18 @@ +// Runnable example: Stream cleaned newly registered ccTLD domains with a phone (CSV) (GET /v3.3/stream/domainer/cctld/cleaned/phone) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerCctldCleanedPhoneKt +// Parameters for streamDomainerCctldCleanedPhone (GET /v3.3/stream/domainer/cctld/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerCctldCleanedPhone(LocalDate.of(2026, 10, 1)) + println(result) +} diff --git a/examples/kotlin/StreamDomainerCctldCleanedSample.kt b/examples/kotlin/StreamDomainerCctldCleanedSample.kt new file mode 100644 index 0000000..a5b31b3 --- /dev/null +++ b/examples/kotlin/StreamDomainerCctldCleanedSample.kt @@ -0,0 +1,15 @@ +// Runnable example: Stream a sample of cleaned newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/sample/cctld/cleaned) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerCctldCleanedSampleKt +// Parameters for streamDomainerCctldCleanedSample (GET /v3.3/stream/domainer/sample/cctld/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi + +fun main() { + // Public endpoint: no API key needed. + val api = DatabasesStreamingApi() + + val result = api.streamDomainerCctldCleanedSample() + println(result) +} diff --git a/examples/kotlin/StreamDomainerCctldSample.kt b/examples/kotlin/StreamDomainerCctldSample.kt new file mode 100644 index 0000000..a15df28 --- /dev/null +++ b/examples/kotlin/StreamDomainerCctldSample.kt @@ -0,0 +1,15 @@ +// Runnable example: Stream a sample of newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/sample/cctld) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerCctldSampleKt +// Parameters for streamDomainerCctldSample (GET /v3.3/stream/domainer/sample/cctld): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi + +fun main() { + // Public endpoint: no API key needed. + val api = DatabasesStreamingApi() + + val result = api.streamDomainerCctldSample() + println(result) +} diff --git a/examples/kotlin/StreamDomainerDropped.kt b/examples/kotlin/StreamDomainerDropped.kt new file mode 100644 index 0000000..1b87668 --- /dev/null +++ b/examples/kotlin/StreamDomainerDropped.kt @@ -0,0 +1,18 @@ +// Runnable example: Stream dropped domains (CSV) (GET /v3.3/stream/domainer/dropped) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerDroppedKt +// Parameters for streamDomainerDropped (GET /v3.3/stream/domainer/dropped): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerDropped(LocalDate.of(2026, 10, 1)) + println(result) +} diff --git a/examples/kotlin/StreamDomainerDroppedBacklinks.kt b/examples/kotlin/StreamDomainerDroppedBacklinks.kt new file mode 100644 index 0000000..6545771 --- /dev/null +++ b/examples/kotlin/StreamDomainerDroppedBacklinks.kt @@ -0,0 +1,18 @@ +// Runnable example: Stream dropped domains with backlinks (CSV) (GET /v3.3/stream/domainer/dropped/backlinks) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerDroppedBacklinksKt +// Parameters for streamDomainerDroppedBacklinks (GET /v3.3/stream/domainer/dropped/backlinks): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerDroppedBacklinks(LocalDate.of(2026, 10, 1)) + println(result) +} diff --git a/examples/kotlin/StreamDomainerDroppedBacklinksSample.kt b/examples/kotlin/StreamDomainerDroppedBacklinksSample.kt new file mode 100644 index 0000000..68459b1 --- /dev/null +++ b/examples/kotlin/StreamDomainerDroppedBacklinksSample.kt @@ -0,0 +1,15 @@ +// Runnable example: Stream a sample of dropped domains with backlinks (CSV) (GET /v3.3/stream/domainer/sample/dropped/backlinks) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerDroppedBacklinksSampleKt +// Parameters for streamDomainerDroppedBacklinksSample (GET /v3.3/stream/domainer/sample/dropped/backlinks): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi + +fun main() { + // Public endpoint: no API key needed. + val api = DatabasesStreamingApi() + + val result = api.streamDomainerDroppedBacklinksSample() + println(result) +} diff --git a/examples/kotlin/StreamDomainerDroppedSample.kt b/examples/kotlin/StreamDomainerDroppedSample.kt new file mode 100644 index 0000000..f03f038 --- /dev/null +++ b/examples/kotlin/StreamDomainerDroppedSample.kt @@ -0,0 +1,15 @@ +// Runnable example: Stream a sample of dropped domains (CSV) (GET /v3.3/stream/domainer/sample/dropped) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerDroppedSampleKt +// Parameters for streamDomainerDroppedSample (GET /v3.3/stream/domainer/sample/dropped): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi + +fun main() { + // Public endpoint: no API key needed. + val api = DatabasesStreamingApi() + + val result = api.streamDomainerDroppedSample() + println(result) +} diff --git a/examples/kotlin/StreamDomainerExpired.kt b/examples/kotlin/StreamDomainerExpired.kt new file mode 100644 index 0000000..77443c1 --- /dev/null +++ b/examples/kotlin/StreamDomainerExpired.kt @@ -0,0 +1,18 @@ +// Runnable example: Stream expiring domains (CSV) (GET /v3.3/stream/domainer/expired) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerExpiredKt +// Parameters for streamDomainerExpired (GET /v3.3/stream/domainer/expired): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerExpired(LocalDate.of(2026, 10, 1)) + println(result) +} diff --git a/examples/kotlin/StreamDomainerExpiredCleaned.kt b/examples/kotlin/StreamDomainerExpiredCleaned.kt new file mode 100644 index 0000000..2aa5034 --- /dev/null +++ b/examples/kotlin/StreamDomainerExpiredCleaned.kt @@ -0,0 +1,18 @@ +// Runnable example: Stream cleaned expiring domains (CSV) (GET /v3.3/stream/domainer/expired/cleaned) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerExpiredCleanedKt +// Parameters for streamDomainerExpiredCleaned (GET /v3.3/stream/domainer/expired/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerExpiredCleaned(LocalDate.of(2026, 10, 1)) + println(result) +} diff --git a/examples/kotlin/StreamDomainerExpiredCleanedEmail.kt b/examples/kotlin/StreamDomainerExpiredCleanedEmail.kt new file mode 100644 index 0000000..4adef1f --- /dev/null +++ b/examples/kotlin/StreamDomainerExpiredCleanedEmail.kt @@ -0,0 +1,18 @@ +// Runnable example: Stream cleaned expiring domains with an email (CSV) (GET /v3.3/stream/domainer/expired/cleaned/email) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerExpiredCleanedEmailKt +// Parameters for streamDomainerExpiredCleanedEmail (GET /v3.3/stream/domainer/expired/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerExpiredCleanedEmail(LocalDate.of(2026, 10, 1)) + println(result) +} diff --git a/examples/kotlin/StreamDomainerExpiredCleanedPhone.kt b/examples/kotlin/StreamDomainerExpiredCleanedPhone.kt new file mode 100644 index 0000000..d0cad70 --- /dev/null +++ b/examples/kotlin/StreamDomainerExpiredCleanedPhone.kt @@ -0,0 +1,18 @@ +// Runnable example: Stream cleaned expiring domains with a phone (CSV) (GET /v3.3/stream/domainer/expired/cleaned/phone) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerExpiredCleanedPhoneKt +// Parameters for streamDomainerExpiredCleanedPhone (GET /v3.3/stream/domainer/expired/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerExpiredCleanedPhone(LocalDate.of(2026, 10, 1)) + println(result) +} diff --git a/examples/kotlin/StreamDomainerExpiredCleanedSample.kt b/examples/kotlin/StreamDomainerExpiredCleanedSample.kt new file mode 100644 index 0000000..185415a --- /dev/null +++ b/examples/kotlin/StreamDomainerExpiredCleanedSample.kt @@ -0,0 +1,15 @@ +// Runnable example: Stream a sample of cleaned expiring domains (CSV) (GET /v3.3/stream/domainer/sample/expired/cleaned) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerExpiredCleanedSampleKt +// Parameters for streamDomainerExpiredCleanedSample (GET /v3.3/stream/domainer/sample/expired/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi + +fun main() { + // Public endpoint: no API key needed. + val api = DatabasesStreamingApi() + + val result = api.streamDomainerExpiredCleanedSample() + println(result) +} diff --git a/examples/kotlin/StreamDomainerExpiredSample.kt b/examples/kotlin/StreamDomainerExpiredSample.kt new file mode 100644 index 0000000..ab26d9c --- /dev/null +++ b/examples/kotlin/StreamDomainerExpiredSample.kt @@ -0,0 +1,15 @@ +// Runnable example: Stream a sample of expiring domains (CSV) (GET /v3.3/stream/domainer/sample/expired) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerExpiredSampleKt +// Parameters for streamDomainerExpiredSample (GET /v3.3/stream/domainer/sample/expired): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi + +fun main() { + // Public endpoint: no API key needed. + val api = DatabasesStreamingApi() + + val result = api.streamDomainerExpiredSample() + println(result) +} diff --git a/examples/kotlin/StreamDomainerGtld.kt b/examples/kotlin/StreamDomainerGtld.kt new file mode 100644 index 0000000..b9071fe --- /dev/null +++ b/examples/kotlin/StreamDomainerGtld.kt @@ -0,0 +1,18 @@ +// Runnable example: Stream newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/gtld) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerGtldKt +// Parameters for streamDomainerGtld (GET /v3.3/stream/domainer/gtld): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerGtld(LocalDate.of(2026, 10, 1)) + println(result) +} diff --git a/examples/kotlin/StreamDomainerGtldCleaned.kt b/examples/kotlin/StreamDomainerGtldCleaned.kt new file mode 100644 index 0000000..954e118 --- /dev/null +++ b/examples/kotlin/StreamDomainerGtldCleaned.kt @@ -0,0 +1,18 @@ +// Runnable example: Stream cleaned newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/gtld/cleaned) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerGtldCleanedKt +// Parameters for streamDomainerGtldCleaned (GET /v3.3/stream/domainer/gtld/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerGtldCleaned(LocalDate.of(2026, 10, 1)) + println(result) +} diff --git a/examples/kotlin/StreamDomainerGtldCleanedEmail.kt b/examples/kotlin/StreamDomainerGtldCleanedEmail.kt new file mode 100644 index 0000000..af1464d --- /dev/null +++ b/examples/kotlin/StreamDomainerGtldCleanedEmail.kt @@ -0,0 +1,18 @@ +// Runnable example: Stream cleaned newly registered gTLD domains with an email (CSV) (GET /v3.3/stream/domainer/gtld/cleaned/email) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerGtldCleanedEmailKt +// Parameters for streamDomainerGtldCleanedEmail (GET /v3.3/stream/domainer/gtld/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerGtldCleanedEmail(LocalDate.of(2026, 10, 1)) + println(result) +} diff --git a/examples/kotlin/StreamDomainerGtldCleanedPhone.kt b/examples/kotlin/StreamDomainerGtldCleanedPhone.kt new file mode 100644 index 0000000..6ac4ed1 --- /dev/null +++ b/examples/kotlin/StreamDomainerGtldCleanedPhone.kt @@ -0,0 +1,18 @@ +// Runnable example: Stream cleaned newly registered gTLD domains with a phone (CSV) (GET /v3.3/stream/domainer/gtld/cleaned/phone) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerGtldCleanedPhoneKt +// Parameters for streamDomainerGtldCleanedPhone (GET /v3.3/stream/domainer/gtld/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamDomainerGtldCleanedPhone(LocalDate.of(2026, 10, 1)) + println(result) +} diff --git a/examples/kotlin/StreamDomainerGtldCleanedSample.kt b/examples/kotlin/StreamDomainerGtldCleanedSample.kt new file mode 100644 index 0000000..ec5348a --- /dev/null +++ b/examples/kotlin/StreamDomainerGtldCleanedSample.kt @@ -0,0 +1,15 @@ +// Runnable example: Stream a sample of cleaned newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/sample/gtld/cleaned) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerGtldCleanedSampleKt +// Parameters for streamDomainerGtldCleanedSample (GET /v3.3/stream/domainer/sample/gtld/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi + +fun main() { + // Public endpoint: no API key needed. + val api = DatabasesStreamingApi() + + val result = api.streamDomainerGtldCleanedSample() + println(result) +} diff --git a/examples/kotlin/StreamDomainerGtldSample.kt b/examples/kotlin/StreamDomainerGtldSample.kt new file mode 100644 index 0000000..faf1975 --- /dev/null +++ b/examples/kotlin/StreamDomainerGtldSample.kt @@ -0,0 +1,15 @@ +// Runnable example: Stream a sample of newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/sample/gtld) +// Run it from the Getting Started project: gradle run -PmainClass=StreamDomainerGtldSampleKt +// Parameters for streamDomainerGtldSample (GET /v3.3/stream/domainer/sample/gtld): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi + +fun main() { + // Public endpoint: no API key needed. + val api = DatabasesStreamingApi() + + val result = api.streamDomainerGtldSample() + println(result) +} diff --git a/examples/kotlin/StreamThreatFeedMalware.kt b/examples/kotlin/StreamThreatFeedMalware.kt new file mode 100644 index 0000000..d679a7d --- /dev/null +++ b/examples/kotlin/StreamThreatFeedMalware.kt @@ -0,0 +1,17 @@ +// Runnable example: Stream the daily malware threat feed (CSV) (GET /v3.4/stream/threat-feed/malware) +// Run it from the Getting Started project: gradle run -PmainClass=StreamThreatFeedMalwareKt +// Parameters for streamThreatFeedMalware (GET /v3.4/stream/threat-feed/malware): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamThreatFeedMalware(LocalDate.of(2026, 10, 1)) + println(result) +} diff --git a/examples/kotlin/StreamThreatFeedMalwareSample.kt b/examples/kotlin/StreamThreatFeedMalwareSample.kt new file mode 100644 index 0000000..228211f --- /dev/null +++ b/examples/kotlin/StreamThreatFeedMalwareSample.kt @@ -0,0 +1,14 @@ +// Runnable example: Stream a sample of the malware threat feed (CSV) (GET /v3.4/stream/threat-feed/malware/sample) +// Run it from the Getting Started project: gradle run -PmainClass=StreamThreatFeedMalwareSampleKt +// Parameters for streamThreatFeedMalwareSample (GET /v3.4/stream/threat-feed/malware/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi + +fun main() { + // Public endpoint: no API key needed. + val api = DatabasesStreamingApi() + + val result = api.streamThreatFeedMalwareSample() + println(result) +} diff --git a/examples/kotlin/StreamThreatFeedPhishing.kt b/examples/kotlin/StreamThreatFeedPhishing.kt new file mode 100644 index 0000000..1a2f0fc --- /dev/null +++ b/examples/kotlin/StreamThreatFeedPhishing.kt @@ -0,0 +1,17 @@ +// Runnable example: Stream the daily phishing threat feed (CSV) (GET /v3.4/stream/threat-feed/phishing) +// Run it from the Getting Started project: gradle run -PmainClass=StreamThreatFeedPhishingKt +// Parameters for streamThreatFeedPhishing (GET /v3.4/stream/threat-feed/phishing): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamThreatFeedPhishing(LocalDate.of(2026, 10, 1)) + println(result) +} diff --git a/examples/kotlin/StreamThreatFeedPhishingSample.kt b/examples/kotlin/StreamThreatFeedPhishingSample.kt new file mode 100644 index 0000000..f0705d3 --- /dev/null +++ b/examples/kotlin/StreamThreatFeedPhishingSample.kt @@ -0,0 +1,14 @@ +// Runnable example: Stream a sample of the phishing threat feed (CSV) (GET /v3.4/stream/threat-feed/phishing/sample) +// Run it from the Getting Started project: gradle run -PmainClass=StreamThreatFeedPhishingSampleKt +// Parameters for streamThreatFeedPhishingSample (GET /v3.4/stream/threat-feed/phishing/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi + +fun main() { + // Public endpoint: no API key needed. + val api = DatabasesStreamingApi() + + val result = api.streamThreatFeedPhishingSample() + println(result) +} diff --git a/examples/kotlin/StreamThreatFeedSpam.kt b/examples/kotlin/StreamThreatFeedSpam.kt new file mode 100644 index 0000000..70f31bb --- /dev/null +++ b/examples/kotlin/StreamThreatFeedSpam.kt @@ -0,0 +1,17 @@ +// Runnable example: Stream the daily spam threat feed (CSV) (GET /v3.4/stream/threat-feed/spam) +// Run it from the Getting Started project: gradle run -PmainClass=StreamThreatFeedSpamKt +// Parameters for streamThreatFeedSpam (GET /v3.4/stream/threat-feed/spam): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi +import com.whoisfreaks.client.infrastructure.ApiClient +import java.time.LocalDate + +fun main() { + ApiClient.apiKey["apiKey"] = System.getenv("WHOISFREAKS_API_KEY") // set once, sent with every call + val api = DatabasesStreamingApi() + + val result = api.streamThreatFeedSpam(LocalDate.of(2026, 10, 1)) + println(result) +} diff --git a/examples/kotlin/StreamThreatFeedSpamSample.kt b/examples/kotlin/StreamThreatFeedSpamSample.kt new file mode 100644 index 0000000..5ef9e41 --- /dev/null +++ b/examples/kotlin/StreamThreatFeedSpamSample.kt @@ -0,0 +1,14 @@ +// Runnable example: Stream a sample of the spam threat feed (CSV) (GET /v3.4/stream/threat-feed/spam/sample) +// Run it from the Getting Started project: gradle run -PmainClass=StreamThreatFeedSpamSampleKt +// Parameters for streamThreatFeedSpamSample (GET /v3.4/stream/threat-feed/spam/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +import com.whoisfreaks.client.apis.DatabasesStreamingApi + +fun main() { + // Public endpoint: no API key needed. + val api = DatabasesStreamingApi() + + val result = api.streamThreatFeedSpamSample() + println(result) +} diff --git a/examples/php/BulkIpReputationV2.php b/examples/php/BulkIpReputationV2.php new file mode 100644 index 0000000..f086a65 --- /dev/null +++ b/examples/php/BulkIpReputationV2.php @@ -0,0 +1,33 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new IPReputationApi(new Client(), $config); + +$request = new BulkGeolocationRequest([ + 'ips' => ['1.1.1.1', '2.2.2.2', '8.8.8.8'], +]); + +try { + $results = $api->bulkIpReputationV2($request); + foreach ($results as $result) { + echo $result, PHP_EOL; // models print as JSON + } +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/DnsHistoricalV22.php b/examples/php/DnsHistoricalV22.php new file mode 100644 index 0000000..477731e --- /dev/null +++ b/examples/php/DnsHistoricalV22.php @@ -0,0 +1,31 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DNSApi(new Client(), $config); + +try { + $result = $api->dnsHistoricalV22('whoisfreaks.com', 'A,MX,TXT', 1); // domainName, type, page + echo $result, PHP_EOL; // models print as JSON +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/DnsHistoricalV23.php b/examples/php/DnsHistoricalV23.php new file mode 100644 index 0000000..fac3793 --- /dev/null +++ b/examples/php/DnsHistoricalV23.php @@ -0,0 +1,31 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DNSApi(new Client(), $config); + +try { + $result = $api->dnsHistoricalV23('whoisfreaks.com', 'A,MX,TXT', 1); // domainName, type, page + echo $result, PHP_EOL; // models print as JSON +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/DnsReverseV22.php b/examples/php/DnsReverseV22.php new file mode 100644 index 0000000..e6f7e1f --- /dev/null +++ b/examples/php/DnsReverseV22.php @@ -0,0 +1,32 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DNSApi(new Client(), $config); + +try { + $result = $api->dnsReverseV22('8.8.8.8', 'a', true, 1); // value, type, exact, page + echo $result, PHP_EOL; // models print as JSON +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/DnsReverseV23.php b/examples/php/DnsReverseV23.php new file mode 100644 index 0000000..61db400 --- /dev/null +++ b/examples/php/DnsReverseV23.php @@ -0,0 +1,32 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DNSApi(new Client(), $config); + +try { + $result = $api->dnsReverseV23('8.8.8.8', 'a', true, 1); // value, type, exact, page + echo $result, PHP_EOL; // models print as JSON +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/IpReputationV2.php b/examples/php/IpReputationV2.php new file mode 100644 index 0000000..2ad6640 --- /dev/null +++ b/examples/php/IpReputationV2.php @@ -0,0 +1,26 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new IPReputationApi(new Client(), $config); + +try { + $result = $api->ipReputationV2('8.8.8.8'); + echo $result, PHP_EOL; // models print as JSON +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/README.md b/examples/php/README.md index 0437272..2e70a3f 100644 --- a/examples/php/README.md +++ b/examples/php/README.md @@ -12,6 +12,10 @@ Install: see the [PHP guide](../../docs/languages/php.md). Set the `WHOISFREAKS_ - [`DnsLive.php`](DnsLive.php): Live DNS Lookup (`GET /v2.0/dns/live`) - [`DnsHistorical.php`](DnsHistorical.php): Historical DNS Lookup (`GET /v2.0/dns/historical`) - [`DnsReverse.php`](DnsReverse.php): Reverse DNS Lookup (`GET /v2.1/dns/reverse`) +- [`DnsHistoricalV22.php`](DnsHistoricalV22.php): Historical DNS Lookup (v2.2) (`GET /v2.2/dns/historical`) +- [`DnsHistoricalV23.php`](DnsHistoricalV23.php): Historical DNS Lookup (v2.3) (`GET /v2.3/dns/historical`) +- [`DnsReverseV22.php`](DnsReverseV22.php): Reverse DNS Lookup (v2.2) (`GET /v2.2/dns/reverse`) +- [`DnsReverseV23.php`](DnsReverseV23.php): Reverse DNS Lookup (v2.3) (`GET /v2.3/dns/reverse`) - [`DnsBulk.php`](DnsBulk.php): Bulk DNS Lookup (`POST /v2.0/dns/bulk/live`) ## Domain Availability @@ -34,6 +38,8 @@ Install: see the [PHP guide](../../docs/languages/php.md). Set the `WHOISFREAKS_ ## IP Reputation - [`IpReputation.php`](IpReputation.php): IP Reputation Lookup (`GET /v1.0/security`) - [`BulkIpReputation.php`](BulkIpReputation.php): Bulk IP Reputation (`POST /v1.0/security`) +- [`IpReputationV2.php`](IpReputationV2.php): IP Reputation Lookup (v2.0) (`GET /v2.0/security`) +- [`BulkIpReputationV2.php`](BulkIpReputationV2.php): Bulk IP Reputation (v2.0) (`POST /v2.0/security`) ## Domain Reputation - [`DomainReputation.php`](DomainReputation.php): Domain Reputation Lookup (`GET /v1/domain/security`) @@ -105,3 +111,33 @@ Install: see the [PHP guide](../../docs/languages/php.md). Set the `WHOISFREAKS_ - [`DownloadThreatFeedMalwareSample.php`](DownloadThreatFeedMalwareSample.php): Download a sample of the malware threat feed (CSV) (`GET /v3.4/download/threat-feed/malware/sample`) - [`DownloadThreatFeedSpam.php`](DownloadThreatFeedSpam.php): Download the daily spam threat feed (CSV) (`GET /v3.4/download/threat-feed/spam`) - [`DownloadThreatFeedSpamSample.php`](DownloadThreatFeedSpamSample.php): Download a sample of the spam threat feed (CSV) (`GET /v3.4/download/threat-feed/spam/sample`) + +## Databases - Streaming +- [`StreamThreatFeedPhishing.php`](StreamThreatFeedPhishing.php): Stream the daily phishing threat feed (CSV) (`GET /v3.4/stream/threat-feed/phishing`) +- [`StreamThreatFeedPhishingSample.php`](StreamThreatFeedPhishingSample.php): Stream a sample of the phishing threat feed (CSV) (`GET /v3.4/stream/threat-feed/phishing/sample`) +- [`StreamThreatFeedMalware.php`](StreamThreatFeedMalware.php): Stream the daily malware threat feed (CSV) (`GET /v3.4/stream/threat-feed/malware`) +- [`StreamThreatFeedMalwareSample.php`](StreamThreatFeedMalwareSample.php): Stream a sample of the malware threat feed (CSV) (`GET /v3.4/stream/threat-feed/malware/sample`) +- [`StreamThreatFeedSpam.php`](StreamThreatFeedSpam.php): Stream the daily spam threat feed (CSV) (`GET /v3.4/stream/threat-feed/spam`) +- [`StreamThreatFeedSpamSample.php`](StreamThreatFeedSpamSample.php): Stream a sample of the spam threat feed (CSV) (`GET /v3.4/stream/threat-feed/spam/sample`) +- [`StreamDomainerGtld.php`](StreamDomainerGtld.php): Stream newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/gtld`) +- [`StreamDomainerGtldCleaned.php`](StreamDomainerGtldCleaned.php): Stream cleaned newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned`) +- [`StreamDomainerGtldCleanedEmail.php`](StreamDomainerGtldCleanedEmail.php): Stream cleaned newly registered gTLD domains with an email (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned/email`) +- [`StreamDomainerGtldCleanedPhone.php`](StreamDomainerGtldCleanedPhone.php): Stream cleaned newly registered gTLD domains with a phone (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned/phone`) +- [`StreamDomainerCctld.php`](StreamDomainerCctld.php): Stream newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/cctld`) +- [`StreamDomainerCctldCleaned.php`](StreamDomainerCctldCleaned.php): Stream cleaned newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned`) +- [`StreamDomainerCctldCleanedEmail.php`](StreamDomainerCctldCleanedEmail.php): Stream cleaned newly registered ccTLD domains with an email (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned/email`) +- [`StreamDomainerCctldCleanedPhone.php`](StreamDomainerCctldCleanedPhone.php): Stream cleaned newly registered ccTLD domains with a phone (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned/phone`) +- [`StreamDomainerExpired.php`](StreamDomainerExpired.php): Stream expiring domains (CSV) (`GET /v3.3/stream/domainer/expired`) +- [`StreamDomainerExpiredCleaned.php`](StreamDomainerExpiredCleaned.php): Stream cleaned expiring domains (CSV) (`GET /v3.3/stream/domainer/expired/cleaned`) +- [`StreamDomainerExpiredCleanedEmail.php`](StreamDomainerExpiredCleanedEmail.php): Stream cleaned expiring domains with an email (CSV) (`GET /v3.3/stream/domainer/expired/cleaned/email`) +- [`StreamDomainerExpiredCleanedPhone.php`](StreamDomainerExpiredCleanedPhone.php): Stream cleaned expiring domains with a phone (CSV) (`GET /v3.3/stream/domainer/expired/cleaned/phone`) +- [`StreamDomainerDropped.php`](StreamDomainerDropped.php): Stream dropped domains (CSV) (`GET /v3.3/stream/domainer/dropped`) +- [`StreamDomainerDroppedBacklinks.php`](StreamDomainerDroppedBacklinks.php): Stream dropped domains with backlinks (CSV) (`GET /v3.3/stream/domainer/dropped/backlinks`) +- [`StreamDomainerGtldSample.php`](StreamDomainerGtldSample.php): Stream a sample of newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/gtld`) +- [`StreamDomainerGtldCleanedSample.php`](StreamDomainerGtldCleanedSample.php): Stream a sample of cleaned newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/gtld/cleaned`) +- [`StreamDomainerCctldSample.php`](StreamDomainerCctldSample.php): Stream a sample of newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/cctld`) +- [`StreamDomainerCctldCleanedSample.php`](StreamDomainerCctldCleanedSample.php): Stream a sample of cleaned newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/cctld/cleaned`) +- [`StreamDomainerExpiredSample.php`](StreamDomainerExpiredSample.php): Stream a sample of expiring domains (CSV) (`GET /v3.3/stream/domainer/sample/expired`) +- [`StreamDomainerExpiredCleanedSample.php`](StreamDomainerExpiredCleanedSample.php): Stream a sample of cleaned expiring domains (CSV) (`GET /v3.3/stream/domainer/sample/expired/cleaned`) +- [`StreamDomainerDroppedSample.php`](StreamDomainerDroppedSample.php): Stream a sample of dropped domains (CSV) (`GET /v3.3/stream/domainer/sample/dropped`) +- [`StreamDomainerDroppedBacklinksSample.php`](StreamDomainerDroppedBacklinksSample.php): Stream a sample of dropped domains with backlinks (CSV) (`GET /v3.3/stream/domainer/sample/dropped/backlinks`) diff --git a/examples/php/StreamDomainerCctld.php b/examples/php/StreamDomainerCctld.php new file mode 100644 index 0000000..9e3bcd9 --- /dev/null +++ b/examples/php/StreamDomainerCctld.php @@ -0,0 +1,29 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerCctld('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamDomainerCctldCleaned.php b/examples/php/StreamDomainerCctldCleaned.php new file mode 100644 index 0000000..63aaefe --- /dev/null +++ b/examples/php/StreamDomainerCctldCleaned.php @@ -0,0 +1,29 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerCctldCleaned('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamDomainerCctldCleanedEmail.php b/examples/php/StreamDomainerCctldCleanedEmail.php new file mode 100644 index 0000000..33c60b8 --- /dev/null +++ b/examples/php/StreamDomainerCctldCleanedEmail.php @@ -0,0 +1,29 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerCctldCleanedEmail('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamDomainerCctldCleanedPhone.php b/examples/php/StreamDomainerCctldCleanedPhone.php new file mode 100644 index 0000000..96f4dec --- /dev/null +++ b/examples/php/StreamDomainerCctldCleanedPhone.php @@ -0,0 +1,29 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerCctldCleanedPhone('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamDomainerCctldCleanedSample.php b/examples/php/StreamDomainerCctldCleanedSample.php new file mode 100644 index 0000000..8e748f3 --- /dev/null +++ b/examples/php/StreamDomainerCctldCleanedSample.php @@ -0,0 +1,29 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerCctldCleanedSample(); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamDomainerCctldSample.php b/examples/php/StreamDomainerCctldSample.php new file mode 100644 index 0000000..92f125c --- /dev/null +++ b/examples/php/StreamDomainerCctldSample.php @@ -0,0 +1,29 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerCctldSample(); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamDomainerDropped.php b/examples/php/StreamDomainerDropped.php new file mode 100644 index 0000000..afe2841 --- /dev/null +++ b/examples/php/StreamDomainerDropped.php @@ -0,0 +1,29 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerDropped('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamDomainerDroppedBacklinks.php b/examples/php/StreamDomainerDroppedBacklinks.php new file mode 100644 index 0000000..d0fa4cf --- /dev/null +++ b/examples/php/StreamDomainerDroppedBacklinks.php @@ -0,0 +1,29 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerDroppedBacklinks('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamDomainerDroppedBacklinksSample.php b/examples/php/StreamDomainerDroppedBacklinksSample.php new file mode 100644 index 0000000..19385c2 --- /dev/null +++ b/examples/php/StreamDomainerDroppedBacklinksSample.php @@ -0,0 +1,29 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerDroppedBacklinksSample(); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamDomainerDroppedSample.php b/examples/php/StreamDomainerDroppedSample.php new file mode 100644 index 0000000..0666635 --- /dev/null +++ b/examples/php/StreamDomainerDroppedSample.php @@ -0,0 +1,29 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerDroppedSample(); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamDomainerExpired.php b/examples/php/StreamDomainerExpired.php new file mode 100644 index 0000000..4b54600 --- /dev/null +++ b/examples/php/StreamDomainerExpired.php @@ -0,0 +1,29 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerExpired('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamDomainerExpiredCleaned.php b/examples/php/StreamDomainerExpiredCleaned.php new file mode 100644 index 0000000..3d25415 --- /dev/null +++ b/examples/php/StreamDomainerExpiredCleaned.php @@ -0,0 +1,29 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerExpiredCleaned('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamDomainerExpiredCleanedEmail.php b/examples/php/StreamDomainerExpiredCleanedEmail.php new file mode 100644 index 0000000..8ef2fa0 --- /dev/null +++ b/examples/php/StreamDomainerExpiredCleanedEmail.php @@ -0,0 +1,29 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerExpiredCleanedEmail('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamDomainerExpiredCleanedPhone.php b/examples/php/StreamDomainerExpiredCleanedPhone.php new file mode 100644 index 0000000..d81f0e9 --- /dev/null +++ b/examples/php/StreamDomainerExpiredCleanedPhone.php @@ -0,0 +1,29 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerExpiredCleanedPhone('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamDomainerExpiredCleanedSample.php b/examples/php/StreamDomainerExpiredCleanedSample.php new file mode 100644 index 0000000..643f841 --- /dev/null +++ b/examples/php/StreamDomainerExpiredCleanedSample.php @@ -0,0 +1,29 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerExpiredCleanedSample(); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamDomainerExpiredSample.php b/examples/php/StreamDomainerExpiredSample.php new file mode 100644 index 0000000..6f2a425 --- /dev/null +++ b/examples/php/StreamDomainerExpiredSample.php @@ -0,0 +1,29 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerExpiredSample(); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamDomainerGtld.php b/examples/php/StreamDomainerGtld.php new file mode 100644 index 0000000..2687ebf --- /dev/null +++ b/examples/php/StreamDomainerGtld.php @@ -0,0 +1,29 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerGtld('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamDomainerGtldCleaned.php b/examples/php/StreamDomainerGtldCleaned.php new file mode 100644 index 0000000..7bc7934 --- /dev/null +++ b/examples/php/StreamDomainerGtldCleaned.php @@ -0,0 +1,29 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerGtldCleaned('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamDomainerGtldCleanedEmail.php b/examples/php/StreamDomainerGtldCleanedEmail.php new file mode 100644 index 0000000..0f41b18 --- /dev/null +++ b/examples/php/StreamDomainerGtldCleanedEmail.php @@ -0,0 +1,29 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerGtldCleanedEmail('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamDomainerGtldCleanedPhone.php b/examples/php/StreamDomainerGtldCleanedPhone.php new file mode 100644 index 0000000..029c241 --- /dev/null +++ b/examples/php/StreamDomainerGtldCleanedPhone.php @@ -0,0 +1,29 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerGtldCleanedPhone('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamDomainerGtldCleanedSample.php b/examples/php/StreamDomainerGtldCleanedSample.php new file mode 100644 index 0000000..5b13a63 --- /dev/null +++ b/examples/php/StreamDomainerGtldCleanedSample.php @@ -0,0 +1,29 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerGtldCleanedSample(); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamDomainerGtldSample.php b/examples/php/StreamDomainerGtldSample.php new file mode 100644 index 0000000..0e42d10 --- /dev/null +++ b/examples/php/StreamDomainerGtldSample.php @@ -0,0 +1,29 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamDomainerGtldSample(); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamThreatFeedMalware.php b/examples/php/StreamThreatFeedMalware.php new file mode 100644 index 0000000..9b6b29d --- /dev/null +++ b/examples/php/StreamThreatFeedMalware.php @@ -0,0 +1,28 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamThreatFeedMalware('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamThreatFeedMalwareSample.php b/examples/php/StreamThreatFeedMalwareSample.php new file mode 100644 index 0000000..c0df089 --- /dev/null +++ b/examples/php/StreamThreatFeedMalwareSample.php @@ -0,0 +1,28 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamThreatFeedMalwareSample(); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamThreatFeedPhishing.php b/examples/php/StreamThreatFeedPhishing.php new file mode 100644 index 0000000..73d3954 --- /dev/null +++ b/examples/php/StreamThreatFeedPhishing.php @@ -0,0 +1,28 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamThreatFeedPhishing('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamThreatFeedPhishingSample.php b/examples/php/StreamThreatFeedPhishingSample.php new file mode 100644 index 0000000..e0511d5 --- /dev/null +++ b/examples/php/StreamThreatFeedPhishingSample.php @@ -0,0 +1,28 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamThreatFeedPhishingSample(); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamThreatFeedSpam.php b/examples/php/StreamThreatFeedSpam.php new file mode 100644 index 0000000..38eec74 --- /dev/null +++ b/examples/php/StreamThreatFeedSpam.php @@ -0,0 +1,28 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamThreatFeedSpam('2026-10-01'); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/php/StreamThreatFeedSpamSample.php b/examples/php/StreamThreatFeedSpamSample.php new file mode 100644 index 0000000..a9597bf --- /dev/null +++ b/examples/php/StreamThreatFeedSpamSample.php @@ -0,0 +1,28 @@ +setApiKey('apiKey', getenv('WHOISFREAKS_API_KEY')); + +$api = new DatabasesStreamingApi(new Client(), $config); + +try { + $result = $api->streamThreatFeedSpamSample(); + echo $result, PHP_EOL; +} catch (ApiException $e) { + fwrite(STDERR, 'Request failed: HTTP ' . $e->getCode() . ' ' . $e->getResponseBody() . PHP_EOL); + exit(1); +} diff --git a/examples/python/BulkIpReputationV2.py b/examples/python/BulkIpReputationV2.py new file mode 100644 index 0000000..b592143 --- /dev/null +++ b/examples/python/BulkIpReputationV2.py @@ -0,0 +1,21 @@ +"""Bulk IP Reputation (v2.0): POST https://api.whoisfreaks.com/v2.0/security + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python BulkIpReputationV2.py +""" +import json +import os + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.IPReputationApi(client) + + # bulk_ip_reputation_v2 parameters: + # bulk_geolocation_request (BulkGeolocationRequest, required): request body + body = whoisfreaks.BulkGeolocationRequest(ips=["1.1.1.1", "2.2.2.2", "8.8.8.8"]) + results = api.bulk_ip_reputation_v2(body) + print(json.dumps([item.to_dict() for item in results], indent=2)) diff --git a/examples/python/DnsHistoricalV22.py b/examples/python/DnsHistoricalV22.py new file mode 100644 index 0000000..9bff505 --- /dev/null +++ b/examples/python/DnsHistoricalV22.py @@ -0,0 +1,25 @@ +"""Historical DNS Lookup (v2.2): GET https://api.whoisfreaks.com/v2.2/dns/historical + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python DnsHistoricalV22.py +""" +import json +import os + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DNSApi(client) + + # dns_historical_v22 parameters: + # domain_name (str, required) + # type (str, required): default "all" + # page (int, optional, keyword): default 1 + # sort (str, optional, keyword): Sort direction. Omit to leave the results unsorted; one of asc, desc + # sort_by (str, optional, keyword): Field to sort on. Only applies when sort is given; one of firstSeen, lastSeen; default "lastSeen" + # format (str, optional, keyword): one of json, xml; default "json" + result = api.dns_historical_v22("whoisfreaks.com", "A,MX,TXT", page=1) + print(json.dumps(result.to_dict(), indent=2)) diff --git a/examples/python/DnsHistoricalV23.py b/examples/python/DnsHistoricalV23.py new file mode 100644 index 0000000..f535e39 --- /dev/null +++ b/examples/python/DnsHistoricalV23.py @@ -0,0 +1,25 @@ +"""Historical DNS Lookup (v2.3): GET https://api.whoisfreaks.com/v2.3/dns/historical + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python DnsHistoricalV23.py +""" +import json +import os + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DNSApi(client) + + # dns_historical_v23 parameters: + # domain_name (str, required) + # type (str, required): default "all" + # page (int, optional, keyword): default 1 + # sort (str, optional, keyword): Sort direction. Omit to leave the results unsorted; one of asc, desc + # sort_by (str, optional, keyword): Field to sort on. Only applies when sort is given; one of firstSeen, lastSeen; default "lastSeen" + # format (str, optional, keyword): one of json, xml; default "json" + result = api.dns_historical_v23("whoisfreaks.com", "A,MX,TXT", page=1) + print(json.dumps(result.to_dict(), indent=2)) diff --git a/examples/python/DnsReverseV22.py b/examples/python/DnsReverseV22.py new file mode 100644 index 0000000..9c4b94a --- /dev/null +++ b/examples/python/DnsReverseV22.py @@ -0,0 +1,26 @@ +"""Reverse DNS Lookup (v2.2): GET https://api.whoisfreaks.com/v2.2/dns/reverse + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python DnsReverseV22.py +""" +import json +import os + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DNSApi(client) + + # dns_reverse_v22 parameters: + # value (str, required): IP, CIDR, or record value + # type (str, required): one of a, mx, cname, ns, aaaa, txt, soa + # exact (bool, optional, keyword): When false the value is matched as a substring, which is far slower than an e...; default True + # page (int, optional, keyword): default 1 + # sort (str, optional, keyword): Sort direction. Omit to leave the results unsorted; one of asc, desc + # sort_by (str, optional, keyword): Field to sort on. Only applies when sort is given; one of firstSeen, lastSeen; default "lastSeen" + # format (str, optional, keyword): one of json, xml; default "json" + result = api.dns_reverse_v22("8.8.8.8", "a", page=1) + print(json.dumps(result.to_dict(), indent=2)) diff --git a/examples/python/DnsReverseV23.py b/examples/python/DnsReverseV23.py new file mode 100644 index 0000000..b0431f1 --- /dev/null +++ b/examples/python/DnsReverseV23.py @@ -0,0 +1,26 @@ +"""Reverse DNS Lookup (v2.3): GET https://api.whoisfreaks.com/v2.3/dns/reverse + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python DnsReverseV23.py +""" +import json +import os + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DNSApi(client) + + # dns_reverse_v23 parameters: + # value (str, required): IP, CIDR, or record value + # type (str, required): one of a, mx, cname, ns, aaaa, txt, soa + # exact (bool, optional, keyword): When false the value is matched as a substring, which is far slower than an e...; default True + # page (int, optional, keyword): default 1 + # sort (str, optional, keyword): Sort direction. Omit to leave the results unsorted; one of asc, desc + # sort_by (str, optional, keyword): Field to sort on. Only applies when sort is given; one of firstSeen, lastSeen; default "lastSeen" + # format (str, optional, keyword): one of json, xml; default "json" + result = api.dns_reverse_v23("8.8.8.8", "a", page=1) + print(json.dumps(result.to_dict(), indent=2)) diff --git a/examples/python/IpReputationV2.py b/examples/python/IpReputationV2.py new file mode 100644 index 0000000..8a21d65 --- /dev/null +++ b/examples/python/IpReputationV2.py @@ -0,0 +1,20 @@ +"""IP Reputation Lookup (v2.0): GET https://api.whoisfreaks.com/v2.0/security + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python IpReputationV2.py +""" +import json +import os + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.IPReputationApi(client) + + # ip_reputation_v2 parameters: + # ip (str, required) + result = api.ip_reputation_v2("8.8.8.8") + print(json.dumps(result.to_dict(), indent=2)) diff --git a/examples/python/README.md b/examples/python/README.md index f546050..f49b822 100644 --- a/examples/python/README.md +++ b/examples/python/README.md @@ -12,6 +12,10 @@ Install: see the [Python guide](../../docs/languages/python.md). Set the `WHOISF - [`DnsLive.py`](DnsLive.py): Live DNS Lookup (`GET /v2.0/dns/live`) - [`DnsHistorical.py`](DnsHistorical.py): Historical DNS Lookup (`GET /v2.0/dns/historical`) - [`DnsReverse.py`](DnsReverse.py): Reverse DNS Lookup (`GET /v2.1/dns/reverse`) +- [`DnsHistoricalV22.py`](DnsHistoricalV22.py): Historical DNS Lookup (v2.2) (`GET /v2.2/dns/historical`) +- [`DnsHistoricalV23.py`](DnsHistoricalV23.py): Historical DNS Lookup (v2.3) (`GET /v2.3/dns/historical`) +- [`DnsReverseV22.py`](DnsReverseV22.py): Reverse DNS Lookup (v2.2) (`GET /v2.2/dns/reverse`) +- [`DnsReverseV23.py`](DnsReverseV23.py): Reverse DNS Lookup (v2.3) (`GET /v2.3/dns/reverse`) - [`DnsBulk.py`](DnsBulk.py): Bulk DNS Lookup (`POST /v2.0/dns/bulk/live`) ## Domain Availability @@ -34,6 +38,8 @@ Install: see the [Python guide](../../docs/languages/python.md). Set the `WHOISF ## IP Reputation - [`IpReputation.py`](IpReputation.py): IP Reputation Lookup (`GET /v1.0/security`) - [`BulkIpReputation.py`](BulkIpReputation.py): Bulk IP Reputation (`POST /v1.0/security`) +- [`IpReputationV2.py`](IpReputationV2.py): IP Reputation Lookup (v2.0) (`GET /v2.0/security`) +- [`BulkIpReputationV2.py`](BulkIpReputationV2.py): Bulk IP Reputation (v2.0) (`POST /v2.0/security`) ## Domain Reputation - [`DomainReputation.py`](DomainReputation.py): Domain Reputation Lookup (`GET /v1/domain/security`) @@ -105,3 +111,33 @@ Install: see the [Python guide](../../docs/languages/python.md). Set the `WHOISF - [`DownloadThreatFeedMalwareSample.py`](DownloadThreatFeedMalwareSample.py): Download a sample of the malware threat feed (CSV) (`GET /v3.4/download/threat-feed/malware/sample`) - [`DownloadThreatFeedSpam.py`](DownloadThreatFeedSpam.py): Download the daily spam threat feed (CSV) (`GET /v3.4/download/threat-feed/spam`) - [`DownloadThreatFeedSpamSample.py`](DownloadThreatFeedSpamSample.py): Download a sample of the spam threat feed (CSV) (`GET /v3.4/download/threat-feed/spam/sample`) + +## Databases - Streaming +- [`StreamThreatFeedPhishing.py`](StreamThreatFeedPhishing.py): Stream the daily phishing threat feed (CSV) (`GET /v3.4/stream/threat-feed/phishing`) +- [`StreamThreatFeedPhishingSample.py`](StreamThreatFeedPhishingSample.py): Stream a sample of the phishing threat feed (CSV) (`GET /v3.4/stream/threat-feed/phishing/sample`) +- [`StreamThreatFeedMalware.py`](StreamThreatFeedMalware.py): Stream the daily malware threat feed (CSV) (`GET /v3.4/stream/threat-feed/malware`) +- [`StreamThreatFeedMalwareSample.py`](StreamThreatFeedMalwareSample.py): Stream a sample of the malware threat feed (CSV) (`GET /v3.4/stream/threat-feed/malware/sample`) +- [`StreamThreatFeedSpam.py`](StreamThreatFeedSpam.py): Stream the daily spam threat feed (CSV) (`GET /v3.4/stream/threat-feed/spam`) +- [`StreamThreatFeedSpamSample.py`](StreamThreatFeedSpamSample.py): Stream a sample of the spam threat feed (CSV) (`GET /v3.4/stream/threat-feed/spam/sample`) +- [`StreamDomainerGtld.py`](StreamDomainerGtld.py): Stream newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/gtld`) +- [`StreamDomainerGtldCleaned.py`](StreamDomainerGtldCleaned.py): Stream cleaned newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned`) +- [`StreamDomainerGtldCleanedEmail.py`](StreamDomainerGtldCleanedEmail.py): Stream cleaned newly registered gTLD domains with an email (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned/email`) +- [`StreamDomainerGtldCleanedPhone.py`](StreamDomainerGtldCleanedPhone.py): Stream cleaned newly registered gTLD domains with a phone (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned/phone`) +- [`StreamDomainerCctld.py`](StreamDomainerCctld.py): Stream newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/cctld`) +- [`StreamDomainerCctldCleaned.py`](StreamDomainerCctldCleaned.py): Stream cleaned newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned`) +- [`StreamDomainerCctldCleanedEmail.py`](StreamDomainerCctldCleanedEmail.py): Stream cleaned newly registered ccTLD domains with an email (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned/email`) +- [`StreamDomainerCctldCleanedPhone.py`](StreamDomainerCctldCleanedPhone.py): Stream cleaned newly registered ccTLD domains with a phone (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned/phone`) +- [`StreamDomainerExpired.py`](StreamDomainerExpired.py): Stream expiring domains (CSV) (`GET /v3.3/stream/domainer/expired`) +- [`StreamDomainerExpiredCleaned.py`](StreamDomainerExpiredCleaned.py): Stream cleaned expiring domains (CSV) (`GET /v3.3/stream/domainer/expired/cleaned`) +- [`StreamDomainerExpiredCleanedEmail.py`](StreamDomainerExpiredCleanedEmail.py): Stream cleaned expiring domains with an email (CSV) (`GET /v3.3/stream/domainer/expired/cleaned/email`) +- [`StreamDomainerExpiredCleanedPhone.py`](StreamDomainerExpiredCleanedPhone.py): Stream cleaned expiring domains with a phone (CSV) (`GET /v3.3/stream/domainer/expired/cleaned/phone`) +- [`StreamDomainerDropped.py`](StreamDomainerDropped.py): Stream dropped domains (CSV) (`GET /v3.3/stream/domainer/dropped`) +- [`StreamDomainerDroppedBacklinks.py`](StreamDomainerDroppedBacklinks.py): Stream dropped domains with backlinks (CSV) (`GET /v3.3/stream/domainer/dropped/backlinks`) +- [`StreamDomainerGtldSample.py`](StreamDomainerGtldSample.py): Stream a sample of newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/gtld`) +- [`StreamDomainerGtldCleanedSample.py`](StreamDomainerGtldCleanedSample.py): Stream a sample of cleaned newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/gtld/cleaned`) +- [`StreamDomainerCctldSample.py`](StreamDomainerCctldSample.py): Stream a sample of newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/cctld`) +- [`StreamDomainerCctldCleanedSample.py`](StreamDomainerCctldCleanedSample.py): Stream a sample of cleaned newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/cctld/cleaned`) +- [`StreamDomainerExpiredSample.py`](StreamDomainerExpiredSample.py): Stream a sample of expiring domains (CSV) (`GET /v3.3/stream/domainer/sample/expired`) +- [`StreamDomainerExpiredCleanedSample.py`](StreamDomainerExpiredCleanedSample.py): Stream a sample of cleaned expiring domains (CSV) (`GET /v3.3/stream/domainer/sample/expired/cleaned`) +- [`StreamDomainerDroppedSample.py`](StreamDomainerDroppedSample.py): Stream a sample of dropped domains (CSV) (`GET /v3.3/stream/domainer/sample/dropped`) +- [`StreamDomainerDroppedBacklinksSample.py`](StreamDomainerDroppedBacklinksSample.py): Stream a sample of dropped domains with backlinks (CSV) (`GET /v3.3/stream/domainer/sample/dropped/backlinks`) diff --git a/examples/python/StreamDomainerCctld.py b/examples/python/StreamDomainerCctld.py new file mode 100644 index 0000000..3eeb664 --- /dev/null +++ b/examples/python/StreamDomainerCctld.py @@ -0,0 +1,23 @@ +"""Stream newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerCctld.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_cctld parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_cctld(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamDomainerCctldCleaned.py b/examples/python/StreamDomainerCctldCleaned.py new file mode 100644 index 0000000..3e38cb3 --- /dev/null +++ b/examples/python/StreamDomainerCctldCleaned.py @@ -0,0 +1,23 @@ +"""Stream cleaned newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerCctldCleaned.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_cctld_cleaned parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_cctld_cleaned(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamDomainerCctldCleanedEmail.py b/examples/python/StreamDomainerCctldCleanedEmail.py new file mode 100644 index 0000000..07a42ee --- /dev/null +++ b/examples/python/StreamDomainerCctldCleanedEmail.py @@ -0,0 +1,23 @@ +"""Stream cleaned newly registered ccTLD domains with an email (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned/email + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerCctldCleanedEmail.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_cctld_cleaned_email parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_cctld_cleaned_email(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamDomainerCctldCleanedPhone.py b/examples/python/StreamDomainerCctldCleanedPhone.py new file mode 100644 index 0000000..6982fdb --- /dev/null +++ b/examples/python/StreamDomainerCctldCleanedPhone.py @@ -0,0 +1,23 @@ +"""Stream cleaned newly registered ccTLD domains with a phone (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned/phone + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerCctldCleanedPhone.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_cctld_cleaned_phone parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_cctld_cleaned_phone(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamDomainerCctldCleanedSample.py b/examples/python/StreamDomainerCctldCleanedSample.py new file mode 100644 index 0000000..c946877 --- /dev/null +++ b/examples/python/StreamDomainerCctldCleanedSample.py @@ -0,0 +1,20 @@ +"""Stream a sample of cleaned newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/cctld/cleaned + +Run it (public endpoint, no API key needed): + python StreamDomainerCctldCleanedSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_cctld_cleaned_sample parameters: + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_cctld_cleaned_sample() # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamDomainerCctldSample.py b/examples/python/StreamDomainerCctldSample.py new file mode 100644 index 0000000..76ea15c --- /dev/null +++ b/examples/python/StreamDomainerCctldSample.py @@ -0,0 +1,20 @@ +"""Stream a sample of newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/cctld + +Run it (public endpoint, no API key needed): + python StreamDomainerCctldSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_cctld_sample parameters: + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_cctld_sample() # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamDomainerDropped.py b/examples/python/StreamDomainerDropped.py new file mode 100644 index 0000000..1bc1cb0 --- /dev/null +++ b/examples/python/StreamDomainerDropped.py @@ -0,0 +1,23 @@ +"""Stream dropped domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/dropped + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerDropped.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_dropped parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_dropped(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamDomainerDroppedBacklinks.py b/examples/python/StreamDomainerDroppedBacklinks.py new file mode 100644 index 0000000..71ccc43 --- /dev/null +++ b/examples/python/StreamDomainerDroppedBacklinks.py @@ -0,0 +1,23 @@ +"""Stream dropped domains with backlinks (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/dropped/backlinks + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerDroppedBacklinks.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_dropped_backlinks parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_dropped_backlinks(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamDomainerDroppedBacklinksSample.py b/examples/python/StreamDomainerDroppedBacklinksSample.py new file mode 100644 index 0000000..c323ad6 --- /dev/null +++ b/examples/python/StreamDomainerDroppedBacklinksSample.py @@ -0,0 +1,20 @@ +"""Stream a sample of dropped domains with backlinks (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/dropped/backlinks + +Run it (public endpoint, no API key needed): + python StreamDomainerDroppedBacklinksSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_dropped_backlinks_sample parameters: + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_dropped_backlinks_sample() # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamDomainerDroppedSample.py b/examples/python/StreamDomainerDroppedSample.py new file mode 100644 index 0000000..c66b923 --- /dev/null +++ b/examples/python/StreamDomainerDroppedSample.py @@ -0,0 +1,20 @@ +"""Stream a sample of dropped domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/dropped + +Run it (public endpoint, no API key needed): + python StreamDomainerDroppedSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_dropped_sample parameters: + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_dropped_sample() # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamDomainerExpired.py b/examples/python/StreamDomainerExpired.py new file mode 100644 index 0000000..bc6d435 --- /dev/null +++ b/examples/python/StreamDomainerExpired.py @@ -0,0 +1,23 @@ +"""Stream expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerExpired.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_expired parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_expired(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamDomainerExpiredCleaned.py b/examples/python/StreamDomainerExpiredCleaned.py new file mode 100644 index 0000000..e7647a3 --- /dev/null +++ b/examples/python/StreamDomainerExpiredCleaned.py @@ -0,0 +1,23 @@ +"""Stream cleaned expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerExpiredCleaned.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_expired_cleaned parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_expired_cleaned(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamDomainerExpiredCleanedEmail.py b/examples/python/StreamDomainerExpiredCleanedEmail.py new file mode 100644 index 0000000..68adebb --- /dev/null +++ b/examples/python/StreamDomainerExpiredCleanedEmail.py @@ -0,0 +1,23 @@ +"""Stream cleaned expiring domains with an email (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned/email + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerExpiredCleanedEmail.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_expired_cleaned_email parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_expired_cleaned_email(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamDomainerExpiredCleanedPhone.py b/examples/python/StreamDomainerExpiredCleanedPhone.py new file mode 100644 index 0000000..e2f0c58 --- /dev/null +++ b/examples/python/StreamDomainerExpiredCleanedPhone.py @@ -0,0 +1,23 @@ +"""Stream cleaned expiring domains with a phone (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned/phone + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerExpiredCleanedPhone.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_expired_cleaned_phone parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_expired_cleaned_phone(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamDomainerExpiredCleanedSample.py b/examples/python/StreamDomainerExpiredCleanedSample.py new file mode 100644 index 0000000..2c53df4 --- /dev/null +++ b/examples/python/StreamDomainerExpiredCleanedSample.py @@ -0,0 +1,20 @@ +"""Stream a sample of cleaned expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/expired/cleaned + +Run it (public endpoint, no API key needed): + python StreamDomainerExpiredCleanedSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_expired_cleaned_sample parameters: + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_expired_cleaned_sample() # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamDomainerExpiredSample.py b/examples/python/StreamDomainerExpiredSample.py new file mode 100644 index 0000000..04a344c --- /dev/null +++ b/examples/python/StreamDomainerExpiredSample.py @@ -0,0 +1,20 @@ +"""Stream a sample of expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/expired + +Run it (public endpoint, no API key needed): + python StreamDomainerExpiredSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_expired_sample parameters: + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_expired_sample() # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamDomainerGtld.py b/examples/python/StreamDomainerGtld.py new file mode 100644 index 0000000..78cb423 --- /dev/null +++ b/examples/python/StreamDomainerGtld.py @@ -0,0 +1,23 @@ +"""Stream newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerGtld.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_gtld parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_gtld(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamDomainerGtldCleaned.py b/examples/python/StreamDomainerGtldCleaned.py new file mode 100644 index 0000000..df66a80 --- /dev/null +++ b/examples/python/StreamDomainerGtldCleaned.py @@ -0,0 +1,23 @@ +"""Stream cleaned newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerGtldCleaned.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_gtld_cleaned parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_gtld_cleaned(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamDomainerGtldCleanedEmail.py b/examples/python/StreamDomainerGtldCleanedEmail.py new file mode 100644 index 0000000..8e1b617 --- /dev/null +++ b/examples/python/StreamDomainerGtldCleanedEmail.py @@ -0,0 +1,23 @@ +"""Stream cleaned newly registered gTLD domains with an email (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned/email + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerGtldCleanedEmail.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_gtld_cleaned_email parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_gtld_cleaned_email(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamDomainerGtldCleanedPhone.py b/examples/python/StreamDomainerGtldCleanedPhone.py new file mode 100644 index 0000000..f00ff28 --- /dev/null +++ b/examples/python/StreamDomainerGtldCleanedPhone.py @@ -0,0 +1,23 @@ +"""Stream cleaned newly registered gTLD domains with a phone (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned/phone + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamDomainerGtldCleanedPhone.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_gtld_cleaned_phone parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_gtld_cleaned_phone(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamDomainerGtldCleanedSample.py b/examples/python/StreamDomainerGtldCleanedSample.py new file mode 100644 index 0000000..37644aa --- /dev/null +++ b/examples/python/StreamDomainerGtldCleanedSample.py @@ -0,0 +1,20 @@ +"""Stream a sample of cleaned newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/gtld/cleaned + +Run it (public endpoint, no API key needed): + python StreamDomainerGtldCleanedSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_gtld_cleaned_sample parameters: + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_gtld_cleaned_sample() # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamDomainerGtldSample.py b/examples/python/StreamDomainerGtldSample.py new file mode 100644 index 0000000..726fd63 --- /dev/null +++ b/examples/python/StreamDomainerGtldSample.py @@ -0,0 +1,20 @@ +"""Stream a sample of newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/gtld + +Run it (public endpoint, no API key needed): + python StreamDomainerGtldSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_domainer_gtld_sample parameters: + # whois (bool, optional, keyword): true streams the full WHOIS record per domain with a CSV header row; false st...; default False + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_domainer_gtld_sample() # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamThreatFeedMalware.py b/examples/python/StreamThreatFeedMalware.py new file mode 100644 index 0000000..e415ba8 --- /dev/null +++ b/examples/python/StreamThreatFeedMalware.py @@ -0,0 +1,22 @@ +"""Stream the daily malware threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/malware + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamThreatFeedMalware.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_threat_feed_malware parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_threat_feed_malware(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamThreatFeedMalwareSample.py b/examples/python/StreamThreatFeedMalwareSample.py new file mode 100644 index 0000000..e8d557c --- /dev/null +++ b/examples/python/StreamThreatFeedMalwareSample.py @@ -0,0 +1,19 @@ +"""Stream a sample of the malware threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/malware/sample + +Run it (public endpoint, no API key needed): + python StreamThreatFeedMalwareSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_threat_feed_malware_sample parameters: + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_threat_feed_malware_sample() # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamThreatFeedPhishing.py b/examples/python/StreamThreatFeedPhishing.py new file mode 100644 index 0000000..b01009d --- /dev/null +++ b/examples/python/StreamThreatFeedPhishing.py @@ -0,0 +1,22 @@ +"""Stream the daily phishing threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/phishing + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamThreatFeedPhishing.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_threat_feed_phishing parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_threat_feed_phishing(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamThreatFeedPhishingSample.py b/examples/python/StreamThreatFeedPhishingSample.py new file mode 100644 index 0000000..42e1b11 --- /dev/null +++ b/examples/python/StreamThreatFeedPhishingSample.py @@ -0,0 +1,19 @@ +"""Stream a sample of the phishing threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/phishing/sample + +Run it (public endpoint, no API key needed): + python StreamThreatFeedPhishingSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_threat_feed_phishing_sample parameters: + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_threat_feed_phishing_sample() # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamThreatFeedSpam.py b/examples/python/StreamThreatFeedSpam.py new file mode 100644 index 0000000..7a3bde4 --- /dev/null +++ b/examples/python/StreamThreatFeedSpam.py @@ -0,0 +1,22 @@ +"""Stream the daily spam threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/spam + +Run it with your API key in the environment: + WHOISFREAKS_API_KEY=your_api_key python StreamThreatFeedSpam.py +""" +import os +from datetime import date + +import whoisfreaks + +config = whoisfreaks.Configuration() +config.api_key["ApiKeyAuth"] = os.environ["WHOISFREAKS_API_KEY"] # set once for every request + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_threat_feed_spam parameters: + # var_date (datetime.date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_threat_feed_spam(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/python/StreamThreatFeedSpamSample.py b/examples/python/StreamThreatFeedSpamSample.py new file mode 100644 index 0000000..8036fa4 --- /dev/null +++ b/examples/python/StreamThreatFeedSpamSample.py @@ -0,0 +1,19 @@ +"""Stream a sample of the spam threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/spam/sample + +Run it (public endpoint, no API key needed): + python StreamThreatFeedSpamSample.py +""" + +import whoisfreaks + +config = whoisfreaks.Configuration() +# Public endpoint: no API key needed. + +with whoisfreaks.ApiClient(config) as client: + api = whoisfreaks.DatabasesStreamingApi(client) + + # stream_threat_feed_spam_sample parameters: + # offset (int, optional, keyword): Data rows to skip from the start of the file. The header row is never counted... + # limit (int, optional, keyword): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... + csv_text = api.stream_threat_feed_spam_sample() # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/ruby/BulkIpReputationV2.rb b/examples/ruby/BulkIpReputationV2.rb new file mode 100644 index 0000000..e944aa2 --- /dev/null +++ b/examples/ruby/BulkIpReputationV2.rb @@ -0,0 +1,24 @@ +# Bulk IP Reputation (v2.0) +# +# Parameters for bulkIpReputationV2 (POST /v2.0/security): +# - body: BulkGeolocationRequest (required): request body object + +require "json" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::IPReputationApi.new + +request = WhoisFreaks::BulkGeolocationRequest.new(ips: ["1.1.1.1", "2.2.2.2", "8.8.8.8"]) + +begin + results = api.bulk_ip_reputation_v2(request) + puts JSON.pretty_generate(results.map(&:to_hash)) +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/DnsHistoricalV22.rb b/examples/ruby/DnsHistoricalV22.rb new file mode 100644 index 0000000..5051f9f --- /dev/null +++ b/examples/ruby/DnsHistoricalV22.rb @@ -0,0 +1,27 @@ +# Historical DNS Lookup (v2.2) +# +# Parameters for dnsHistoricalV22 (GET /v2.2/dns/historical): +# - domain_name (string, required) +# - type (string, required) +# - page (integer, optional) +# - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +# - sort_by (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +# - format (string (one of: json, xml), optional) + +require "json" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DNSApi.new + +begin + result = api.dns_historical_v22("whoisfreaks.com", "A,MX,TXT", page: 1) + puts JSON.pretty_generate(result.to_hash) +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/DnsHistoricalV23.rb b/examples/ruby/DnsHistoricalV23.rb new file mode 100644 index 0000000..1cabf3c --- /dev/null +++ b/examples/ruby/DnsHistoricalV23.rb @@ -0,0 +1,27 @@ +# Historical DNS Lookup (v2.3) +# +# Parameters for dnsHistoricalV23 (GET /v2.3/dns/historical): +# - domain_name (string, required) +# - type (string, required) +# - page (integer, optional) +# - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +# - sort_by (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +# - format (string (one of: json, xml), optional) + +require "json" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DNSApi.new + +begin + result = api.dns_historical_v23("whoisfreaks.com", "A,MX,TXT", page: 1) + puts JSON.pretty_generate(result.to_hash) +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/DnsReverseV22.rb b/examples/ruby/DnsReverseV22.rb new file mode 100644 index 0000000..0bc0250 --- /dev/null +++ b/examples/ruby/DnsReverseV22.rb @@ -0,0 +1,28 @@ +# Reverse DNS Lookup (v2.2) +# +# Parameters for dnsReverseV22 (GET /v2.2/dns/reverse): +# - value (string, required): IP, CIDR, or record value +# - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required) +# - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match... +# - page (integer, optional) +# - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +# - sort_by (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +# - format (string (one of: json, xml), optional) + +require "json" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DNSApi.new + +begin + result = api.dns_reverse_v22("8.8.8.8", "a", page: 1) + puts JSON.pretty_generate(result.to_hash) +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/DnsReverseV23.rb b/examples/ruby/DnsReverseV23.rb new file mode 100644 index 0000000..3a72f15 --- /dev/null +++ b/examples/ruby/DnsReverseV23.rb @@ -0,0 +1,28 @@ +# Reverse DNS Lookup (v2.3) +# +# Parameters for dnsReverseV23 (GET /v2.3/dns/reverse): +# - value (string, required): IP, CIDR, or record value +# - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required) +# - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match... +# - page (integer, optional) +# - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +# - sort_by (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +# - format (string (one of: json, xml), optional) + +require "json" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DNSApi.new + +begin + result = api.dns_reverse_v23("8.8.8.8", "a", page: 1) + puts JSON.pretty_generate(result.to_hash) +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/IpReputationV2.rb b/examples/ruby/IpReputationV2.rb new file mode 100644 index 0000000..fa7193f --- /dev/null +++ b/examples/ruby/IpReputationV2.rb @@ -0,0 +1,22 @@ +# IP Reputation Lookup (v2.0) +# +# Parameters for ipReputationV2 (GET /v2.0/security): +# - ip (string, required) + +require "json" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::IPReputationApi.new + +begin + result = api.ip_reputation_v2("8.8.8.8") + puts JSON.pretty_generate(result.to_hash) +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/README.md b/examples/ruby/README.md index 2c65e41..d146e16 100644 --- a/examples/ruby/README.md +++ b/examples/ruby/README.md @@ -12,6 +12,10 @@ Install: see the [Ruby guide](../../docs/languages/ruby.md). Set the `WHOISFREAK - [`DnsLive.rb`](DnsLive.rb): Live DNS Lookup (`GET /v2.0/dns/live`) - [`DnsHistorical.rb`](DnsHistorical.rb): Historical DNS Lookup (`GET /v2.0/dns/historical`) - [`DnsReverse.rb`](DnsReverse.rb): Reverse DNS Lookup (`GET /v2.1/dns/reverse`) +- [`DnsHistoricalV22.rb`](DnsHistoricalV22.rb): Historical DNS Lookup (v2.2) (`GET /v2.2/dns/historical`) +- [`DnsHistoricalV23.rb`](DnsHistoricalV23.rb): Historical DNS Lookup (v2.3) (`GET /v2.3/dns/historical`) +- [`DnsReverseV22.rb`](DnsReverseV22.rb): Reverse DNS Lookup (v2.2) (`GET /v2.2/dns/reverse`) +- [`DnsReverseV23.rb`](DnsReverseV23.rb): Reverse DNS Lookup (v2.3) (`GET /v2.3/dns/reverse`) - [`DnsBulk.rb`](DnsBulk.rb): Bulk DNS Lookup (`POST /v2.0/dns/bulk/live`) ## Domain Availability @@ -34,6 +38,8 @@ Install: see the [Ruby guide](../../docs/languages/ruby.md). Set the `WHOISFREAK ## IP Reputation - [`IpReputation.rb`](IpReputation.rb): IP Reputation Lookup (`GET /v1.0/security`) - [`BulkIpReputation.rb`](BulkIpReputation.rb): Bulk IP Reputation (`POST /v1.0/security`) +- [`IpReputationV2.rb`](IpReputationV2.rb): IP Reputation Lookup (v2.0) (`GET /v2.0/security`) +- [`BulkIpReputationV2.rb`](BulkIpReputationV2.rb): Bulk IP Reputation (v2.0) (`POST /v2.0/security`) ## Domain Reputation - [`DomainReputation.rb`](DomainReputation.rb): Domain Reputation Lookup (`GET /v1/domain/security`) @@ -105,3 +111,33 @@ Install: see the [Ruby guide](../../docs/languages/ruby.md). Set the `WHOISFREAK - [`DownloadThreatFeedMalwareSample.rb`](DownloadThreatFeedMalwareSample.rb): Download a sample of the malware threat feed (CSV) (`GET /v3.4/download/threat-feed/malware/sample`) - [`DownloadThreatFeedSpam.rb`](DownloadThreatFeedSpam.rb): Download the daily spam threat feed (CSV) (`GET /v3.4/download/threat-feed/spam`) - [`DownloadThreatFeedSpamSample.rb`](DownloadThreatFeedSpamSample.rb): Download a sample of the spam threat feed (CSV) (`GET /v3.4/download/threat-feed/spam/sample`) + +## Databases - Streaming +- [`StreamThreatFeedPhishing.rb`](StreamThreatFeedPhishing.rb): Stream the daily phishing threat feed (CSV) (`GET /v3.4/stream/threat-feed/phishing`) +- [`StreamThreatFeedPhishingSample.rb`](StreamThreatFeedPhishingSample.rb): Stream a sample of the phishing threat feed (CSV) (`GET /v3.4/stream/threat-feed/phishing/sample`) +- [`StreamThreatFeedMalware.rb`](StreamThreatFeedMalware.rb): Stream the daily malware threat feed (CSV) (`GET /v3.4/stream/threat-feed/malware`) +- [`StreamThreatFeedMalwareSample.rb`](StreamThreatFeedMalwareSample.rb): Stream a sample of the malware threat feed (CSV) (`GET /v3.4/stream/threat-feed/malware/sample`) +- [`StreamThreatFeedSpam.rb`](StreamThreatFeedSpam.rb): Stream the daily spam threat feed (CSV) (`GET /v3.4/stream/threat-feed/spam`) +- [`StreamThreatFeedSpamSample.rb`](StreamThreatFeedSpamSample.rb): Stream a sample of the spam threat feed (CSV) (`GET /v3.4/stream/threat-feed/spam/sample`) +- [`StreamDomainerGtld.rb`](StreamDomainerGtld.rb): Stream newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/gtld`) +- [`StreamDomainerGtldCleaned.rb`](StreamDomainerGtldCleaned.rb): Stream cleaned newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned`) +- [`StreamDomainerGtldCleanedEmail.rb`](StreamDomainerGtldCleanedEmail.rb): Stream cleaned newly registered gTLD domains with an email (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned/email`) +- [`StreamDomainerGtldCleanedPhone.rb`](StreamDomainerGtldCleanedPhone.rb): Stream cleaned newly registered gTLD domains with a phone (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned/phone`) +- [`StreamDomainerCctld.rb`](StreamDomainerCctld.rb): Stream newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/cctld`) +- [`StreamDomainerCctldCleaned.rb`](StreamDomainerCctldCleaned.rb): Stream cleaned newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned`) +- [`StreamDomainerCctldCleanedEmail.rb`](StreamDomainerCctldCleanedEmail.rb): Stream cleaned newly registered ccTLD domains with an email (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned/email`) +- [`StreamDomainerCctldCleanedPhone.rb`](StreamDomainerCctldCleanedPhone.rb): Stream cleaned newly registered ccTLD domains with a phone (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned/phone`) +- [`StreamDomainerExpired.rb`](StreamDomainerExpired.rb): Stream expiring domains (CSV) (`GET /v3.3/stream/domainer/expired`) +- [`StreamDomainerExpiredCleaned.rb`](StreamDomainerExpiredCleaned.rb): Stream cleaned expiring domains (CSV) (`GET /v3.3/stream/domainer/expired/cleaned`) +- [`StreamDomainerExpiredCleanedEmail.rb`](StreamDomainerExpiredCleanedEmail.rb): Stream cleaned expiring domains with an email (CSV) (`GET /v3.3/stream/domainer/expired/cleaned/email`) +- [`StreamDomainerExpiredCleanedPhone.rb`](StreamDomainerExpiredCleanedPhone.rb): Stream cleaned expiring domains with a phone (CSV) (`GET /v3.3/stream/domainer/expired/cleaned/phone`) +- [`StreamDomainerDropped.rb`](StreamDomainerDropped.rb): Stream dropped domains (CSV) (`GET /v3.3/stream/domainer/dropped`) +- [`StreamDomainerDroppedBacklinks.rb`](StreamDomainerDroppedBacklinks.rb): Stream dropped domains with backlinks (CSV) (`GET /v3.3/stream/domainer/dropped/backlinks`) +- [`StreamDomainerGtldSample.rb`](StreamDomainerGtldSample.rb): Stream a sample of newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/gtld`) +- [`StreamDomainerGtldCleanedSample.rb`](StreamDomainerGtldCleanedSample.rb): Stream a sample of cleaned newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/gtld/cleaned`) +- [`StreamDomainerCctldSample.rb`](StreamDomainerCctldSample.rb): Stream a sample of newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/cctld`) +- [`StreamDomainerCctldCleanedSample.rb`](StreamDomainerCctldCleanedSample.rb): Stream a sample of cleaned newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/cctld/cleaned`) +- [`StreamDomainerExpiredSample.rb`](StreamDomainerExpiredSample.rb): Stream a sample of expiring domains (CSV) (`GET /v3.3/stream/domainer/sample/expired`) +- [`StreamDomainerExpiredCleanedSample.rb`](StreamDomainerExpiredCleanedSample.rb): Stream a sample of cleaned expiring domains (CSV) (`GET /v3.3/stream/domainer/sample/expired/cleaned`) +- [`StreamDomainerDroppedSample.rb`](StreamDomainerDroppedSample.rb): Stream a sample of dropped domains (CSV) (`GET /v3.3/stream/domainer/sample/dropped`) +- [`StreamDomainerDroppedBacklinksSample.rb`](StreamDomainerDroppedBacklinksSample.rb): Stream a sample of dropped domains with backlinks (CSV) (`GET /v3.3/stream/domainer/sample/dropped/backlinks`) diff --git a/examples/ruby/StreamDomainerCctld.rb b/examples/ruby/StreamDomainerCctld.rb new file mode 100644 index 0000000..7d4e82c --- /dev/null +++ b/examples/ruby/StreamDomainerCctld.rb @@ -0,0 +1,25 @@ +# Stream newly registered ccTLD domains (CSV) +# +# Parameters for streamDomainerCctld (GET /v3.3/stream/domainer/cctld): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_cctld(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamDomainerCctldCleaned.rb b/examples/ruby/StreamDomainerCctldCleaned.rb new file mode 100644 index 0000000..b2a0fde --- /dev/null +++ b/examples/ruby/StreamDomainerCctldCleaned.rb @@ -0,0 +1,25 @@ +# Stream cleaned newly registered ccTLD domains (CSV) +# +# Parameters for streamDomainerCctldCleaned (GET /v3.3/stream/domainer/cctld/cleaned): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_cctld_cleaned(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamDomainerCctldCleanedEmail.rb b/examples/ruby/StreamDomainerCctldCleanedEmail.rb new file mode 100644 index 0000000..b8b6e8a --- /dev/null +++ b/examples/ruby/StreamDomainerCctldCleanedEmail.rb @@ -0,0 +1,25 @@ +# Stream cleaned newly registered ccTLD domains with an email (CSV) +# +# Parameters for streamDomainerCctldCleanedEmail (GET /v3.3/stream/domainer/cctld/cleaned/email): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_cctld_cleaned_email(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamDomainerCctldCleanedPhone.rb b/examples/ruby/StreamDomainerCctldCleanedPhone.rb new file mode 100644 index 0000000..dfbe73e --- /dev/null +++ b/examples/ruby/StreamDomainerCctldCleanedPhone.rb @@ -0,0 +1,25 @@ +# Stream cleaned newly registered ccTLD domains with a phone (CSV) +# +# Parameters for streamDomainerCctldCleanedPhone (GET /v3.3/stream/domainer/cctld/cleaned/phone): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_cctld_cleaned_phone(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamDomainerCctldCleanedSample.rb b/examples/ruby/StreamDomainerCctldCleanedSample.rb new file mode 100644 index 0000000..6dfd99b --- /dev/null +++ b/examples/ruby/StreamDomainerCctldCleanedSample.rb @@ -0,0 +1,24 @@ +# Stream a sample of cleaned newly registered ccTLD domains (CSV) +# +# Parameters for streamDomainerCctldCleanedSample (GET /v3.3/stream/domainer/sample/cctld/cleaned): +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "whoisfreaks" + +# Read the API key from the environment and set it once. +# (This endpoint is public, so the key is not sent with this request.) +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_cctld_cleaned_sample + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamDomainerCctldSample.rb b/examples/ruby/StreamDomainerCctldSample.rb new file mode 100644 index 0000000..76d0613 --- /dev/null +++ b/examples/ruby/StreamDomainerCctldSample.rb @@ -0,0 +1,24 @@ +# Stream a sample of newly registered ccTLD domains (CSV) +# +# Parameters for streamDomainerCctldSample (GET /v3.3/stream/domainer/sample/cctld): +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "whoisfreaks" + +# Read the API key from the environment and set it once. +# (This endpoint is public, so the key is not sent with this request.) +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_cctld_sample + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamDomainerDropped.rb b/examples/ruby/StreamDomainerDropped.rb new file mode 100644 index 0000000..394136c --- /dev/null +++ b/examples/ruby/StreamDomainerDropped.rb @@ -0,0 +1,25 @@ +# Stream dropped domains (CSV) +# +# Parameters for streamDomainerDropped (GET /v3.3/stream/domainer/dropped): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_dropped(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamDomainerDroppedBacklinks.rb b/examples/ruby/StreamDomainerDroppedBacklinks.rb new file mode 100644 index 0000000..2ec0751 --- /dev/null +++ b/examples/ruby/StreamDomainerDroppedBacklinks.rb @@ -0,0 +1,25 @@ +# Stream dropped domains with backlinks (CSV) +# +# Parameters for streamDomainerDroppedBacklinks (GET /v3.3/stream/domainer/dropped/backlinks): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_dropped_backlinks(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamDomainerDroppedBacklinksSample.rb b/examples/ruby/StreamDomainerDroppedBacklinksSample.rb new file mode 100644 index 0000000..e382b08 --- /dev/null +++ b/examples/ruby/StreamDomainerDroppedBacklinksSample.rb @@ -0,0 +1,24 @@ +# Stream a sample of dropped domains with backlinks (CSV) +# +# Parameters for streamDomainerDroppedBacklinksSample (GET /v3.3/stream/domainer/sample/dropped/backlinks): +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "whoisfreaks" + +# Read the API key from the environment and set it once. +# (This endpoint is public, so the key is not sent with this request.) +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_dropped_backlinks_sample + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamDomainerDroppedSample.rb b/examples/ruby/StreamDomainerDroppedSample.rb new file mode 100644 index 0000000..4e7db32 --- /dev/null +++ b/examples/ruby/StreamDomainerDroppedSample.rb @@ -0,0 +1,24 @@ +# Stream a sample of dropped domains (CSV) +# +# Parameters for streamDomainerDroppedSample (GET /v3.3/stream/domainer/sample/dropped): +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "whoisfreaks" + +# Read the API key from the environment and set it once. +# (This endpoint is public, so the key is not sent with this request.) +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_dropped_sample + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamDomainerExpired.rb b/examples/ruby/StreamDomainerExpired.rb new file mode 100644 index 0000000..adb5939 --- /dev/null +++ b/examples/ruby/StreamDomainerExpired.rb @@ -0,0 +1,25 @@ +# Stream expiring domains (CSV) +# +# Parameters for streamDomainerExpired (GET /v3.3/stream/domainer/expired): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_expired(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamDomainerExpiredCleaned.rb b/examples/ruby/StreamDomainerExpiredCleaned.rb new file mode 100644 index 0000000..abf0348 --- /dev/null +++ b/examples/ruby/StreamDomainerExpiredCleaned.rb @@ -0,0 +1,25 @@ +# Stream cleaned expiring domains (CSV) +# +# Parameters for streamDomainerExpiredCleaned (GET /v3.3/stream/domainer/expired/cleaned): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_expired_cleaned(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamDomainerExpiredCleanedEmail.rb b/examples/ruby/StreamDomainerExpiredCleanedEmail.rb new file mode 100644 index 0000000..3bafafe --- /dev/null +++ b/examples/ruby/StreamDomainerExpiredCleanedEmail.rb @@ -0,0 +1,25 @@ +# Stream cleaned expiring domains with an email (CSV) +# +# Parameters for streamDomainerExpiredCleanedEmail (GET /v3.3/stream/domainer/expired/cleaned/email): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_expired_cleaned_email(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamDomainerExpiredCleanedPhone.rb b/examples/ruby/StreamDomainerExpiredCleanedPhone.rb new file mode 100644 index 0000000..a159c31 --- /dev/null +++ b/examples/ruby/StreamDomainerExpiredCleanedPhone.rb @@ -0,0 +1,25 @@ +# Stream cleaned expiring domains with a phone (CSV) +# +# Parameters for streamDomainerExpiredCleanedPhone (GET /v3.3/stream/domainer/expired/cleaned/phone): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_expired_cleaned_phone(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamDomainerExpiredCleanedSample.rb b/examples/ruby/StreamDomainerExpiredCleanedSample.rb new file mode 100644 index 0000000..31b8cbe --- /dev/null +++ b/examples/ruby/StreamDomainerExpiredCleanedSample.rb @@ -0,0 +1,24 @@ +# Stream a sample of cleaned expiring domains (CSV) +# +# Parameters for streamDomainerExpiredCleanedSample (GET /v3.3/stream/domainer/sample/expired/cleaned): +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "whoisfreaks" + +# Read the API key from the environment and set it once. +# (This endpoint is public, so the key is not sent with this request.) +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_expired_cleaned_sample + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamDomainerExpiredSample.rb b/examples/ruby/StreamDomainerExpiredSample.rb new file mode 100644 index 0000000..1be9d7b --- /dev/null +++ b/examples/ruby/StreamDomainerExpiredSample.rb @@ -0,0 +1,24 @@ +# Stream a sample of expiring domains (CSV) +# +# Parameters for streamDomainerExpiredSample (GET /v3.3/stream/domainer/sample/expired): +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "whoisfreaks" + +# Read the API key from the environment and set it once. +# (This endpoint is public, so the key is not sent with this request.) +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_expired_sample + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamDomainerGtld.rb b/examples/ruby/StreamDomainerGtld.rb new file mode 100644 index 0000000..608363d --- /dev/null +++ b/examples/ruby/StreamDomainerGtld.rb @@ -0,0 +1,25 @@ +# Stream newly registered gTLD domains (CSV) +# +# Parameters for streamDomainerGtld (GET /v3.3/stream/domainer/gtld): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_gtld(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamDomainerGtldCleaned.rb b/examples/ruby/StreamDomainerGtldCleaned.rb new file mode 100644 index 0000000..88a44fc --- /dev/null +++ b/examples/ruby/StreamDomainerGtldCleaned.rb @@ -0,0 +1,25 @@ +# Stream cleaned newly registered gTLD domains (CSV) +# +# Parameters for streamDomainerGtldCleaned (GET /v3.3/stream/domainer/gtld/cleaned): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_gtld_cleaned(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamDomainerGtldCleanedEmail.rb b/examples/ruby/StreamDomainerGtldCleanedEmail.rb new file mode 100644 index 0000000..f4b2839 --- /dev/null +++ b/examples/ruby/StreamDomainerGtldCleanedEmail.rb @@ -0,0 +1,25 @@ +# Stream cleaned newly registered gTLD domains with an email (CSV) +# +# Parameters for streamDomainerGtldCleanedEmail (GET /v3.3/stream/domainer/gtld/cleaned/email): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_gtld_cleaned_email(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamDomainerGtldCleanedPhone.rb b/examples/ruby/StreamDomainerGtldCleanedPhone.rb new file mode 100644 index 0000000..f31e68e --- /dev/null +++ b/examples/ruby/StreamDomainerGtldCleanedPhone.rb @@ -0,0 +1,25 @@ +# Stream cleaned newly registered gTLD domains with a phone (CSV) +# +# Parameters for streamDomainerGtldCleanedPhone (GET /v3.3/stream/domainer/gtld/cleaned/phone): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_gtld_cleaned_phone(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamDomainerGtldCleanedSample.rb b/examples/ruby/StreamDomainerGtldCleanedSample.rb new file mode 100644 index 0000000..b8b16a4 --- /dev/null +++ b/examples/ruby/StreamDomainerGtldCleanedSample.rb @@ -0,0 +1,24 @@ +# Stream a sample of cleaned newly registered gTLD domains (CSV) +# +# Parameters for streamDomainerGtldCleanedSample (GET /v3.3/stream/domainer/sample/gtld/cleaned): +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "whoisfreaks" + +# Read the API key from the environment and set it once. +# (This endpoint is public, so the key is not sent with this request.) +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_gtld_cleaned_sample + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamDomainerGtldSample.rb b/examples/ruby/StreamDomainerGtldSample.rb new file mode 100644 index 0000000..783ed7b --- /dev/null +++ b/examples/ruby/StreamDomainerGtldSample.rb @@ -0,0 +1,24 @@ +# Stream a sample of newly registered gTLD domains (CSV) +# +# Parameters for streamDomainerGtldSample (GET /v3.3/stream/domainer/sample/gtld): +# - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "whoisfreaks" + +# Read the API key from the environment and set it once. +# (This endpoint is public, so the key is not sent with this request.) +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_domainer_gtld_sample + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamThreatFeedMalware.rb b/examples/ruby/StreamThreatFeedMalware.rb new file mode 100644 index 0000000..1b8f875 --- /dev/null +++ b/examples/ruby/StreamThreatFeedMalware.rb @@ -0,0 +1,24 @@ +# Stream the daily malware threat feed (CSV) +# +# Parameters for streamThreatFeedMalware (GET /v3.4/stream/threat-feed/malware): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_threat_feed_malware(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamThreatFeedMalwareSample.rb b/examples/ruby/StreamThreatFeedMalwareSample.rb new file mode 100644 index 0000000..a111aef --- /dev/null +++ b/examples/ruby/StreamThreatFeedMalwareSample.rb @@ -0,0 +1,23 @@ +# Stream a sample of the malware threat feed (CSV) +# +# Parameters for streamThreatFeedMalwareSample (GET /v3.4/stream/threat-feed/malware/sample): +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "whoisfreaks" + +# Read the API key from the environment and set it once. +# (This endpoint is public, so the key is not sent with this request.) +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_threat_feed_malware_sample + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamThreatFeedPhishing.rb b/examples/ruby/StreamThreatFeedPhishing.rb new file mode 100644 index 0000000..1e424ff --- /dev/null +++ b/examples/ruby/StreamThreatFeedPhishing.rb @@ -0,0 +1,24 @@ +# Stream the daily phishing threat feed (CSV) +# +# Parameters for streamThreatFeedPhishing (GET /v3.4/stream/threat-feed/phishing): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_threat_feed_phishing(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamThreatFeedPhishingSample.rb b/examples/ruby/StreamThreatFeedPhishingSample.rb new file mode 100644 index 0000000..2173e8a --- /dev/null +++ b/examples/ruby/StreamThreatFeedPhishingSample.rb @@ -0,0 +1,23 @@ +# Stream a sample of the phishing threat feed (CSV) +# +# Parameters for streamThreatFeedPhishingSample (GET /v3.4/stream/threat-feed/phishing/sample): +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "whoisfreaks" + +# Read the API key from the environment and set it once. +# (This endpoint is public, so the key is not sent with this request.) +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_threat_feed_phishing_sample + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamThreatFeedSpam.rb b/examples/ruby/StreamThreatFeedSpam.rb new file mode 100644 index 0000000..b5f8810 --- /dev/null +++ b/examples/ruby/StreamThreatFeedSpam.rb @@ -0,0 +1,24 @@ +# Stream the daily spam threat feed (CSV) +# +# Parameters for streamThreatFeedSpam (GET /v3.4/stream/threat-feed/spam): +# - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "date" +require "whoisfreaks" + +# Read the API key from the environment and set it once. +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_threat_feed_spam(Date.parse("2026-10-01")) + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/ruby/StreamThreatFeedSpamSample.rb b/examples/ruby/StreamThreatFeedSpamSample.rb new file mode 100644 index 0000000..41b55f3 --- /dev/null +++ b/examples/ruby/StreamThreatFeedSpamSample.rb @@ -0,0 +1,23 @@ +# Stream a sample of the spam threat feed (CSV) +# +# Parameters for streamThreatFeedSpamSample (GET /v3.4/stream/threat-feed/spam/sample): +# - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +# - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... + +require "whoisfreaks" + +# Read the API key from the environment and set it once. +# (This endpoint is public, so the key is not sent with this request.) +WhoisFreaks.configure do |config| + config.api_key["apiKey"] = ENV.fetch("WHOISFREAKS_API_KEY") +end + +api = WhoisFreaks::DatabasesStreamingApi.new + +begin + result = api.stream_threat_feed_spam_sample + puts result +rescue WhoisFreaks::ApiError => e + warn "Request failed: HTTP #{e.code} #{e.response_body}" + exit 1 +end diff --git a/examples/swift/BulkIpReputationV2.swift b/examples/swift/BulkIpReputationV2.swift new file mode 100644 index 0000000..6ca1ec0 --- /dev/null +++ b/examples/swift/BulkIpReputationV2.swift @@ -0,0 +1,26 @@ +// Bulk IP Reputation (v2.0) +// +// Parameters for bulkIpReputationV2 (POST /v2.0/security): +// - body: BulkGeolocationRequest (required): request body object +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +let request = BulkGeolocationRequest(ips: ["1.1.1.1", "2.2.2.2", "8.8.8.8"]) + +do { + let result = try await IPReputationAPI.bulkIpReputationV2(bulkGeolocationRequest: request) + print(String(decoding: try CodableHelper.jsonEncoder.encode(result), as: UTF8.self)) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/DnsHistoricalV22.swift b/examples/swift/DnsHistoricalV22.swift new file mode 100644 index 0000000..63c4dff --- /dev/null +++ b/examples/swift/DnsHistoricalV22.swift @@ -0,0 +1,29 @@ +// Historical DNS Lookup (v2.2) +// +// Parameters for dnsHistoricalV22 (GET /v2.2/dns/historical): +// - domainName (string, required) +// - type (string, required) +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DNSAPI.dnsHistoricalV22(domainName: "whoisfreaks.com", type: "A,MX,TXT", page: 1) + print(String(decoding: try CodableHelper.jsonEncoder.encode(result), as: UTF8.self)) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/DnsHistoricalV23.swift b/examples/swift/DnsHistoricalV23.swift new file mode 100644 index 0000000..90eaccb --- /dev/null +++ b/examples/swift/DnsHistoricalV23.swift @@ -0,0 +1,29 @@ +// Historical DNS Lookup (v2.3) +// +// Parameters for dnsHistoricalV23 (GET /v2.3/dns/historical): +// - domainName (string, required) +// - type (string, required) +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DNSAPI.dnsHistoricalV23(domainName: "whoisfreaks.com", type: "A,MX,TXT", page: 1) + print(String(decoding: try CodableHelper.jsonEncoder.encode(result), as: UTF8.self)) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/DnsReverseV22.swift b/examples/swift/DnsReverseV22.swift new file mode 100644 index 0000000..e0ab524 --- /dev/null +++ b/examples/swift/DnsReverseV22.swift @@ -0,0 +1,30 @@ +// Reverse DNS Lookup (v2.2) +// +// Parameters for dnsReverseV22 (GET /v2.2/dns/reverse): +// - value (string, required): IP, CIDR, or record value +// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required) +// - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match... +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DNSAPI.dnsReverseV22(value: "8.8.8.8", type: .a, page: 1) + print(String(decoding: try CodableHelper.jsonEncoder.encode(result), as: UTF8.self)) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/DnsReverseV23.swift b/examples/swift/DnsReverseV23.swift new file mode 100644 index 0000000..78f8470 --- /dev/null +++ b/examples/swift/DnsReverseV23.swift @@ -0,0 +1,30 @@ +// Reverse DNS Lookup (v2.3) +// +// Parameters for dnsReverseV23 (GET /v2.3/dns/reverse): +// - value (string, required): IP, CIDR, or record value +// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required) +// - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match... +// - page (integer, optional) +// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted. +// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given. +// - format (string (one of: json, xml), optional) +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DNSAPI.dnsReverseV23(value: "8.8.8.8", type: .a, page: 1) + print(String(decoding: try CodableHelper.jsonEncoder.encode(result), as: UTF8.self)) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/IpReputationV2.swift b/examples/swift/IpReputationV2.swift new file mode 100644 index 0000000..2bbf344 --- /dev/null +++ b/examples/swift/IpReputationV2.swift @@ -0,0 +1,24 @@ +// IP Reputation Lookup (v2.0) +// +// Parameters for ipReputationV2 (GET /v2.0/security): +// - ip (string, required) +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await IPReputationAPI.ipReputationV2(ip: "8.8.8.8") + print(String(decoding: try CodableHelper.jsonEncoder.encode(result), as: UTF8.self)) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/README.md b/examples/swift/README.md index f99606f..dec8860 100644 --- a/examples/swift/README.md +++ b/examples/swift/README.md @@ -12,6 +12,10 @@ Install: see the [Swift guide](../../docs/languages/swift.md). Set the `WHOISFRE - [`DnsLive.swift`](DnsLive.swift): Live DNS Lookup (`GET /v2.0/dns/live`) - [`DnsHistorical.swift`](DnsHistorical.swift): Historical DNS Lookup (`GET /v2.0/dns/historical`) - [`DnsReverse.swift`](DnsReverse.swift): Reverse DNS Lookup (`GET /v2.1/dns/reverse`) +- [`DnsHistoricalV22.swift`](DnsHistoricalV22.swift): Historical DNS Lookup (v2.2) (`GET /v2.2/dns/historical`) +- [`DnsHistoricalV23.swift`](DnsHistoricalV23.swift): Historical DNS Lookup (v2.3) (`GET /v2.3/dns/historical`) +- [`DnsReverseV22.swift`](DnsReverseV22.swift): Reverse DNS Lookup (v2.2) (`GET /v2.2/dns/reverse`) +- [`DnsReverseV23.swift`](DnsReverseV23.swift): Reverse DNS Lookup (v2.3) (`GET /v2.3/dns/reverse`) - [`DnsBulk.swift`](DnsBulk.swift): Bulk DNS Lookup (`POST /v2.0/dns/bulk/live`) ## Domain Availability @@ -34,6 +38,8 @@ Install: see the [Swift guide](../../docs/languages/swift.md). Set the `WHOISFRE ## IP Reputation - [`IpReputation.swift`](IpReputation.swift): IP Reputation Lookup (`GET /v1.0/security`) - [`BulkIpReputation.swift`](BulkIpReputation.swift): Bulk IP Reputation (`POST /v1.0/security`) +- [`IpReputationV2.swift`](IpReputationV2.swift): IP Reputation Lookup (v2.0) (`GET /v2.0/security`) +- [`BulkIpReputationV2.swift`](BulkIpReputationV2.swift): Bulk IP Reputation (v2.0) (`POST /v2.0/security`) ## Domain Reputation - [`DomainReputation.swift`](DomainReputation.swift): Domain Reputation Lookup (`GET /v1/domain/security`) @@ -105,3 +111,33 @@ Install: see the [Swift guide](../../docs/languages/swift.md). Set the `WHOISFRE - [`DownloadThreatFeedMalwareSample.swift`](DownloadThreatFeedMalwareSample.swift): Download a sample of the malware threat feed (CSV) (`GET /v3.4/download/threat-feed/malware/sample`) - [`DownloadThreatFeedSpam.swift`](DownloadThreatFeedSpam.swift): Download the daily spam threat feed (CSV) (`GET /v3.4/download/threat-feed/spam`) - [`DownloadThreatFeedSpamSample.swift`](DownloadThreatFeedSpamSample.swift): Download a sample of the spam threat feed (CSV) (`GET /v3.4/download/threat-feed/spam/sample`) + +## Databases - Streaming +- [`StreamThreatFeedPhishing.swift`](StreamThreatFeedPhishing.swift): Stream the daily phishing threat feed (CSV) (`GET /v3.4/stream/threat-feed/phishing`) +- [`StreamThreatFeedPhishingSample.swift`](StreamThreatFeedPhishingSample.swift): Stream a sample of the phishing threat feed (CSV) (`GET /v3.4/stream/threat-feed/phishing/sample`) +- [`StreamThreatFeedMalware.swift`](StreamThreatFeedMalware.swift): Stream the daily malware threat feed (CSV) (`GET /v3.4/stream/threat-feed/malware`) +- [`StreamThreatFeedMalwareSample.swift`](StreamThreatFeedMalwareSample.swift): Stream a sample of the malware threat feed (CSV) (`GET /v3.4/stream/threat-feed/malware/sample`) +- [`StreamThreatFeedSpam.swift`](StreamThreatFeedSpam.swift): Stream the daily spam threat feed (CSV) (`GET /v3.4/stream/threat-feed/spam`) +- [`StreamThreatFeedSpamSample.swift`](StreamThreatFeedSpamSample.swift): Stream a sample of the spam threat feed (CSV) (`GET /v3.4/stream/threat-feed/spam/sample`) +- [`StreamDomainerGtld.swift`](StreamDomainerGtld.swift): Stream newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/gtld`) +- [`StreamDomainerGtldCleaned.swift`](StreamDomainerGtldCleaned.swift): Stream cleaned newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned`) +- [`StreamDomainerGtldCleanedEmail.swift`](StreamDomainerGtldCleanedEmail.swift): Stream cleaned newly registered gTLD domains with an email (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned/email`) +- [`StreamDomainerGtldCleanedPhone.swift`](StreamDomainerGtldCleanedPhone.swift): Stream cleaned newly registered gTLD domains with a phone (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned/phone`) +- [`StreamDomainerCctld.swift`](StreamDomainerCctld.swift): Stream newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/cctld`) +- [`StreamDomainerCctldCleaned.swift`](StreamDomainerCctldCleaned.swift): Stream cleaned newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned`) +- [`StreamDomainerCctldCleanedEmail.swift`](StreamDomainerCctldCleanedEmail.swift): Stream cleaned newly registered ccTLD domains with an email (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned/email`) +- [`StreamDomainerCctldCleanedPhone.swift`](StreamDomainerCctldCleanedPhone.swift): Stream cleaned newly registered ccTLD domains with a phone (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned/phone`) +- [`StreamDomainerExpired.swift`](StreamDomainerExpired.swift): Stream expiring domains (CSV) (`GET /v3.3/stream/domainer/expired`) +- [`StreamDomainerExpiredCleaned.swift`](StreamDomainerExpiredCleaned.swift): Stream cleaned expiring domains (CSV) (`GET /v3.3/stream/domainer/expired/cleaned`) +- [`StreamDomainerExpiredCleanedEmail.swift`](StreamDomainerExpiredCleanedEmail.swift): Stream cleaned expiring domains with an email (CSV) (`GET /v3.3/stream/domainer/expired/cleaned/email`) +- [`StreamDomainerExpiredCleanedPhone.swift`](StreamDomainerExpiredCleanedPhone.swift): Stream cleaned expiring domains with a phone (CSV) (`GET /v3.3/stream/domainer/expired/cleaned/phone`) +- [`StreamDomainerDropped.swift`](StreamDomainerDropped.swift): Stream dropped domains (CSV) (`GET /v3.3/stream/domainer/dropped`) +- [`StreamDomainerDroppedBacklinks.swift`](StreamDomainerDroppedBacklinks.swift): Stream dropped domains with backlinks (CSV) (`GET /v3.3/stream/domainer/dropped/backlinks`) +- [`StreamDomainerGtldSample.swift`](StreamDomainerGtldSample.swift): Stream a sample of newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/gtld`) +- [`StreamDomainerGtldCleanedSample.swift`](StreamDomainerGtldCleanedSample.swift): Stream a sample of cleaned newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/gtld/cleaned`) +- [`StreamDomainerCctldSample.swift`](StreamDomainerCctldSample.swift): Stream a sample of newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/cctld`) +- [`StreamDomainerCctldCleanedSample.swift`](StreamDomainerCctldCleanedSample.swift): Stream a sample of cleaned newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/cctld/cleaned`) +- [`StreamDomainerExpiredSample.swift`](StreamDomainerExpiredSample.swift): Stream a sample of expiring domains (CSV) (`GET /v3.3/stream/domainer/sample/expired`) +- [`StreamDomainerExpiredCleanedSample.swift`](StreamDomainerExpiredCleanedSample.swift): Stream a sample of cleaned expiring domains (CSV) (`GET /v3.3/stream/domainer/sample/expired/cleaned`) +- [`StreamDomainerDroppedSample.swift`](StreamDomainerDroppedSample.swift): Stream a sample of dropped domains (CSV) (`GET /v3.3/stream/domainer/sample/dropped`) +- [`StreamDomainerDroppedBacklinksSample.swift`](StreamDomainerDroppedBacklinksSample.swift): Stream a sample of dropped domains with backlinks (CSV) (`GET /v3.3/stream/domainer/sample/dropped/backlinks`) diff --git a/examples/swift/StreamDomainerCctld.swift b/examples/swift/StreamDomainerCctld.swift new file mode 100644 index 0000000..f374b07 --- /dev/null +++ b/examples/swift/StreamDomainerCctld.swift @@ -0,0 +1,27 @@ +// Stream newly registered ccTLD domains (CSV) +// +// Parameters for streamDomainerCctld (GET /v3.3/stream/domainer/cctld): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerCctld(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamDomainerCctldCleaned.swift b/examples/swift/StreamDomainerCctldCleaned.swift new file mode 100644 index 0000000..4214712 --- /dev/null +++ b/examples/swift/StreamDomainerCctldCleaned.swift @@ -0,0 +1,27 @@ +// Stream cleaned newly registered ccTLD domains (CSV) +// +// Parameters for streamDomainerCctldCleaned (GET /v3.3/stream/domainer/cctld/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerCctldCleaned(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamDomainerCctldCleanedEmail.swift b/examples/swift/StreamDomainerCctldCleanedEmail.swift new file mode 100644 index 0000000..0db613d --- /dev/null +++ b/examples/swift/StreamDomainerCctldCleanedEmail.swift @@ -0,0 +1,27 @@ +// Stream cleaned newly registered ccTLD domains with an email (CSV) +// +// Parameters for streamDomainerCctldCleanedEmail (GET /v3.3/stream/domainer/cctld/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerCctldCleanedEmail(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamDomainerCctldCleanedPhone.swift b/examples/swift/StreamDomainerCctldCleanedPhone.swift new file mode 100644 index 0000000..44a8316 --- /dev/null +++ b/examples/swift/StreamDomainerCctldCleanedPhone.swift @@ -0,0 +1,27 @@ +// Stream cleaned newly registered ccTLD domains with a phone (CSV) +// +// Parameters for streamDomainerCctldCleanedPhone (GET /v3.3/stream/domainer/cctld/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerCctldCleanedPhone(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamDomainerCctldCleanedSample.swift b/examples/swift/StreamDomainerCctldCleanedSample.swift new file mode 100644 index 0000000..5032c0c --- /dev/null +++ b/examples/swift/StreamDomainerCctldCleanedSample.swift @@ -0,0 +1,27 @@ +// Stream a sample of cleaned newly registered ccTLD domains (CSV) +// +// Parameters for streamDomainerCctldCleanedSample (GET /v3.3/stream/domainer/sample/cctld/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] +// (This endpoint is public, so the key is not sent with this request.) + +do { + let result = try await DatabasesStreamingAPI.streamDomainerCctldCleanedSample() + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamDomainerCctldSample.swift b/examples/swift/StreamDomainerCctldSample.swift new file mode 100644 index 0000000..ec3172c --- /dev/null +++ b/examples/swift/StreamDomainerCctldSample.swift @@ -0,0 +1,27 @@ +// Stream a sample of newly registered ccTLD domains (CSV) +// +// Parameters for streamDomainerCctldSample (GET /v3.3/stream/domainer/sample/cctld): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] +// (This endpoint is public, so the key is not sent with this request.) + +do { + let result = try await DatabasesStreamingAPI.streamDomainerCctldSample() + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamDomainerDropped.swift b/examples/swift/StreamDomainerDropped.swift new file mode 100644 index 0000000..2b29214 --- /dev/null +++ b/examples/swift/StreamDomainerDropped.swift @@ -0,0 +1,27 @@ +// Stream dropped domains (CSV) +// +// Parameters for streamDomainerDropped (GET /v3.3/stream/domainer/dropped): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerDropped(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamDomainerDroppedBacklinks.swift b/examples/swift/StreamDomainerDroppedBacklinks.swift new file mode 100644 index 0000000..58f43a7 --- /dev/null +++ b/examples/swift/StreamDomainerDroppedBacklinks.swift @@ -0,0 +1,27 @@ +// Stream dropped domains with backlinks (CSV) +// +// Parameters for streamDomainerDroppedBacklinks (GET /v3.3/stream/domainer/dropped/backlinks): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerDroppedBacklinks(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamDomainerDroppedBacklinksSample.swift b/examples/swift/StreamDomainerDroppedBacklinksSample.swift new file mode 100644 index 0000000..71b6e5a --- /dev/null +++ b/examples/swift/StreamDomainerDroppedBacklinksSample.swift @@ -0,0 +1,27 @@ +// Stream a sample of dropped domains with backlinks (CSV) +// +// Parameters for streamDomainerDroppedBacklinksSample (GET /v3.3/stream/domainer/sample/dropped/backlinks): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] +// (This endpoint is public, so the key is not sent with this request.) + +do { + let result = try await DatabasesStreamingAPI.streamDomainerDroppedBacklinksSample() + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamDomainerDroppedSample.swift b/examples/swift/StreamDomainerDroppedSample.swift new file mode 100644 index 0000000..74db49f --- /dev/null +++ b/examples/swift/StreamDomainerDroppedSample.swift @@ -0,0 +1,27 @@ +// Stream a sample of dropped domains (CSV) +// +// Parameters for streamDomainerDroppedSample (GET /v3.3/stream/domainer/sample/dropped): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] +// (This endpoint is public, so the key is not sent with this request.) + +do { + let result = try await DatabasesStreamingAPI.streamDomainerDroppedSample() + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamDomainerExpired.swift b/examples/swift/StreamDomainerExpired.swift new file mode 100644 index 0000000..2aa2b31 --- /dev/null +++ b/examples/swift/StreamDomainerExpired.swift @@ -0,0 +1,27 @@ +// Stream expiring domains (CSV) +// +// Parameters for streamDomainerExpired (GET /v3.3/stream/domainer/expired): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerExpired(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamDomainerExpiredCleaned.swift b/examples/swift/StreamDomainerExpiredCleaned.swift new file mode 100644 index 0000000..a7340d2 --- /dev/null +++ b/examples/swift/StreamDomainerExpiredCleaned.swift @@ -0,0 +1,27 @@ +// Stream cleaned expiring domains (CSV) +// +// Parameters for streamDomainerExpiredCleaned (GET /v3.3/stream/domainer/expired/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerExpiredCleaned(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamDomainerExpiredCleanedEmail.swift b/examples/swift/StreamDomainerExpiredCleanedEmail.swift new file mode 100644 index 0000000..4c5e4f6 --- /dev/null +++ b/examples/swift/StreamDomainerExpiredCleanedEmail.swift @@ -0,0 +1,27 @@ +// Stream cleaned expiring domains with an email (CSV) +// +// Parameters for streamDomainerExpiredCleanedEmail (GET /v3.3/stream/domainer/expired/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerExpiredCleanedEmail(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamDomainerExpiredCleanedPhone.swift b/examples/swift/StreamDomainerExpiredCleanedPhone.swift new file mode 100644 index 0000000..3018bc6 --- /dev/null +++ b/examples/swift/StreamDomainerExpiredCleanedPhone.swift @@ -0,0 +1,27 @@ +// Stream cleaned expiring domains with a phone (CSV) +// +// Parameters for streamDomainerExpiredCleanedPhone (GET /v3.3/stream/domainer/expired/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerExpiredCleanedPhone(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamDomainerExpiredCleanedSample.swift b/examples/swift/StreamDomainerExpiredCleanedSample.swift new file mode 100644 index 0000000..a1b35b8 --- /dev/null +++ b/examples/swift/StreamDomainerExpiredCleanedSample.swift @@ -0,0 +1,27 @@ +// Stream a sample of cleaned expiring domains (CSV) +// +// Parameters for streamDomainerExpiredCleanedSample (GET /v3.3/stream/domainer/sample/expired/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] +// (This endpoint is public, so the key is not sent with this request.) + +do { + let result = try await DatabasesStreamingAPI.streamDomainerExpiredCleanedSample() + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamDomainerExpiredSample.swift b/examples/swift/StreamDomainerExpiredSample.swift new file mode 100644 index 0000000..c3f4c32 --- /dev/null +++ b/examples/swift/StreamDomainerExpiredSample.swift @@ -0,0 +1,27 @@ +// Stream a sample of expiring domains (CSV) +// +// Parameters for streamDomainerExpiredSample (GET /v3.3/stream/domainer/sample/expired): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] +// (This endpoint is public, so the key is not sent with this request.) + +do { + let result = try await DatabasesStreamingAPI.streamDomainerExpiredSample() + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamDomainerGtld.swift b/examples/swift/StreamDomainerGtld.swift new file mode 100644 index 0000000..d1818b3 --- /dev/null +++ b/examples/swift/StreamDomainerGtld.swift @@ -0,0 +1,27 @@ +// Stream newly registered gTLD domains (CSV) +// +// Parameters for streamDomainerGtld (GET /v3.3/stream/domainer/gtld): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerGtld(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamDomainerGtldCleaned.swift b/examples/swift/StreamDomainerGtldCleaned.swift new file mode 100644 index 0000000..4cc162d --- /dev/null +++ b/examples/swift/StreamDomainerGtldCleaned.swift @@ -0,0 +1,27 @@ +// Stream cleaned newly registered gTLD domains (CSV) +// +// Parameters for streamDomainerGtldCleaned (GET /v3.3/stream/domainer/gtld/cleaned): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerGtldCleaned(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamDomainerGtldCleanedEmail.swift b/examples/swift/StreamDomainerGtldCleanedEmail.swift new file mode 100644 index 0000000..6673176 --- /dev/null +++ b/examples/swift/StreamDomainerGtldCleanedEmail.swift @@ -0,0 +1,27 @@ +// Stream cleaned newly registered gTLD domains with an email (CSV) +// +// Parameters for streamDomainerGtldCleanedEmail (GET /v3.3/stream/domainer/gtld/cleaned/email): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerGtldCleanedEmail(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamDomainerGtldCleanedPhone.swift b/examples/swift/StreamDomainerGtldCleanedPhone.swift new file mode 100644 index 0000000..dacb048 --- /dev/null +++ b/examples/swift/StreamDomainerGtldCleanedPhone.swift @@ -0,0 +1,27 @@ +// Stream cleaned newly registered gTLD domains with a phone (CSV) +// +// Parameters for streamDomainerGtldCleanedPhone (GET /v3.3/stream/domainer/gtld/cleaned/phone): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamDomainerGtldCleanedPhone(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamDomainerGtldCleanedSample.swift b/examples/swift/StreamDomainerGtldCleanedSample.swift new file mode 100644 index 0000000..9bcec81 --- /dev/null +++ b/examples/swift/StreamDomainerGtldCleanedSample.swift @@ -0,0 +1,27 @@ +// Stream a sample of cleaned newly registered gTLD domains (CSV) +// +// Parameters for streamDomainerGtldCleanedSample (GET /v3.3/stream/domainer/sample/gtld/cleaned): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] +// (This endpoint is public, so the key is not sent with this request.) + +do { + let result = try await DatabasesStreamingAPI.streamDomainerGtldCleanedSample() + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamDomainerGtldSample.swift b/examples/swift/StreamDomainerGtldSample.swift new file mode 100644 index 0000000..931a200 --- /dev/null +++ b/examples/swift/StreamDomainerGtldSample.swift @@ -0,0 +1,27 @@ +// Stream a sample of newly registered gTLD domains (CSV) +// +// Parameters for streamDomainerGtldSample (GET /v3.3/stream/domainer/sample/gtld): +// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only... +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] +// (This endpoint is public, so the key is not sent with this request.) + +do { + let result = try await DatabasesStreamingAPI.streamDomainerGtldSample() + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamThreatFeedMalware.swift b/examples/swift/StreamThreatFeedMalware.swift new file mode 100644 index 0000000..af6008c --- /dev/null +++ b/examples/swift/StreamThreatFeedMalware.swift @@ -0,0 +1,26 @@ +// Stream the daily malware threat feed (CSV) +// +// Parameters for streamThreatFeedMalware (GET /v3.4/stream/threat-feed/malware): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamThreatFeedMalware(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamThreatFeedMalwareSample.swift b/examples/swift/StreamThreatFeedMalwareSample.swift new file mode 100644 index 0000000..1a322ac --- /dev/null +++ b/examples/swift/StreamThreatFeedMalwareSample.swift @@ -0,0 +1,26 @@ +// Stream a sample of the malware threat feed (CSV) +// +// Parameters for streamThreatFeedMalwareSample (GET /v3.4/stream/threat-feed/malware/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] +// (This endpoint is public, so the key is not sent with this request.) + +do { + let result = try await DatabasesStreamingAPI.streamThreatFeedMalwareSample() + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamThreatFeedPhishing.swift b/examples/swift/StreamThreatFeedPhishing.swift new file mode 100644 index 0000000..eab8e5f --- /dev/null +++ b/examples/swift/StreamThreatFeedPhishing.swift @@ -0,0 +1,26 @@ +// Stream the daily phishing threat feed (CSV) +// +// Parameters for streamThreatFeedPhishing (GET /v3.4/stream/threat-feed/phishing): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamThreatFeedPhishing(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamThreatFeedPhishingSample.swift b/examples/swift/StreamThreatFeedPhishingSample.swift new file mode 100644 index 0000000..6c3f670 --- /dev/null +++ b/examples/swift/StreamThreatFeedPhishingSample.swift @@ -0,0 +1,26 @@ +// Stream a sample of the phishing threat feed (CSV) +// +// Parameters for streamThreatFeedPhishingSample (GET /v3.4/stream/threat-feed/phishing/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] +// (This endpoint is public, so the key is not sent with this request.) + +do { + let result = try await DatabasesStreamingAPI.streamThreatFeedPhishingSample() + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamThreatFeedSpam.swift b/examples/swift/StreamThreatFeedSpam.swift new file mode 100644 index 0000000..626355d --- /dev/null +++ b/examples/swift/StreamThreatFeedSpam.swift @@ -0,0 +1,26 @@ +// Stream the daily spam threat feed (CSV) +// +// Parameters for streamThreatFeedSpam (GET /v3.4/stream/threat-feed/spam): +// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] + +do { + let result = try await DatabasesStreamingAPI.streamThreatFeedSpam(date: OpenAPIDateWithoutTime(rawValue: "2026-10-01")!) + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/swift/StreamThreatFeedSpamSample.swift b/examples/swift/StreamThreatFeedSpamSample.swift new file mode 100644 index 0000000..65f2ee5 --- /dev/null +++ b/examples/swift/StreamThreatFeedSpamSample.swift @@ -0,0 +1,26 @@ +// Stream a sample of the spam threat feed (CSV) +// +// Parameters for streamThreatFeedSpamSample (GET /v3.4/stream/threat-feed/spam/sample): +// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are... +// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on... +// +// Top-level code for Sources//main.swift (see Getting Started). + +import Foundation +import WhoisFreaks + +// Read the API key from the environment and set it once. +WhoisFreaksAPI.apiKey = ProcessInfo.processInfo.environment["WHOISFREAKS_API_KEY"] +// (This endpoint is public, so the key is not sent with this request.) + +do { + let result = try await DatabasesStreamingAPI.streamThreatFeedSpamSample() + print(result) +} catch ErrorResponse.error(let status, let data, _, let underlying) { + let body = data.map { String(decoding: $0, as: UTF8.self) } ?? "\(underlying)" + print("Request failed: HTTP \(status) \(body)") + exit(1) +} catch { + print("Request failed: \(error)") + exit(1) +} diff --git a/examples/typescript/BulkIpReputationV2.ts b/examples/typescript/BulkIpReputationV2.ts new file mode 100644 index 0000000..558ea6b --- /dev/null +++ b/examples/typescript/BulkIpReputationV2.ts @@ -0,0 +1,25 @@ +// Bulk IP Reputation (v2.0): POST https://api.whoisfreaks.com/v2.0/security +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx BulkIpReputationV2.ts +import { Configuration, IPReputationApi, ResponseError, type BulkGeolocationRequest } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new IPReputationApi(config); + +// bulkIpReputationV2({ bulkGeolocationRequest }) +// bulkGeolocationRequest (BulkGeolocationRequest, required): request body +async function main(): Promise { + const body: BulkGeolocationRequest = { ips: ["1.1.1.1", "2.2.2.2", "8.8.8.8"] }; + const results = await api.bulkIpReputationV2({ bulkGeolocationRequest: body }); + console.log(JSON.stringify(results, null, 2)); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/DnsHistoricalV22.ts b/examples/typescript/DnsHistoricalV22.ts new file mode 100644 index 0000000..de4250b --- /dev/null +++ b/examples/typescript/DnsHistoricalV22.ts @@ -0,0 +1,29 @@ +// Historical DNS Lookup (v2.2): GET https://api.whoisfreaks.com/v2.2/dns/historical +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx DnsHistoricalV22.ts +import { Configuration, DNSApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DNSApi(config); + +// dnsHistoricalV22({ domainName, type, page?, sort?, sortBy?, format? }) +// domainName (string, required) +// type (string, required): default "all" +// page (number, optional): default 1 +// sort ("asc" | "desc", optional): Sort direction. Omit to leave the results unsorted +// sortBy ("firstSeen" | "lastSeen", optional): Field to sort on. Only applies when sort is given; default "lastSeen" +// format ("json" | "xml", optional): default "json" +async function main(): Promise { + const result = await api.dnsHistoricalV22({ domainName: "whoisfreaks.com", type: "A,MX,TXT", page: 1 }); + console.log(JSON.stringify(result, null, 2)); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/DnsHistoricalV23.ts b/examples/typescript/DnsHistoricalV23.ts new file mode 100644 index 0000000..43f7943 --- /dev/null +++ b/examples/typescript/DnsHistoricalV23.ts @@ -0,0 +1,29 @@ +// Historical DNS Lookup (v2.3): GET https://api.whoisfreaks.com/v2.3/dns/historical +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx DnsHistoricalV23.ts +import { Configuration, DNSApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DNSApi(config); + +// dnsHistoricalV23({ domainName, type, page?, sort?, sortBy?, format? }) +// domainName (string, required) +// type (string, required): default "all" +// page (number, optional): default 1 +// sort ("asc" | "desc", optional): Sort direction. Omit to leave the results unsorted +// sortBy ("firstSeen" | "lastSeen", optional): Field to sort on. Only applies when sort is given; default "lastSeen" +// format ("json" | "xml", optional): default "json" +async function main(): Promise { + const result = await api.dnsHistoricalV23({ domainName: "whoisfreaks.com", type: "A,MX,TXT", page: 1 }); + console.log(JSON.stringify(result, null, 2)); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/DnsReverseV22.ts b/examples/typescript/DnsReverseV22.ts new file mode 100644 index 0000000..4381322 --- /dev/null +++ b/examples/typescript/DnsReverseV22.ts @@ -0,0 +1,30 @@ +// Reverse DNS Lookup (v2.2): GET https://api.whoisfreaks.com/v2.2/dns/reverse +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx DnsReverseV22.ts +import { Configuration, DNSApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DNSApi(config); + +// dnsReverseV22({ value, type, exact?, page?, sort?, sortBy?, format? }) +// value (string, required): IP, CIDR, or record value +// type ("a" | "mx" | "cname" | "ns" | "aaaa" | "txt" | "soa", required) +// exact (boolean, optional): When false the value is matched as a substring, which is far slower than an e...; default true +// page (number, optional): default 1 +// sort ("asc" | "desc", optional): Sort direction. Omit to leave the results unsorted +// sortBy ("firstSeen" | "lastSeen", optional): Field to sort on. Only applies when sort is given; default "lastSeen" +// format ("json" | "xml", optional): default "json" +async function main(): Promise { + const result = await api.dnsReverseV22({ value: "8.8.8.8", type: "a", page: 1 }); + console.log(JSON.stringify(result, null, 2)); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/DnsReverseV23.ts b/examples/typescript/DnsReverseV23.ts new file mode 100644 index 0000000..263638b --- /dev/null +++ b/examples/typescript/DnsReverseV23.ts @@ -0,0 +1,30 @@ +// Reverse DNS Lookup (v2.3): GET https://api.whoisfreaks.com/v2.3/dns/reverse +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx DnsReverseV23.ts +import { Configuration, DNSApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DNSApi(config); + +// dnsReverseV23({ value, type, exact?, page?, sort?, sortBy?, format? }) +// value (string, required): IP, CIDR, or record value +// type ("a" | "mx" | "cname" | "ns" | "aaaa" | "txt" | "soa", required) +// exact (boolean, optional): When false the value is matched as a substring, which is far slower than an e...; default true +// page (number, optional): default 1 +// sort ("asc" | "desc", optional): Sort direction. Omit to leave the results unsorted +// sortBy ("firstSeen" | "lastSeen", optional): Field to sort on. Only applies when sort is given; default "lastSeen" +// format ("json" | "xml", optional): default "json" +async function main(): Promise { + const result = await api.dnsReverseV23({ value: "8.8.8.8", type: "a", page: 1 }); + console.log(JSON.stringify(result, null, 2)); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/IpReputationV2.ts b/examples/typescript/IpReputationV2.ts new file mode 100644 index 0000000..ce993dc --- /dev/null +++ b/examples/typescript/IpReputationV2.ts @@ -0,0 +1,24 @@ +// IP Reputation Lookup (v2.0): GET https://api.whoisfreaks.com/v2.0/security +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx IpReputationV2.ts +import { Configuration, IPReputationApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new IPReputationApi(config); + +// ipReputationV2({ ip }) +// ip (string, required) +async function main(): Promise { + const result = await api.ipReputationV2({ ip: "8.8.8.8" }); + console.log(JSON.stringify(result, null, 2)); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/README.md b/examples/typescript/README.md index 9c7954f..f718790 100644 --- a/examples/typescript/README.md +++ b/examples/typescript/README.md @@ -12,6 +12,10 @@ Install: see the [TypeScript guide](../../docs/languages/typescript.md). Set the - [`DnsLive.ts`](DnsLive.ts): Live DNS Lookup (`GET /v2.0/dns/live`) - [`DnsHistorical.ts`](DnsHistorical.ts): Historical DNS Lookup (`GET /v2.0/dns/historical`) - [`DnsReverse.ts`](DnsReverse.ts): Reverse DNS Lookup (`GET /v2.1/dns/reverse`) +- [`DnsHistoricalV22.ts`](DnsHistoricalV22.ts): Historical DNS Lookup (v2.2) (`GET /v2.2/dns/historical`) +- [`DnsHistoricalV23.ts`](DnsHistoricalV23.ts): Historical DNS Lookup (v2.3) (`GET /v2.3/dns/historical`) +- [`DnsReverseV22.ts`](DnsReverseV22.ts): Reverse DNS Lookup (v2.2) (`GET /v2.2/dns/reverse`) +- [`DnsReverseV23.ts`](DnsReverseV23.ts): Reverse DNS Lookup (v2.3) (`GET /v2.3/dns/reverse`) - [`DnsBulk.ts`](DnsBulk.ts): Bulk DNS Lookup (`POST /v2.0/dns/bulk/live`) ## Domain Availability @@ -34,6 +38,8 @@ Install: see the [TypeScript guide](../../docs/languages/typescript.md). Set the ## IP Reputation - [`IpReputation.ts`](IpReputation.ts): IP Reputation Lookup (`GET /v1.0/security`) - [`BulkIpReputation.ts`](BulkIpReputation.ts): Bulk IP Reputation (`POST /v1.0/security`) +- [`IpReputationV2.ts`](IpReputationV2.ts): IP Reputation Lookup (v2.0) (`GET /v2.0/security`) +- [`BulkIpReputationV2.ts`](BulkIpReputationV2.ts): Bulk IP Reputation (v2.0) (`POST /v2.0/security`) ## Domain Reputation - [`DomainReputation.ts`](DomainReputation.ts): Domain Reputation Lookup (`GET /v1/domain/security`) @@ -105,3 +111,33 @@ Install: see the [TypeScript guide](../../docs/languages/typescript.md). Set the - [`DownloadThreatFeedMalwareSample.ts`](DownloadThreatFeedMalwareSample.ts): Download a sample of the malware threat feed (CSV) (`GET /v3.4/download/threat-feed/malware/sample`) - [`DownloadThreatFeedSpam.ts`](DownloadThreatFeedSpam.ts): Download the daily spam threat feed (CSV) (`GET /v3.4/download/threat-feed/spam`) - [`DownloadThreatFeedSpamSample.ts`](DownloadThreatFeedSpamSample.ts): Download a sample of the spam threat feed (CSV) (`GET /v3.4/download/threat-feed/spam/sample`) + +## Databases - Streaming +- [`StreamThreatFeedPhishing.ts`](StreamThreatFeedPhishing.ts): Stream the daily phishing threat feed (CSV) (`GET /v3.4/stream/threat-feed/phishing`) +- [`StreamThreatFeedPhishingSample.ts`](StreamThreatFeedPhishingSample.ts): Stream a sample of the phishing threat feed (CSV) (`GET /v3.4/stream/threat-feed/phishing/sample`) +- [`StreamThreatFeedMalware.ts`](StreamThreatFeedMalware.ts): Stream the daily malware threat feed (CSV) (`GET /v3.4/stream/threat-feed/malware`) +- [`StreamThreatFeedMalwareSample.ts`](StreamThreatFeedMalwareSample.ts): Stream a sample of the malware threat feed (CSV) (`GET /v3.4/stream/threat-feed/malware/sample`) +- [`StreamThreatFeedSpam.ts`](StreamThreatFeedSpam.ts): Stream the daily spam threat feed (CSV) (`GET /v3.4/stream/threat-feed/spam`) +- [`StreamThreatFeedSpamSample.ts`](StreamThreatFeedSpamSample.ts): Stream a sample of the spam threat feed (CSV) (`GET /v3.4/stream/threat-feed/spam/sample`) +- [`StreamDomainerGtld.ts`](StreamDomainerGtld.ts): Stream newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/gtld`) +- [`StreamDomainerGtldCleaned.ts`](StreamDomainerGtldCleaned.ts): Stream cleaned newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned`) +- [`StreamDomainerGtldCleanedEmail.ts`](StreamDomainerGtldCleanedEmail.ts): Stream cleaned newly registered gTLD domains with an email (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned/email`) +- [`StreamDomainerGtldCleanedPhone.ts`](StreamDomainerGtldCleanedPhone.ts): Stream cleaned newly registered gTLD domains with a phone (CSV) (`GET /v3.3/stream/domainer/gtld/cleaned/phone`) +- [`StreamDomainerCctld.ts`](StreamDomainerCctld.ts): Stream newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/cctld`) +- [`StreamDomainerCctldCleaned.ts`](StreamDomainerCctldCleaned.ts): Stream cleaned newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned`) +- [`StreamDomainerCctldCleanedEmail.ts`](StreamDomainerCctldCleanedEmail.ts): Stream cleaned newly registered ccTLD domains with an email (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned/email`) +- [`StreamDomainerCctldCleanedPhone.ts`](StreamDomainerCctldCleanedPhone.ts): Stream cleaned newly registered ccTLD domains with a phone (CSV) (`GET /v3.3/stream/domainer/cctld/cleaned/phone`) +- [`StreamDomainerExpired.ts`](StreamDomainerExpired.ts): Stream expiring domains (CSV) (`GET /v3.3/stream/domainer/expired`) +- [`StreamDomainerExpiredCleaned.ts`](StreamDomainerExpiredCleaned.ts): Stream cleaned expiring domains (CSV) (`GET /v3.3/stream/domainer/expired/cleaned`) +- [`StreamDomainerExpiredCleanedEmail.ts`](StreamDomainerExpiredCleanedEmail.ts): Stream cleaned expiring domains with an email (CSV) (`GET /v3.3/stream/domainer/expired/cleaned/email`) +- [`StreamDomainerExpiredCleanedPhone.ts`](StreamDomainerExpiredCleanedPhone.ts): Stream cleaned expiring domains with a phone (CSV) (`GET /v3.3/stream/domainer/expired/cleaned/phone`) +- [`StreamDomainerDropped.ts`](StreamDomainerDropped.ts): Stream dropped domains (CSV) (`GET /v3.3/stream/domainer/dropped`) +- [`StreamDomainerDroppedBacklinks.ts`](StreamDomainerDroppedBacklinks.ts): Stream dropped domains with backlinks (CSV) (`GET /v3.3/stream/domainer/dropped/backlinks`) +- [`StreamDomainerGtldSample.ts`](StreamDomainerGtldSample.ts): Stream a sample of newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/gtld`) +- [`StreamDomainerGtldCleanedSample.ts`](StreamDomainerGtldCleanedSample.ts): Stream a sample of cleaned newly registered gTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/gtld/cleaned`) +- [`StreamDomainerCctldSample.ts`](StreamDomainerCctldSample.ts): Stream a sample of newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/cctld`) +- [`StreamDomainerCctldCleanedSample.ts`](StreamDomainerCctldCleanedSample.ts): Stream a sample of cleaned newly registered ccTLD domains (CSV) (`GET /v3.3/stream/domainer/sample/cctld/cleaned`) +- [`StreamDomainerExpiredSample.ts`](StreamDomainerExpiredSample.ts): Stream a sample of expiring domains (CSV) (`GET /v3.3/stream/domainer/sample/expired`) +- [`StreamDomainerExpiredCleanedSample.ts`](StreamDomainerExpiredCleanedSample.ts): Stream a sample of cleaned expiring domains (CSV) (`GET /v3.3/stream/domainer/sample/expired/cleaned`) +- [`StreamDomainerDroppedSample.ts`](StreamDomainerDroppedSample.ts): Stream a sample of dropped domains (CSV) (`GET /v3.3/stream/domainer/sample/dropped`) +- [`StreamDomainerDroppedBacklinksSample.ts`](StreamDomainerDroppedBacklinksSample.ts): Stream a sample of dropped domains with backlinks (CSV) (`GET /v3.3/stream/domainer/sample/dropped/backlinks`) diff --git a/examples/typescript/StreamDomainerCctld.ts b/examples/typescript/StreamDomainerCctld.ts new file mode 100644 index 0000000..9459d00 --- /dev/null +++ b/examples/typescript/StreamDomainerCctld.ts @@ -0,0 +1,27 @@ +// Stream newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerCctld.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerCctld({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerCctld({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamDomainerCctldCleaned.ts b/examples/typescript/StreamDomainerCctldCleaned.ts new file mode 100644 index 0000000..504e55b --- /dev/null +++ b/examples/typescript/StreamDomainerCctldCleaned.ts @@ -0,0 +1,27 @@ +// Stream cleaned newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerCctldCleaned.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerCctldCleaned({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerCctldCleaned({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamDomainerCctldCleanedEmail.ts b/examples/typescript/StreamDomainerCctldCleanedEmail.ts new file mode 100644 index 0000000..7b1ecfb --- /dev/null +++ b/examples/typescript/StreamDomainerCctldCleanedEmail.ts @@ -0,0 +1,27 @@ +// Stream cleaned newly registered ccTLD domains with an email (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned/email +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerCctldCleanedEmail.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerCctldCleanedEmail({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerCctldCleanedEmail({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamDomainerCctldCleanedPhone.ts b/examples/typescript/StreamDomainerCctldCleanedPhone.ts new file mode 100644 index 0000000..6d9ff11 --- /dev/null +++ b/examples/typescript/StreamDomainerCctldCleanedPhone.ts @@ -0,0 +1,27 @@ +// Stream cleaned newly registered ccTLD domains with a phone (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/cctld/cleaned/phone +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerCctldCleanedPhone.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerCctldCleanedPhone({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerCctldCleanedPhone({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamDomainerCctldCleanedSample.ts b/examples/typescript/StreamDomainerCctldCleanedSample.ts new file mode 100644 index 0000000..17d6139 --- /dev/null +++ b/examples/typescript/StreamDomainerCctldCleanedSample.ts @@ -0,0 +1,25 @@ +// Stream a sample of cleaned newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/cctld/cleaned +// Run (public endpoint, no API key needed): npx tsx StreamDomainerCctldCleanedSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerCctldCleanedSample({ whois?, offset?, limit? }) +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerCctldCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamDomainerCctldSample.ts b/examples/typescript/StreamDomainerCctldSample.ts new file mode 100644 index 0000000..b6a11a4 --- /dev/null +++ b/examples/typescript/StreamDomainerCctldSample.ts @@ -0,0 +1,25 @@ +// Stream a sample of newly registered ccTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/cctld +// Run (public endpoint, no API key needed): npx tsx StreamDomainerCctldSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerCctldSample({ whois?, offset?, limit? }) +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerCctldSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamDomainerDropped.ts b/examples/typescript/StreamDomainerDropped.ts new file mode 100644 index 0000000..e02d814 --- /dev/null +++ b/examples/typescript/StreamDomainerDropped.ts @@ -0,0 +1,27 @@ +// Stream dropped domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/dropped +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerDropped.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerDropped({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerDropped({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamDomainerDroppedBacklinks.ts b/examples/typescript/StreamDomainerDroppedBacklinks.ts new file mode 100644 index 0000000..24bf9ee --- /dev/null +++ b/examples/typescript/StreamDomainerDroppedBacklinks.ts @@ -0,0 +1,27 @@ +// Stream dropped domains with backlinks (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/dropped/backlinks +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerDroppedBacklinks.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerDroppedBacklinks({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerDroppedBacklinks({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamDomainerDroppedBacklinksSample.ts b/examples/typescript/StreamDomainerDroppedBacklinksSample.ts new file mode 100644 index 0000000..4c59f95 --- /dev/null +++ b/examples/typescript/StreamDomainerDroppedBacklinksSample.ts @@ -0,0 +1,25 @@ +// Stream a sample of dropped domains with backlinks (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/dropped/backlinks +// Run (public endpoint, no API key needed): npx tsx StreamDomainerDroppedBacklinksSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerDroppedBacklinksSample({ whois?, offset?, limit? }) +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerDroppedBacklinksSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamDomainerDroppedSample.ts b/examples/typescript/StreamDomainerDroppedSample.ts new file mode 100644 index 0000000..dd2b029 --- /dev/null +++ b/examples/typescript/StreamDomainerDroppedSample.ts @@ -0,0 +1,25 @@ +// Stream a sample of dropped domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/dropped +// Run (public endpoint, no API key needed): npx tsx StreamDomainerDroppedSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerDroppedSample({ whois?, offset?, limit? }) +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerDroppedSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamDomainerExpired.ts b/examples/typescript/StreamDomainerExpired.ts new file mode 100644 index 0000000..8384da9 --- /dev/null +++ b/examples/typescript/StreamDomainerExpired.ts @@ -0,0 +1,27 @@ +// Stream expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerExpired.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerExpired({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerExpired({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamDomainerExpiredCleaned.ts b/examples/typescript/StreamDomainerExpiredCleaned.ts new file mode 100644 index 0000000..2d4d1e5 --- /dev/null +++ b/examples/typescript/StreamDomainerExpiredCleaned.ts @@ -0,0 +1,27 @@ +// Stream cleaned expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerExpiredCleaned.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerExpiredCleaned({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerExpiredCleaned({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamDomainerExpiredCleanedEmail.ts b/examples/typescript/StreamDomainerExpiredCleanedEmail.ts new file mode 100644 index 0000000..3912c60 --- /dev/null +++ b/examples/typescript/StreamDomainerExpiredCleanedEmail.ts @@ -0,0 +1,27 @@ +// Stream cleaned expiring domains with an email (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned/email +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerExpiredCleanedEmail.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerExpiredCleanedEmail({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerExpiredCleanedEmail({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamDomainerExpiredCleanedPhone.ts b/examples/typescript/StreamDomainerExpiredCleanedPhone.ts new file mode 100644 index 0000000..5658c92 --- /dev/null +++ b/examples/typescript/StreamDomainerExpiredCleanedPhone.ts @@ -0,0 +1,27 @@ +// Stream cleaned expiring domains with a phone (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/expired/cleaned/phone +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerExpiredCleanedPhone.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerExpiredCleanedPhone({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerExpiredCleanedPhone({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamDomainerExpiredCleanedSample.ts b/examples/typescript/StreamDomainerExpiredCleanedSample.ts new file mode 100644 index 0000000..bece80e --- /dev/null +++ b/examples/typescript/StreamDomainerExpiredCleanedSample.ts @@ -0,0 +1,25 @@ +// Stream a sample of cleaned expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/expired/cleaned +// Run (public endpoint, no API key needed): npx tsx StreamDomainerExpiredCleanedSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerExpiredCleanedSample({ whois?, offset?, limit? }) +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerExpiredCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamDomainerExpiredSample.ts b/examples/typescript/StreamDomainerExpiredSample.ts new file mode 100644 index 0000000..bd1f6d5 --- /dev/null +++ b/examples/typescript/StreamDomainerExpiredSample.ts @@ -0,0 +1,25 @@ +// Stream a sample of expiring domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/expired +// Run (public endpoint, no API key needed): npx tsx StreamDomainerExpiredSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerExpiredSample({ whois?, offset?, limit? }) +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerExpiredSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamDomainerGtld.ts b/examples/typescript/StreamDomainerGtld.ts new file mode 100644 index 0000000..58f05f8 --- /dev/null +++ b/examples/typescript/StreamDomainerGtld.ts @@ -0,0 +1,27 @@ +// Stream newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerGtld.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerGtld({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerGtld({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamDomainerGtldCleaned.ts b/examples/typescript/StreamDomainerGtldCleaned.ts new file mode 100644 index 0000000..c2540fc --- /dev/null +++ b/examples/typescript/StreamDomainerGtldCleaned.ts @@ -0,0 +1,27 @@ +// Stream cleaned newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerGtldCleaned.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerGtldCleaned({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerGtldCleaned({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamDomainerGtldCleanedEmail.ts b/examples/typescript/StreamDomainerGtldCleanedEmail.ts new file mode 100644 index 0000000..5e3e43f --- /dev/null +++ b/examples/typescript/StreamDomainerGtldCleanedEmail.ts @@ -0,0 +1,27 @@ +// Stream cleaned newly registered gTLD domains with an email (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned/email +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerGtldCleanedEmail.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerGtldCleanedEmail({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerGtldCleanedEmail({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamDomainerGtldCleanedPhone.ts b/examples/typescript/StreamDomainerGtldCleanedPhone.ts new file mode 100644 index 0000000..ae6bd4f --- /dev/null +++ b/examples/typescript/StreamDomainerGtldCleanedPhone.ts @@ -0,0 +1,27 @@ +// Stream cleaned newly registered gTLD domains with a phone (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/gtld/cleaned/phone +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamDomainerGtldCleanedPhone.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamDomainerGtldCleanedPhone({ date, whois?, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerGtldCleanedPhone({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamDomainerGtldCleanedSample.ts b/examples/typescript/StreamDomainerGtldCleanedSample.ts new file mode 100644 index 0000000..ffb1898 --- /dev/null +++ b/examples/typescript/StreamDomainerGtldCleanedSample.ts @@ -0,0 +1,25 @@ +// Stream a sample of cleaned newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/gtld/cleaned +// Run (public endpoint, no API key needed): npx tsx StreamDomainerGtldCleanedSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerGtldCleanedSample({ whois?, offset?, limit? }) +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerGtldCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamDomainerGtldSample.ts b/examples/typescript/StreamDomainerGtldSample.ts new file mode 100644 index 0000000..245eb73 --- /dev/null +++ b/examples/typescript/StreamDomainerGtldSample.ts @@ -0,0 +1,25 @@ +// Stream a sample of newly registered gTLD domains (CSV): GET https://files.whoisfreaks.com/v3.3/stream/domainer/sample/gtld +// Run (public endpoint, no API key needed): npx tsx StreamDomainerGtldSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamDomainerGtldSample({ whois?, offset?, limit? }) +// whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false st...; default false +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamDomainerGtldSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamThreatFeedMalware.ts b/examples/typescript/StreamThreatFeedMalware.ts new file mode 100644 index 0000000..5fa1fdd --- /dev/null +++ b/examples/typescript/StreamThreatFeedMalware.ts @@ -0,0 +1,26 @@ +// Stream the daily malware threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/malware +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamThreatFeedMalware.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamThreatFeedMalware({ date, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamThreatFeedMalware({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamThreatFeedMalwareSample.ts b/examples/typescript/StreamThreatFeedMalwareSample.ts new file mode 100644 index 0000000..77fad95 --- /dev/null +++ b/examples/typescript/StreamThreatFeedMalwareSample.ts @@ -0,0 +1,24 @@ +// Stream a sample of the malware threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/malware/sample +// Run (public endpoint, no API key needed): npx tsx StreamThreatFeedMalwareSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamThreatFeedMalwareSample({ offset?, limit? }) +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamThreatFeedMalwareSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamThreatFeedPhishing.ts b/examples/typescript/StreamThreatFeedPhishing.ts new file mode 100644 index 0000000..77a14e6 --- /dev/null +++ b/examples/typescript/StreamThreatFeedPhishing.ts @@ -0,0 +1,26 @@ +// Stream the daily phishing threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/phishing +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamThreatFeedPhishing.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamThreatFeedPhishing({ date, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamThreatFeedPhishing({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamThreatFeedPhishingSample.ts b/examples/typescript/StreamThreatFeedPhishingSample.ts new file mode 100644 index 0000000..a60b100 --- /dev/null +++ b/examples/typescript/StreamThreatFeedPhishingSample.ts @@ -0,0 +1,24 @@ +// Stream a sample of the phishing threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/phishing/sample +// Run (public endpoint, no API key needed): npx tsx StreamThreatFeedPhishingSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamThreatFeedPhishingSample({ offset?, limit? }) +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamThreatFeedPhishingSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamThreatFeedSpam.ts b/examples/typescript/StreamThreatFeedSpam.ts new file mode 100644 index 0000000..7213063 --- /dev/null +++ b/examples/typescript/StreamThreatFeedSpam.ts @@ -0,0 +1,26 @@ +// Stream the daily spam threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/spam +// Run: WHOISFREAKS_API_KEY=your_api_key npx tsx StreamThreatFeedSpam.ts +import { Configuration, DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Set the API key once; the client adds it to every request. +const config = new Configuration({ apiKey: process.env.WHOISFREAKS_API_KEY }); +const api = new DatabasesStreamingApi(config); + +// streamThreatFeedSpam({ date, offset?, limit? }) +// date (Date, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamThreatFeedSpam({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/examples/typescript/StreamThreatFeedSpamSample.ts b/examples/typescript/StreamThreatFeedSpamSample.ts new file mode 100644 index 0000000..64d9027 --- /dev/null +++ b/examples/typescript/StreamThreatFeedSpamSample.ts @@ -0,0 +1,24 @@ +// Stream a sample of the spam threat feed (CSV): GET https://files.whoisfreaks.com/v3.4/stream/threat-feed/spam/sample +// Run (public endpoint, no API key needed): npx tsx StreamThreatFeedSpamSample.ts +import { DatabasesStreamingApi, ResponseError } from "whoisfreaks"; + +// Public endpoint: no API key needed. +const api = new DatabasesStreamingApi(); + +// streamThreatFeedSpamSample({ offset?, limit? }) +// offset (number, optional): Data rows to skip from the start of the file. The header row is never counted... +// limit (number, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the hea... +async function main(): Promise { + const csvText = await api.streamThreatFeedSpamSample(); // plain CSV text, already decompressed + console.log(csvText); +} + +main().catch(async (err: unknown) => { + // API errors carry the HTTP response + if (err instanceof ResponseError) { + console.error(`HTTP ${err.response.status}: ${await err.response.text()}`); + } else { + console.error(err); + } + process.exitCode = 1; +}); diff --git a/scripts/docs_lang/javascript.py b/scripts/docs_lang/javascript.py index e4fff63..55496f4 100644 --- a/scripts/docs_lang/javascript.py +++ b/scripts/docs_lang/javascript.py @@ -57,7 +57,7 @@ def _lit(v): def _response_kind(op, ctx): - """binary | model | model_list | string_list | text""" + """binary | model | model_list | string_list | text | csv_stream""" if op.get("is_binary"): return "binary" if op.get("response_schema"): @@ -66,7 +66,7 @@ def _response_kind(op, ctx): .get("200")) or {}) content = resp.get("content") or {} if "text/plain" in content: - return "text" + return "text" if op["op_id"] == "rotateApiKey" else "csv_stream" sch = ctx.deref((content.get("application/json") or {}).get("schema") or {}) if sch.get("type") == "array": return "string_list" @@ -174,6 +174,9 @@ def example(op, ctx): out += [f"{ind}const domains = await {call};", f"{ind}console.log(`${{domains.length}} domains`);", f'{ind}console.log(domains.slice(0, 10).join("\\n"));'] + elif kind == "csv_stream": + out += [f"{ind}const csvText = await {call}; // plain CSV text, already decompressed", + f'{ind}console.log(csvText);'] elif kind == "text": out += [f"{ind}const newKey = await {call}; // use this key from now on", f'{ind}console.log("New API key:", newKey);'] diff --git a/scripts/docs_lang/python.py b/scripts/docs_lang/python.py index ef6c6cf..4d3cd6d 100644 --- a/scripts/docs_lang/python.py +++ b/scripts/docs_lang/python.py @@ -77,7 +77,7 @@ def _lit(v, p=None): def _response_kind(op, ctx): - """binary | model | model_list | string_list | text""" + """binary | model | model_list | string_list | text | csv_stream""" if op.get("is_binary"): return "binary" if op.get("response_schema"): @@ -86,7 +86,7 @@ def _response_kind(op, ctx): .get("200")) or {}) content = resp.get("content") or {} if "text/plain" in content: - return "text" + return "text" if op["op_id"] == "rotateApiKey" else "csv_stream" sch = ctx.deref((content.get("application/json") or {}).get("schema") or {}) if sch.get("type") == "array": return "string_list" @@ -195,6 +195,9 @@ def example(op, ctx): out += [f"{ind}domains = {call}", f'{ind}print(f"{{len(domains)}} domains")', f'{ind}print("\\n".join(domains[:10]))'] + elif kind == "csv_stream": + out += [f"{ind}csv_text = {call} # plain CSV text, already decompressed", + f'{ind}print(csv_text)'] elif kind == "text": out += [f"{ind}new_key = {call} # use this key from now on", f'{ind}print("New API key:", new_key)'] diff --git a/scripts/docs_lang/typescript.py b/scripts/docs_lang/typescript.py index 2fe4b7b..57162b5 100644 --- a/scripts/docs_lang/typescript.py +++ b/scripts/docs_lang/typescript.py @@ -58,7 +58,7 @@ def _lit(v, p=None): def _response_kind(op, ctx): - """binary | model | model_list | string_list | text""" + """binary | model | model_list | string_list | text | csv_stream""" if op.get("is_binary"): return "binary" if op.get("response_schema"): @@ -67,7 +67,7 @@ def _response_kind(op, ctx): .get("200")) or {}) content = resp.get("content") or {} if "text/plain" in content: - return "text" + return "text" if op["op_id"] == "rotateApiKey" else "csv_stream" sch = ctx.deref((content.get("application/json") or {}).get("schema") or {}) if sch.get("type") == "array": return "string_list" @@ -175,6 +175,9 @@ def example(op, ctx): out += [f"{ind}const domains = await {call};", f"{ind}console.log(`${{domains.length}} domains`);", f'{ind}console.log(domains.slice(0, 10).join("\\n"));'] + elif kind == "csv_stream": + out += [f"{ind}const csvText = await {call}; // plain CSV text, already decompressed", + f'{ind}console.log(csvText);'] elif kind == "text": out += [f"{ind}const newKey = await {call}; // use this key from now on", f'{ind}console.log("New API key:", newKey);'] diff --git a/scripts/gen_docs.py b/scripts/gen_docs.py index 7857d80..17c756a 100644 --- a/scripts/gen_docs.py +++ b/scripts/gen_docs.py @@ -406,7 +406,7 @@ def body_table(op): "Databases - WHOIS", "Databases - DNS", "Databases - Subdomains", "Databases - IP Geolocation", "Databases - ASN WHOIS", "Databases - IP WHOIS", "Databases - IP Security", - "Databases - Threat Feed"]), + "Databases - Threat Feed", "Databases - Streaming"]), ("Account & Utilities", "Manage your account, monitor API usage and credits, and rotate your API key.", ["Account"]), diff --git a/spec/whoisfreaks-openapi.yaml b/spec/whoisfreaks-openapi.yaml index 00f48e8..63a33ee 100644 --- a/spec/whoisfreaks-openapi.yaml +++ b/spec/whoisfreaks-openapi.yaml @@ -66,6 +66,8 @@ tags: description: IP security database snapshots - name: Databases - Threat Feed description: Daily phishing, malware and spam threat feeds + - name: Databases - Streaming + description: Stream database files and threat feeds as plain CSV text instead of downloading a gzip file paths: /v2.0/whois/live: get: @@ -256,6 +258,160 @@ paths: $ref: "#/components/schemas/ReverseDnsResponse" 4XX: $ref: "#/components/responses/ErrorResponse" + /v2.2/dns/historical: + get: + tags: + - DNS + summary: Historical DNS Lookup (v2.2) + description: + Same records as /v2.0/dns/historical, with two differences. Each entry reports firstSeen + and lastSeen instead of queryTime, and the results can be sorted. 2 credits per page (100 + records/page). + operationId: dnsHistoricalV22 + parameters: + - name: domainName + in: query + schema: + type: string + required: true + example: whoisfreaks.com + - name: type + in: query + schema: + type: string + default: all + required: true + example: "A,MX,TXT" + - name: page + in: query + schema: + type: integer + default: 1 + example: 1 + - $ref: "#/components/parameters/SortOrder" + - $ref: "#/components/parameters/SortBy" + - $ref: "#/components/parameters/Format" + responses: + "200": + description: Successful response + content: + application/json: + schema: + $ref: "#/components/schemas/HistoricalDnsResponseV2_2" + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v2.3/dns/historical: + get: + tags: + - DNS + summary: Historical DNS Lookup (v2.3) + description: + Same response as /v2.2/dns/historical. The difference is in error handling. Up to v2.2 a + query that failed or ran past the server time limit still returned HTTP 200 with + totalRecords 0, which was indistinguishable from a domain with no history. From v2.3 that + case returns HTTP 408 instead. 2 credits per page (100 records/page). + operationId: dnsHistoricalV23 + parameters: + - name: domainName + in: query + schema: + type: string + required: true + example: whoisfreaks.com + - name: type + in: query + schema: + type: string + default: all + required: true + example: "A,MX,TXT" + - name: page + in: query + schema: + type: integer + default: 1 + example: 1 + - $ref: "#/components/parameters/SortOrder" + - $ref: "#/components/parameters/SortBy" + - $ref: "#/components/parameters/Format" + responses: + "200": + description: Successful response + content: + application/json: + schema: + $ref: "#/components/schemas/HistoricalDnsResponseV2_2" + "408": + $ref: "#/components/responses/RequestTimeout" + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v2.2/dns/reverse: + get: + tags: + - DNS + summary: Reverse DNS Lookup (v2.2) + description: + Same search as /v2.1/dns/reverse. Each entry reports firstSeen and lastSeen instead of + queryTime, and the results can be sorted. 5 credits per page. + operationId: dnsReverseV22 + parameters: + - $ref: "#/components/parameters/ReverseValue" + - $ref: "#/components/parameters/ReverseType" + - $ref: "#/components/parameters/ReverseExact" + - name: page + in: query + schema: + type: integer + default: 1 + example: 1 + - $ref: "#/components/parameters/SortOrder" + - $ref: "#/components/parameters/SortBy" + - $ref: "#/components/parameters/Format" + responses: + "200": + description: Successful response + content: + application/json: + schema: + $ref: "#/components/schemas/ReverseDnsResponseV2_2" + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v2.3/dns/reverse: + get: + tags: + - DNS + summary: Reverse DNS Lookup (v2.3) + description: + Same search as /v2.2/dns/reverse, with a bounded total. Counting every match of a broad + search can take minutes, so from v2.3 the count stops at 10,000 and totalRecordsCapped + reports whether it did. When totalRecordsCapped is true the real total is higher than + totalRecords and totalPages is capped with it. Earlier versions still return the exact + total. A query that runs past the server time limit returns HTTP 408. 5 credits per page. + operationId: dnsReverseV23 + parameters: + - $ref: "#/components/parameters/ReverseValue" + - $ref: "#/components/parameters/ReverseType" + - $ref: "#/components/parameters/ReverseExact" + - name: page + in: query + schema: + type: integer + default: 1 + example: 1 + - $ref: "#/components/parameters/SortOrder" + - $ref: "#/components/parameters/SortBy" + - $ref: "#/components/parameters/Format" + responses: + "200": + description: Successful response + content: + application/json: + schema: + $ref: "#/components/schemas/ReverseDnsResponseV2_3" + "408": + $ref: "#/components/responses/RequestTimeout" + 4XX: + $ref: "#/components/responses/ErrorResponse" /v2.0/dns/bulk/live: post: tags: @@ -603,6 +759,73 @@ paths: $ref: "#/components/schemas/IpReputationResponse" 4XX: $ref: "#/components/responses/ErrorResponse" + /v2.0/security: + get: + tags: + - IP Reputation + summary: IP Reputation Lookup (v2.0) + description: + Same lookup as /v1.0/security on a restructured response. The ASN block moves to the top + level as asn, network gains the announced route prefix with the anycast and CDN flags, and + the security block uses the newer field names with the added VPN, relay, residential proxy, + bot and corporate gateway signals. Note that asn_name, allocation_status, + num_of_ipv4_routes, num_of_ipv6_routes and network.company are only in v1.0. 1 credit. + operationId: ipReputationV2 + parameters: + - name: ip + in: query + schema: + type: string + required: true + example: 8.8.8.8 + responses: + "200": + description: Successful response + content: + application/json: + schema: + $ref: "#/components/schemas/IpReputationResponse" + 4XX: + $ref: "#/components/responses/ErrorResponse" + post: + tags: + - IP Reputation + summary: Bulk IP Reputation (v2.0) + description: + Up to 100 IPs, returning the same entry as GET /v2.0/security for each one. An invalid IP + returns an error object for that entry only; the rest are still returned. 1 credit per IP. + operationId: bulkIpReputationV2 + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - ips + properties: + ips: + type: array + items: + type: string + maxItems: 100 + example: + ips: + - 1.1.1.1 + - 2.2.2.2 + - 8.8.8.8 + responses: + "200": + description: Successful response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/IpReputationResponse" + 4XX: + $ref: "#/components/responses/ErrorResponse" /v1/domain/security: get: tags: @@ -1402,221 +1625,831 @@ paths: application/octet-stream: schema: type: string - format: binary + format: binary + 4XX: + $ref: "#/components/responses/ErrorResponse" + description: IP Security Snapshot. Returns the file/snapshot described by this operation. + /v3.3/status/snapshot/ip/security: + servers: *id001 + get: + tags: + - Databases - IP Security + summary: IP Security Snapshot Status + operationId: dbIpSecurityStatus + parameters: [] + responses: + "200": + description: Successful response + content: + application/json: + schema: + $ref: "#/components/schemas/SnapshotStatus" + 4XX: + $ref: "#/components/responses/ErrorResponse" + description: IP Security Snapshot Status. Returns the file/snapshot described by this operation. + /v2.0/whois/history: + get: + tags: + - WHOIS + operationId: whoisHistory + summary: Historical WHOIS records for a domain + description: Every WHOIS record captured for the domain since 1986, in one response (no pagination). Cost 2 credits. + parameters: + - name: domainName + in: query + required: true + schema: + type: string + description: Domain to fetch historical WHOIS records for + example: whoisfreaks.com + - name: format + in: query + required: false + schema: + type: string + enum: + - json + - xml + responses: + "200": + description: Historical WHOIS records + content: + application/json: + schema: + $ref: "#/components/schemas/WhoisHistoricalResponse" + /v2.0/whois/reverse: + get: + tags: + - WHOIS + operationId: whoisReverse + summary: Reverse WHOIS lookup by keyword + parameters: + - name: keyword + in: query + required: true + schema: + type: string + description: Keyword to search across WHOIS records + example: whoisfreaks + - name: page + in: query + required: false + schema: + type: integer + description: Page number + example: 1 + - name: format + in: query + required: false + schema: + type: string + enum: + - json + - xml + responses: + "200": + description: Reverse WHOIS results (paginated) + content: + application/json: + schema: + $ref: "#/components/schemas/ReverseWhoisResponse" + /v3.4/download/threat-feed/phishing: + servers: *id001 + get: + tags: + - Databases - Threat Feed + operationId: downloadThreatFeedPhishing + summary: Download the daily phishing threat feed (CSV) + parameters: + - name: date + in: query + required: false + schema: + type: string + description: Feed date (yyyy-MM-dd); omit for the full dump of the feed + example: "2026-10-01" + responses: + "200": + description: Phishing threat feed as CSV (domain,threat_type,confidence,first_seen,last_seen,No_of_threat_matched_pivots) + content: + application/octet-stream: + schema: + type: string + format: binary + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.4/download/threat-feed/phishing/sample: + servers: *id001 + get: + tags: + - Databases - Threat Feed + operationId: downloadThreatFeedPhishingSample + summary: Download a sample of the phishing threat feed (CSV) + parameters: [] + responses: + "200": + description: Sample phishing threat feed as CSV + content: + application/octet-stream: + schema: + type: string + format: binary + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.4/download/threat-feed/malware: + servers: *id001 + get: + tags: + - Databases - Threat Feed + operationId: downloadThreatFeedMalware + summary: Download the daily malware threat feed (CSV) + parameters: + - name: date + in: query + required: false + schema: + type: string + description: Feed date (yyyy-MM-dd); omit for the full dump of the feed + example: "2026-10-01" + responses: + "200": + description: Malware threat feed as CSV (domain,threat_type,confidence,first_seen,last_seen,No_of_threat_matched_pivots) + content: + application/octet-stream: + schema: + type: string + format: binary + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.4/download/threat-feed/malware/sample: + servers: *id001 + get: + tags: + - Databases - Threat Feed + operationId: downloadThreatFeedMalwareSample + summary: Download a sample of the malware threat feed (CSV) + parameters: [] + responses: + "200": + description: Sample malware threat feed as CSV + content: + application/octet-stream: + schema: + type: string + format: binary + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.4/download/threat-feed/spam: + servers: *id001 + get: + tags: + - Databases - Threat Feed + operationId: downloadThreatFeedSpam + summary: Download the daily spam threat feed (CSV) + parameters: + - name: date + in: query + required: false + schema: + type: string + description: Feed date (yyyy-MM-dd); omit for the full dump of the feed + example: "2026-10-01" + responses: + "200": + description: Spam threat feed as CSV (domain,threat_type,confidence,first_seen,last_seen,No_of_threat_matched_pivots) + content: + application/octet-stream: + schema: + type: string + format: binary + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.4/download/threat-feed/spam/sample: + servers: *id001 + get: + tags: + - Databases - Threat Feed + operationId: downloadThreatFeedSpamSample + summary: Download a sample of the spam threat feed (CSV) + parameters: [] + responses: + "200": + description: Sample spam threat feed as CSV + content: + application/octet-stream: + schema: + type: string + format: binary + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.4/stream/threat-feed/phishing: + servers: *id001 + get: + tags: + - Databases - Streaming + operationId: streamThreatFeedPhishing + summary: Stream the daily phishing threat feed (CSV) + description: Streams the daily phishing threat feed for a given date. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + parameters: + - $ref: "#/components/parameters/StreamDateParam" + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" + responses: + "200": + description: Plain CSV text, streamed as the file is read + content: + text/plain: + schema: + type: string + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.4/stream/threat-feed/phishing/sample: + servers: *id001 + get: + tags: + - Databases - Streaming + operationId: streamThreatFeedPhishingSample + summary: Stream a sample of the phishing threat feed (CSV) + description: Streams a fixed sample of the phishing threat feed. No API key and no date are needed, so it is the quickest way to check the schema. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + security: [] + parameters: + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" + responses: + "200": + description: Plain CSV text, streamed as the file is read + content: + text/plain: + schema: + type: string + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.4/stream/threat-feed/malware: + servers: *id001 + get: + tags: + - Databases - Streaming + operationId: streamThreatFeedMalware + summary: Stream the daily malware threat feed (CSV) + description: Streams the daily malware threat feed for a given date. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + parameters: + - $ref: "#/components/parameters/StreamDateParam" + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" + responses: + "200": + description: Plain CSV text, streamed as the file is read + content: + text/plain: + schema: + type: string + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.4/stream/threat-feed/malware/sample: + servers: *id001 + get: + tags: + - Databases - Streaming + operationId: streamThreatFeedMalwareSample + summary: Stream a sample of the malware threat feed (CSV) + description: Streams a fixed sample of the malware threat feed. No API key and no date are needed, so it is the quickest way to check the schema. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + security: [] + parameters: + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" + responses: + "200": + description: Plain CSV text, streamed as the file is read + content: + text/plain: + schema: + type: string + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.4/stream/threat-feed/spam: + servers: *id001 + get: + tags: + - Databases - Streaming + operationId: streamThreatFeedSpam + summary: Stream the daily spam threat feed (CSV) + description: Streams the daily spam threat feed for a given date. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + parameters: + - $ref: "#/components/parameters/StreamDateParam" + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" + responses: + "200": + description: Plain CSV text, streamed as the file is read + content: + text/plain: + schema: + type: string + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.4/stream/threat-feed/spam/sample: + servers: *id001 + get: + tags: + - Databases - Streaming + operationId: streamThreatFeedSpamSample + summary: Stream a sample of the spam threat feed (CSV) + description: Streams a fixed sample of the spam threat feed. No API key and no date are needed, so it is the quickest way to check the schema. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + security: [] + parameters: + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" + responses: + "200": + description: Plain CSV text, streamed as the file is read + content: + text/plain: + schema: + type: string + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.3/stream/domainer/gtld: + servers: *id001 + get: + tags: + - Databases - Streaming + operationId: streamDomainerGtld + summary: Stream newly registered gTLD domains (CSV) + description: Streams the daily file of newly registered gTLD domains for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + parameters: + - $ref: "#/components/parameters/StreamDateParam" + - $ref: "#/components/parameters/StreamWhois" + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" + responses: + "200": + description: Plain CSV text, streamed as the file is read + content: + text/plain: + schema: + type: string + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.3/stream/domainer/gtld/cleaned: + servers: *id001 + get: + tags: + - Databases - Streaming + operationId: streamDomainerGtldCleaned + summary: Stream cleaned newly registered gTLD domains (CSV) + description: Streams the daily file of cleaned newly registered gTLD domains for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + parameters: + - $ref: "#/components/parameters/StreamDateParam" + - $ref: "#/components/parameters/StreamWhois" + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" + responses: + "200": + description: Plain CSV text, streamed as the file is read + content: + text/plain: + schema: + type: string + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.3/stream/domainer/gtld/cleaned/email: + servers: *id001 + get: + tags: + - Databases - Streaming + operationId: streamDomainerGtldCleanedEmail + summary: Stream cleaned newly registered gTLD domains with an email (CSV) + description: Streams the daily file of cleaned newly registered gTLD domains with an email for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + parameters: + - $ref: "#/components/parameters/StreamDateParam" + - $ref: "#/components/parameters/StreamWhois" + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" + responses: + "200": + description: Plain CSV text, streamed as the file is read + content: + text/plain: + schema: + type: string + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.3/stream/domainer/gtld/cleaned/phone: + servers: *id001 + get: + tags: + - Databases - Streaming + operationId: streamDomainerGtldCleanedPhone + summary: Stream cleaned newly registered gTLD domains with a phone (CSV) + description: Streams the daily file of cleaned newly registered gTLD domains with a phone for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + parameters: + - $ref: "#/components/parameters/StreamDateParam" + - $ref: "#/components/parameters/StreamWhois" + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" + responses: + "200": + description: Plain CSV text, streamed as the file is read + content: + text/plain: + schema: + type: string + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.3/stream/domainer/cctld: + servers: *id001 + get: + tags: + - Databases - Streaming + operationId: streamDomainerCctld + summary: Stream newly registered ccTLD domains (CSV) + description: Streams the daily file of newly registered ccTLD domains for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + parameters: + - $ref: "#/components/parameters/StreamDateParam" + - $ref: "#/components/parameters/StreamWhois" + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" + responses: + "200": + description: Plain CSV text, streamed as the file is read + content: + text/plain: + schema: + type: string + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.3/stream/domainer/cctld/cleaned: + servers: *id001 + get: + tags: + - Databases - Streaming + operationId: streamDomainerCctldCleaned + summary: Stream cleaned newly registered ccTLD domains (CSV) + description: Streams the daily file of cleaned newly registered ccTLD domains for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + parameters: + - $ref: "#/components/parameters/StreamDateParam" + - $ref: "#/components/parameters/StreamWhois" + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" + responses: + "200": + description: Plain CSV text, streamed as the file is read + content: + text/plain: + schema: + type: string + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.3/stream/domainer/cctld/cleaned/email: + servers: *id001 + get: + tags: + - Databases - Streaming + operationId: streamDomainerCctldCleanedEmail + summary: Stream cleaned newly registered ccTLD domains with an email (CSV) + description: Streams the daily file of cleaned newly registered ccTLD domains with an email for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + parameters: + - $ref: "#/components/parameters/StreamDateParam" + - $ref: "#/components/parameters/StreamWhois" + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" + responses: + "200": + description: Plain CSV text, streamed as the file is read + content: + text/plain: + schema: + type: string + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.3/stream/domainer/cctld/cleaned/phone: + servers: *id001 + get: + tags: + - Databases - Streaming + operationId: streamDomainerCctldCleanedPhone + summary: Stream cleaned newly registered ccTLD domains with a phone (CSV) + description: Streams the daily file of cleaned newly registered ccTLD domains with a phone for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + parameters: + - $ref: "#/components/parameters/StreamDateParam" + - $ref: "#/components/parameters/StreamWhois" + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" + responses: + "200": + description: Plain CSV text, streamed as the file is read + content: + text/plain: + schema: + type: string + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.3/stream/domainer/expired: + servers: *id001 + get: + tags: + - Databases - Streaming + operationId: streamDomainerExpired + summary: Stream expiring domains (CSV) + description: Streams the daily file of expiring domains for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + parameters: + - $ref: "#/components/parameters/StreamDateParam" + - $ref: "#/components/parameters/StreamWhois" + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" + responses: + "200": + description: Plain CSV text, streamed as the file is read + content: + text/plain: + schema: + type: string + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.3/stream/domainer/expired/cleaned: + servers: *id001 + get: + tags: + - Databases - Streaming + operationId: streamDomainerExpiredCleaned + summary: Stream cleaned expiring domains (CSV) + description: Streams the daily file of cleaned expiring domains for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + parameters: + - $ref: "#/components/parameters/StreamDateParam" + - $ref: "#/components/parameters/StreamWhois" + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" + responses: + "200": + description: Plain CSV text, streamed as the file is read + content: + text/plain: + schema: + type: string + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.3/stream/domainer/expired/cleaned/email: + servers: *id001 + get: + tags: + - Databases - Streaming + operationId: streamDomainerExpiredCleanedEmail + summary: Stream cleaned expiring domains with an email (CSV) + description: Streams the daily file of cleaned expiring domains with an email for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + parameters: + - $ref: "#/components/parameters/StreamDateParam" + - $ref: "#/components/parameters/StreamWhois" + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" + responses: + "200": + description: Plain CSV text, streamed as the file is read + content: + text/plain: + schema: + type: string + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.3/stream/domainer/expired/cleaned/phone: + servers: *id001 + get: + tags: + - Databases - Streaming + operationId: streamDomainerExpiredCleanedPhone + summary: Stream cleaned expiring domains with a phone (CSV) + description: Streams the daily file of cleaned expiring domains with a phone for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + parameters: + - $ref: "#/components/parameters/StreamDateParam" + - $ref: "#/components/parameters/StreamWhois" + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" + responses: + "200": + description: Plain CSV text, streamed as the file is read + content: + text/plain: + schema: + type: string + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.3/stream/domainer/dropped: + servers: *id001 + get: + tags: + - Databases - Streaming + operationId: streamDomainerDropped + summary: Stream dropped domains (CSV) + description: Streams the daily file of dropped domains for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + parameters: + - $ref: "#/components/parameters/StreamDateParam" + - $ref: "#/components/parameters/StreamWhois" + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" + responses: + "200": + description: Plain CSV text, streamed as the file is read + content: + text/plain: + schema: + type: string 4XX: $ref: "#/components/responses/ErrorResponse" - description: IP Security Snapshot. Returns the file/snapshot described by this operation. - /v3.3/status/snapshot/ip/security: + /v3.3/stream/domainer/dropped/backlinks: servers: *id001 get: tags: - - Databases - IP Security - summary: IP Security Snapshot Status - operationId: dbIpSecurityStatus - parameters: [] + - Databases - Streaming + operationId: streamDomainerDroppedBacklinks + summary: Stream dropped domains with backlinks (CSV) + description: Streams the daily file of dropped domains with backlinks for a given date. Pass whois=true for the full WHOIS record with a CSV header, or whois=false for domain names only. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + parameters: + - $ref: "#/components/parameters/StreamDateParam" + - $ref: "#/components/parameters/StreamWhois" + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" responses: "200": - description: Successful response + description: Plain CSV text, streamed as the file is read content: - application/json: + text/plain: schema: - $ref: "#/components/schemas/SnapshotStatus" + type: string 4XX: $ref: "#/components/responses/ErrorResponse" - description: IP Security Snapshot Status. Returns the file/snapshot described by this operation. - /v2.0/whois/history: + /v3.3/stream/domainer/sample/gtld: + servers: *id001 get: tags: - - WHOIS - operationId: whoisHistory - summary: Historical WHOIS records for a domain - description: Every WHOIS record captured for the domain since 1986, in one response (no pagination). Cost 2 credits. + - Databases - Streaming + operationId: streamDomainerGtldSample + summary: Stream a sample of newly registered gTLD domains (CSV) + description: Streams a fixed sample of newly registered gTLD domains. No API key and no date are needed, so it is the quickest way to check the schema. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + security: [] parameters: - - name: domainName - in: query - required: true - schema: - type: string - description: Domain to fetch historical WHOIS records for - example: whoisfreaks.com - - name: format - in: query - required: false - schema: - type: string - enum: - - json - - xml + - $ref: "#/components/parameters/StreamWhois" + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" responses: "200": - description: Historical WHOIS records + description: Plain CSV text, streamed as the file is read content: - application/json: + text/plain: schema: - $ref: "#/components/schemas/WhoisHistoricalResponse" - /v2.0/whois/reverse: + type: string + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.3/stream/domainer/sample/gtld/cleaned: + servers: *id001 get: tags: - - WHOIS - operationId: whoisReverse - summary: Reverse WHOIS lookup by keyword + - Databases - Streaming + operationId: streamDomainerGtldCleanedSample + summary: Stream a sample of cleaned newly registered gTLD domains (CSV) + description: Streams a fixed sample of cleaned newly registered gTLD domains. No API key and no date are needed, so it is the quickest way to check the schema. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + security: [] parameters: - - name: keyword - in: query - required: true - schema: - type: string - description: Keyword to search across WHOIS records - example: whoisfreaks - - name: page - in: query - required: false - schema: - type: integer - description: Page number - example: 1 - - name: format - in: query - required: false - schema: - type: string - enum: - - json - - xml + - $ref: "#/components/parameters/StreamWhois" + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" responses: "200": - description: Reverse WHOIS results (paginated) + description: Plain CSV text, streamed as the file is read content: - application/json: + text/plain: schema: - $ref: "#/components/schemas/ReverseWhoisResponse" - /v3.4/download/threat-feed/phishing: + type: string + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.3/stream/domainer/sample/cctld: servers: *id001 get: tags: - - Databases - Threat Feed - operationId: downloadThreatFeedPhishing - summary: Download the daily phishing threat feed (CSV) + - Databases - Streaming + operationId: streamDomainerCctldSample + summary: Stream a sample of newly registered ccTLD domains (CSV) + description: Streams a fixed sample of newly registered ccTLD domains. No API key and no date are needed, so it is the quickest way to check the schema. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + security: [] parameters: - - name: date - in: query - required: false - schema: - type: string - description: Feed date (yyyy-MM-dd); omit for the full dump of the feed - example: "2026-10-01" + - $ref: "#/components/parameters/StreamWhois" + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" responses: "200": - description: Phishing threat feed as CSV (domain,threat_type,confidence,first_seen,last_seen,No_of_threat_matched_pivots) + description: Plain CSV text, streamed as the file is read content: - application/octet-stream: + text/plain: schema: type: string - format: binary 4XX: $ref: "#/components/responses/ErrorResponse" - /v3.4/download/threat-feed/phishing/sample: + /v3.3/stream/domainer/sample/cctld/cleaned: servers: *id001 get: tags: - - Databases - Threat Feed - operationId: downloadThreatFeedPhishingSample - summary: Download a sample of the phishing threat feed (CSV) - parameters: [] + - Databases - Streaming + operationId: streamDomainerCctldCleanedSample + summary: Stream a sample of cleaned newly registered ccTLD domains (CSV) + description: Streams a fixed sample of cleaned newly registered ccTLD domains. No API key and no date are needed, so it is the quickest way to check the schema. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + security: [] + parameters: + - $ref: "#/components/parameters/StreamWhois" + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" responses: "200": - description: Sample phishing threat feed as CSV + description: Plain CSV text, streamed as the file is read content: - application/octet-stream: + text/plain: schema: type: string - format: binary 4XX: $ref: "#/components/responses/ErrorResponse" - /v3.4/download/threat-feed/malware: + /v3.3/stream/domainer/sample/expired: servers: *id001 get: tags: - - Databases - Threat Feed - operationId: downloadThreatFeedMalware - summary: Download the daily malware threat feed (CSV) + - Databases - Streaming + operationId: streamDomainerExpiredSample + summary: Stream a sample of expiring domains (CSV) + description: Streams a fixed sample of expiring domains. No API key and no date are needed, so it is the quickest way to check the schema. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + security: [] parameters: - - name: date - in: query - required: false - schema: - type: string - description: Feed date (yyyy-MM-dd); omit for the full dump of the feed - example: "2026-10-01" + - $ref: "#/components/parameters/StreamWhois" + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" responses: "200": - description: Malware threat feed as CSV (domain,threat_type,confidence,first_seen,last_seen,No_of_threat_matched_pivots) + description: Plain CSV text, streamed as the file is read content: - application/octet-stream: + text/plain: schema: type: string - format: binary 4XX: $ref: "#/components/responses/ErrorResponse" - /v3.4/download/threat-feed/malware/sample: + /v3.3/stream/domainer/sample/expired/cleaned: servers: *id001 get: tags: - - Databases - Threat Feed - operationId: downloadThreatFeedMalwareSample - summary: Download a sample of the malware threat feed (CSV) - parameters: [] + - Databases - Streaming + operationId: streamDomainerExpiredCleanedSample + summary: Stream a sample of cleaned expiring domains (CSV) + description: Streams a fixed sample of cleaned expiring domains. No API key and no date are needed, so it is the quickest way to check the schema. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + security: [] + parameters: + - $ref: "#/components/parameters/StreamWhois" + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" responses: "200": - description: Sample malware threat feed as CSV + description: Plain CSV text, streamed as the file is read content: - application/octet-stream: + text/plain: schema: type: string - format: binary 4XX: $ref: "#/components/responses/ErrorResponse" - /v3.4/download/threat-feed/spam: + /v3.3/stream/domainer/sample/dropped: servers: *id001 get: tags: - - Databases - Threat Feed - operationId: downloadThreatFeedSpam - summary: Download the daily spam threat feed (CSV) + - Databases - Streaming + operationId: streamDomainerDroppedSample + summary: Stream a sample of dropped domains (CSV) + description: Streams a fixed sample of dropped domains. No API key and no date are needed, so it is the quickest way to check the schema. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + security: [] parameters: - - name: date - in: query - required: false - schema: - type: string - description: Feed date (yyyy-MM-dd); omit for the full dump of the feed - example: "2026-10-01" + - $ref: "#/components/parameters/StreamWhois" + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" responses: "200": - description: Spam threat feed as CSV (domain,threat_type,confidence,first_seen,last_seen,No_of_threat_matched_pivots) + description: Plain CSV text, streamed as the file is read content: - application/octet-stream: + text/plain: schema: type: string - format: binary 4XX: $ref: "#/components/responses/ErrorResponse" - /v3.4/download/threat-feed/spam/sample: + /v3.3/stream/domainer/sample/dropped/backlinks: servers: *id001 get: tags: - - Databases - Threat Feed - operationId: downloadThreatFeedSpamSample - summary: Download a sample of the spam threat feed (CSV) - parameters: [] + - Databases - Streaming + operationId: streamDomainerDroppedBacklinksSample + summary: Stream a sample of dropped domains with backlinks (CSV) + description: Streams a fixed sample of dropped domains with backlinks. No API key and no date are needed, so it is the quickest way to check the schema. Rows are streamed as plain uncompressed CSV text, so a parser can start on the first row while the rest is still arriving. Use offset and limit to walk the file in pages. + security: [] + parameters: + - $ref: "#/components/parameters/StreamWhois" + - $ref: "#/components/parameters/StreamOffset" + - $ref: "#/components/parameters/StreamLimit" responses: "200": - description: Sample spam threat feed as CSV + description: Plain CSV text, streamed as the file is read content: - application/octet-stream: + text/plain: schema: type: string - format: binary 4XX: $ref: "#/components/responses/ErrorResponse" /v3.4/status: @@ -1661,6 +2494,91 @@ components: format: date description: yyyy-MM-dd; omit for latest example: "2026-10-01" + StreamDateParam: + name: date + in: query + required: true + schema: + type: string + format: date + description: yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints. + example: "2026-10-01" + StreamOffset: + name: offset + in: query + schema: + type: integer + format: int64 + minimum: 0 + description: Data rows to skip from the start of the file. The header row is never counted. Rows are skipped by reading forward, so a large offset costs more than a small one. + example: 0 + StreamLimit: + name: limit + in: query + schema: + type: integer + format: int64 + minimum: 0 + description: Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on its own. + example: 100 + StreamWhois: + name: whois + in: query + schema: + type: boolean + default: false + description: true streams the full WHOIS record per domain with a CSV header row; false streams only the domain names, one per line and with no header. The cleaned file types exist only in the WHOIS form, so pass true for those. + example: true + SortOrder: + name: sort + in: query + schema: + type: string + enum: + - asc + - desc + description: Sort direction. Omit to leave the results unsorted. + SortBy: + name: sortBy + in: query + schema: + type: string + enum: + - firstSeen + - lastSeen + default: lastSeen + description: Field to sort on. Only applies when sort is given. + ReverseValue: + name: value + in: query + schema: + type: string + required: true + description: IP, CIDR, or record value + example: 8.8.8.8 + ReverseType: + name: type + in: query + schema: + type: string + enum: + - a + - mx + - cname + - ns + - aaaa + - txt + - soa + required: true + ReverseExact: + name: exact + in: query + schema: + type: boolean + default: true + description: + When false the value is matched as a substring, which is far slower than an exact match + on a large record type. responses: Unauthorized: description: Invalid API key @@ -1686,6 +2604,12 @@ components: application/json: schema: $ref: "#/components/schemas/ErrorResponse" + RequestTimeout: + description: The query ran past the server time limit and was cancelled + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" ErrorResponse: description: Error response (4XX) content: @@ -2115,6 +3039,82 @@ components: items: $ref: "#/components/schemas/DnsResponse" additionalProperties: true + DnsEntryV2_2: + type: object + properties: + domainName: + type: string + ipAddress: + type: string + firstSeen: + type: string + description: Date the record was first observed (yyyy-MM-dd) + lastSeen: + type: string + description: Date the record was last observed (yyyy-MM-dd) + status: + type: boolean + domainRegistered: + type: boolean + dnsTypes: + type: object + dnsRecords: + type: array + items: + $ref: "#/components/schemas/DnsRecord" + additionalProperties: true + description: + DNS entry as returned from v2.2 onwards. The single queryTime of earlier versions is + replaced by the firstSeen and lastSeen pair. + HistoricalDnsResponseV2_2: + type: object + properties: + totalRecords: + type: integer + totalPages: + type: integer + currentPage: + type: integer + historicalDnsRecords: + type: array + items: + $ref: "#/components/schemas/DnsEntryV2_2" + additionalProperties: true + ReverseDnsResponseV2_2: + type: object + properties: + totalRecords: + type: integer + totalPages: + type: integer + currentPage: + type: integer + reverseDnsRecords: + type: array + items: + $ref: "#/components/schemas/DnsEntryV2_2" + additionalProperties: true + ReverseDnsResponseV2_3: + type: object + properties: + totalRecords: + type: integer + description: + Matching records. When totalRecordsCapped is true this is the cap, not the real total. + totalRecordsCapped: + type: boolean + description: + True when counting stopped at the 10,000 cap, so the real total is higher. Present + from v2.3 only. + totalPages: + type: integer + currentPage: + type: integer + reverseDnsRecords: + type: array + items: + $ref: "#/components/schemas/DnsEntryV2_2" + additionalProperties: true BulkDnsResponse: type: object properties: @@ -3089,6 +4089,10 @@ components: type: string is_anycast: type: boolean + is_cdn: + type: boolean + cdn_provider_name: + type: string additionalProperties: true IpSecurityAsn: type: object