From 66ed4c1b26f09f9dda8a6033e5ec3c5ebbebc145 Mon Sep 17 00:00:00 2001 From: qasimleoo Date: Mon, 16 Nov 2026 16:48:57 +0500 Subject: [PATCH 1/4] docs: add DNS v2.2 and v2.3 and IP reputation v2.0 to the spec Five endpoints were live but missing from the spec, so the generated reference and the SDK examples did not cover them. - /v2.2 and /v2.3 DNS historical and reverse. From v2.2 each entry reports firstSeen and lastSeen in place of queryTime and accepts sort and sortBy. v2.3 reverse adds totalRecordsCapped, which tells a client whether the total is exact or stopped at the 10,000 cap, and both v2.3 endpoints return 408 when a query runs past the server time limit rather than an empty 200. - GET and POST /v2.0/security. The bulk POST is new; the same path previously accepted only GET. It returns the full ASN block, including the IPv4 and IPv6 route counts that v1.0 does not carry. Docs and examples regenerated from the spec. --- README.md | 6 +- docs/endpoints/README.md | 14 +- docs/endpoints/api-solutions.md | 12 +- docs/endpoints/dns.md | 641 +++++++++++++++++++++- docs/endpoints/ip-reputation.md | 412 +++++++++++++- docs/languages/csharp.md | 179 +++++- docs/languages/go.md | 256 ++++++++- docs/languages/java.md | 208 ++++++- docs/languages/javascript.md | 193 ++++++- docs/languages/kotlin.md | 158 +++++- docs/languages/php.md | 235 +++++++- docs/languages/python.md | 187 ++++++- docs/languages/ruby.md | 206 ++++++- docs/languages/swift.md | 218 +++++++- docs/languages/typescript.md | 211 ++++++- examples/README.md | 8 +- examples/csharp/BulkIpReputationV2.cs | 22 + examples/csharp/DnsHistoricalV22.cs | 22 + examples/csharp/DnsHistoricalV23.cs | 22 + examples/csharp/DnsReverseV22.cs | 23 + examples/csharp/DnsReverseV23.cs | 23 + examples/csharp/IpReputationV2.cs | 17 + examples/csharp/README.md | 6 + examples/go/BulkIpReputationV2.go | 32 ++ examples/go/DnsHistoricalV22.go | 36 ++ examples/go/DnsHistoricalV23.go | 36 ++ examples/go/DnsReverseV22.go | 36 ++ examples/go/DnsReverseV23.go | 36 ++ examples/go/IpReputationV2.go | 30 + examples/go/README.md | 6 + examples/java/BulkIpReputationV2.java | 27 + examples/java/DnsHistoricalV22.java | 27 + examples/java/DnsHistoricalV23.java | 27 + examples/java/DnsReverseV22.java | 28 + examples/java/DnsReverseV23.java | 28 + examples/java/IpReputationV2.java | 21 + examples/java/README.md | 6 + examples/javascript/BulkIpReputationV2.js | 22 + examples/javascript/DnsHistoricalV22.js | 26 + examples/javascript/DnsHistoricalV23.js | 26 + examples/javascript/DnsReverseV22.js | 27 + examples/javascript/DnsReverseV23.js | 27 + examples/javascript/IpReputationV2.js | 21 + examples/javascript/README.md | 6 + examples/kotlin/BulkIpReputationV2.kt | 16 + examples/kotlin/DnsHistoricalV22.kt | 19 + examples/kotlin/DnsHistoricalV23.kt | 19 + examples/kotlin/DnsReverseV22.kt | 20 + examples/kotlin/DnsReverseV23.kt | 20 + examples/kotlin/IpReputationV2.kt | 14 + examples/kotlin/README.md | 6 + examples/php/BulkIpReputationV2.php | 33 ++ examples/php/DnsHistoricalV22.php | 31 ++ examples/php/DnsHistoricalV23.php | 31 ++ examples/php/DnsReverseV22.php | 32 ++ examples/php/DnsReverseV23.php | 32 ++ examples/php/IpReputationV2.php | 26 + examples/php/README.md | 6 + examples/python/BulkIpReputationV2.py | 21 + examples/python/DnsHistoricalV22.py | 25 + examples/python/DnsHistoricalV23.py | 25 + examples/python/DnsReverseV22.py | 26 + examples/python/DnsReverseV23.py | 26 + examples/python/IpReputationV2.py | 20 + examples/python/README.md | 6 + examples/ruby/BulkIpReputationV2.rb | 24 + examples/ruby/DnsHistoricalV22.rb | 27 + examples/ruby/DnsHistoricalV23.rb | 27 + examples/ruby/DnsReverseV22.rb | 28 + examples/ruby/DnsReverseV23.rb | 28 + examples/ruby/IpReputationV2.rb | 22 + examples/ruby/README.md | 6 + examples/swift/BulkIpReputationV2.swift | 26 + examples/swift/DnsHistoricalV22.swift | 29 + examples/swift/DnsHistoricalV23.swift | 29 + examples/swift/DnsReverseV22.swift | 30 + examples/swift/DnsReverseV23.swift | 30 + examples/swift/IpReputationV2.swift | 24 + examples/swift/README.md | 6 + examples/typescript/BulkIpReputationV2.ts | 25 + examples/typescript/DnsHistoricalV22.ts | 29 + examples/typescript/DnsHistoricalV23.ts | 29 + examples/typescript/DnsReverseV22.ts | 30 + examples/typescript/DnsReverseV23.ts | 30 + examples/typescript/IpReputationV2.ts | 24 + examples/typescript/README.md | 6 + spec/whoisfreaks-openapi.yaml | 353 ++++++++++++ 87 files changed, 5103 insertions(+), 23 deletions(-) create mode 100644 examples/csharp/BulkIpReputationV2.cs create mode 100644 examples/csharp/DnsHistoricalV22.cs create mode 100644 examples/csharp/DnsHistoricalV23.cs create mode 100644 examples/csharp/DnsReverseV22.cs create mode 100644 examples/csharp/DnsReverseV23.cs create mode 100644 examples/csharp/IpReputationV2.cs create mode 100644 examples/go/BulkIpReputationV2.go create mode 100644 examples/go/DnsHistoricalV22.go create mode 100644 examples/go/DnsHistoricalV23.go create mode 100644 examples/go/DnsReverseV22.go create mode 100644 examples/go/DnsReverseV23.go create mode 100644 examples/go/IpReputationV2.go create mode 100644 examples/java/BulkIpReputationV2.java create mode 100644 examples/java/DnsHistoricalV22.java create mode 100644 examples/java/DnsHistoricalV23.java create mode 100644 examples/java/DnsReverseV22.java create mode 100644 examples/java/DnsReverseV23.java create mode 100644 examples/java/IpReputationV2.java create mode 100644 examples/javascript/BulkIpReputationV2.js create mode 100644 examples/javascript/DnsHistoricalV22.js create mode 100644 examples/javascript/DnsHistoricalV23.js create mode 100644 examples/javascript/DnsReverseV22.js create mode 100644 examples/javascript/DnsReverseV23.js create mode 100644 examples/javascript/IpReputationV2.js create mode 100644 examples/kotlin/BulkIpReputationV2.kt create mode 100644 examples/kotlin/DnsHistoricalV22.kt create mode 100644 examples/kotlin/DnsHistoricalV23.kt create mode 100644 examples/kotlin/DnsReverseV22.kt create mode 100644 examples/kotlin/DnsReverseV23.kt create mode 100644 examples/kotlin/IpReputationV2.kt create mode 100644 examples/php/BulkIpReputationV2.php create mode 100644 examples/php/DnsHistoricalV22.php create mode 100644 examples/php/DnsHistoricalV23.php create mode 100644 examples/php/DnsReverseV22.php create mode 100644 examples/php/DnsReverseV23.php create mode 100644 examples/php/IpReputationV2.php create mode 100644 examples/python/BulkIpReputationV2.py create mode 100644 examples/python/DnsHistoricalV22.py create mode 100644 examples/python/DnsHistoricalV23.py create mode 100644 examples/python/DnsReverseV22.py create mode 100644 examples/python/DnsReverseV23.py create mode 100644 examples/python/IpReputationV2.py create mode 100644 examples/ruby/BulkIpReputationV2.rb create mode 100644 examples/ruby/DnsHistoricalV22.rb create mode 100644 examples/ruby/DnsHistoricalV23.rb create mode 100644 examples/ruby/DnsReverseV22.rb create mode 100644 examples/ruby/DnsReverseV23.rb create mode 100644 examples/ruby/IpReputationV2.rb create mode 100644 examples/swift/BulkIpReputationV2.swift create mode 100644 examples/swift/DnsHistoricalV22.swift create mode 100644 examples/swift/DnsHistoricalV23.swift create mode 100644 examples/swift/DnsReverseV22.swift create mode 100644 examples/swift/DnsReverseV23.swift create mode 100644 examples/swift/IpReputationV2.swift create mode 100644 examples/typescript/BulkIpReputationV2.ts create mode 100644 examples/typescript/DnsHistoricalV22.ts create mode 100644 examples/typescript/DnsHistoricalV23.ts create mode 100644 examples/typescript/DnsReverseV22.ts create mode 100644 examples/typescript/DnsReverseV23.ts create mode 100644 examples/typescript/IpReputationV2.ts diff --git a/README.md b/README.md index 3d76845..6125c81 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, 66 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 66 endpoints, grouped by category - [Runnable examples](examples/README.md): copy-paste, ready-to-run example for every endpoint in every language ## Language guides @@ -56,7 +56,7 @@ 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. diff --git a/docs/endpoints/README.md b/docs/endpoints/README.md index 29dfad4..053f574 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 **66 endpoints** across **22 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 @@ -56,6 +56,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 +70,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` | 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/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..8fa8926 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 @@ -415,3 +415,413 @@ func main() { --- + +## IP Reputation Lookup (v2.0) + +`GET https://api.whoisfreaks.com/v2.0/security` + +Same lookup as /v1.0/security, on the current data set. The response carries the full ASN block, including asn_name, rir and the IPv4 and IPv6 route counts, and the security block uses the newer field names with the added VPN, relay, residential proxy, bot and corporate gateway signals. 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 | | + +
+ +
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. Unlike POST /v1.0/security, this returns the full ASN block, including the IPv4 and IPv6 route counts. 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 | | + +
+ +
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..6f555c7 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 66 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 diff --git a/docs/languages/go.md b/docs/languages/go.md index 5f876e5..aaa0e47 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 66 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 diff --git a/docs/languages/java.md b/docs/languages/java.md index 86f36d3..382474d 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 66 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 diff --git a/docs/languages/javascript.md b/docs/languages/javascript.md index 67d98fc..c4ddd29 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 66 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 diff --git a/docs/languages/kotlin.md b/docs/languages/kotlin.md index 08912c6..c3eaf23 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 66 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 diff --git a/docs/languages/php.md b/docs/languages/php.md index 162eaa7..9e6d02d 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 66 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 diff --git a/docs/languages/python.md b/docs/languages/python.md index c446e1b..81db6ce 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 66 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 diff --git a/docs/languages/ruby.md b/docs/languages/ruby.md index 9b3bdf8..97e7df8 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 66 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 diff --git a/docs/languages/swift.md b/docs/languages/swift.md index 6e6dc4d..3a4645b 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 66 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 diff --git a/docs/languages/typescript.md b/docs/languages/typescript.md index 4847c26..59fa479 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 66 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 diff --git a/examples/README.md b/examples/README.md index 0789df5..a3836a9 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 66 endpoints** in **all 10 languages** (660 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..a345107 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`) 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..368735f 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`) 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..c2014d9 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`) 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..6cb3c9c 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`) 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..531c293 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`) 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..e9b1d9f 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`) 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..5b631af 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`) 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..7e2dbd9 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`) 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..40c4292 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`) 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..73e7b86 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`) diff --git a/spec/whoisfreaks-openapi.yaml b/spec/whoisfreaks-openapi.yaml index 00f48e8..c4fa55e 100644 --- a/spec/whoisfreaks-openapi.yaml +++ b/spec/whoisfreaks-openapi.yaml @@ -256,6 +256,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 +757,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 the current data set. The response carries the full ASN + block, including asn_name, rir and the IPv4 and IPv6 route counts, and the security block + uses the newer field names with the added VPN, relay, residential proxy, bot and + corporate gateway signals. 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. Unlike + POST /v1.0/security, this returns the full ASN block, including the IPv4 and IPv6 route + counts. 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: @@ -1661,6 +1882,56 @@ components: format: date description: yyyy-MM-dd; omit for latest example: "2026-10-01" + 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 +1957,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 +2392,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: From 1ee322ad5b0d77d10e70e503db550b5ec22010df Mon Sep 17 00:00:00 2001 From: qasimleoo Date: Mon, 16 Nov 2026 19:49:55 +0500 Subject: [PATCH 2/4] docs: add the v3.3 and v3.4 streaming endpoints to the spec Every domainer and threat feed file that can be downloaded can also be streamed as plain uncompressed CSV text, samples included. That is 28 paths: 14 dated domainer files, 8 domainer samples, 3 dated threat feeds and 3 threat feed samples. Streaming differs from downloading in three ways worth documenting: date is required rather than optional, the body is text/plain CSV rather than a gzip file, and offset and limit page through the data rows without counting the header. The sample endpoints need no API key, so they carry an empty security list. --- README.md | 4 +- docs/endpoints/README.md | 30 +- docs/endpoints/databases-streaming.md | 3395 +++++++++++++++++ docs/languages/csharp.md | 721 +++- docs/languages/go.md | 1130 +++++- docs/languages/java.md | 895 ++++- docs/languages/javascript.md | 833 +++- docs/languages/kotlin.md | 693 +++- docs/languages/php.md | 1034 ++++- docs/languages/python.md | 805 +++- docs/languages/ruby.md | 911 ++++- docs/languages/swift.md | 978 ++++- docs/languages/typescript.md | 928 ++++- examples/README.md | 30 +- examples/csharp/README.md | 30 + examples/csharp/StreamDomainerCctld.cs | 19 + examples/csharp/StreamDomainerCctldCleaned.cs | 19 + .../csharp/StreamDomainerCctldCleanedEmail.cs | 19 + .../csharp/StreamDomainerCctldCleanedPhone.cs | 19 + .../StreamDomainerCctldCleanedSample.cs | 16 + examples/csharp/StreamDomainerCctldSample.cs | 16 + examples/csharp/StreamDomainerDropped.cs | 19 + .../csharp/StreamDomainerDroppedBacklinks.cs | 19 + .../StreamDomainerDroppedBacklinksSample.cs | 16 + .../csharp/StreamDomainerDroppedSample.cs | 16 + examples/csharp/StreamDomainerExpired.cs | 19 + .../csharp/StreamDomainerExpiredCleaned.cs | 19 + .../StreamDomainerExpiredCleanedEmail.cs | 19 + .../StreamDomainerExpiredCleanedPhone.cs | 19 + .../StreamDomainerExpiredCleanedSample.cs | 16 + .../csharp/StreamDomainerExpiredSample.cs | 16 + examples/csharp/StreamDomainerGtld.cs | 19 + examples/csharp/StreamDomainerGtldCleaned.cs | 19 + .../csharp/StreamDomainerGtldCleanedEmail.cs | 19 + .../csharp/StreamDomainerGtldCleanedPhone.cs | 19 + .../csharp/StreamDomainerGtldCleanedSample.cs | 16 + examples/csharp/StreamDomainerGtldSample.cs | 16 + examples/csharp/StreamThreatFeedMalware.cs | 18 + .../csharp/StreamThreatFeedMalwareSample.cs | 15 + examples/csharp/StreamThreatFeedPhishing.cs | 18 + .../csharp/StreamThreatFeedPhishingSample.cs | 15 + examples/csharp/StreamThreatFeedSpam.cs | 18 + examples/csharp/StreamThreatFeedSpamSample.cs | 15 + examples/go/README.md | 30 + examples/go/StreamDomainerCctld.go | 34 + examples/go/StreamDomainerCctldCleaned.go | 34 + .../go/StreamDomainerCctldCleanedEmail.go | 34 + .../go/StreamDomainerCctldCleanedPhone.go | 34 + .../go/StreamDomainerCctldCleanedSample.go | 30 + examples/go/StreamDomainerCctldSample.go | 30 + examples/go/StreamDomainerDropped.go | 34 + examples/go/StreamDomainerDroppedBacklinks.go | 34 + .../StreamDomainerDroppedBacklinksSample.go | 30 + examples/go/StreamDomainerDroppedSample.go | 30 + examples/go/StreamDomainerExpired.go | 34 + examples/go/StreamDomainerExpiredCleaned.go | 34 + .../go/StreamDomainerExpiredCleanedEmail.go | 34 + .../go/StreamDomainerExpiredCleanedPhone.go | 34 + .../go/StreamDomainerExpiredCleanedSample.go | 30 + examples/go/StreamDomainerExpiredSample.go | 30 + examples/go/StreamDomainerGtld.go | 34 + examples/go/StreamDomainerGtldCleaned.go | 34 + examples/go/StreamDomainerGtldCleanedEmail.go | 34 + examples/go/StreamDomainerGtldCleanedPhone.go | 34 + .../go/StreamDomainerGtldCleanedSample.go | 30 + examples/go/StreamDomainerGtldSample.go | 30 + examples/go/StreamThreatFeedMalware.go | 33 + examples/go/StreamThreatFeedMalwareSample.go | 29 + examples/go/StreamThreatFeedPhishing.go | 33 + examples/go/StreamThreatFeedPhishingSample.go | 29 + examples/go/StreamThreatFeedSpam.go | 33 + examples/go/StreamThreatFeedSpamSample.go | 29 + examples/java/README.md | 30 + examples/java/StreamDomainerCctld.java | 26 + examples/java/StreamDomainerCctldCleaned.java | 26 + .../java/StreamDomainerCctldCleanedEmail.java | 26 + .../java/StreamDomainerCctldCleanedPhone.java | 26 + .../StreamDomainerCctldCleanedSample.java | 21 + examples/java/StreamDomainerCctldSample.java | 21 + examples/java/StreamDomainerDropped.java | 26 + .../java/StreamDomainerDroppedBacklinks.java | 26 + .../StreamDomainerDroppedBacklinksSample.java | 21 + .../java/StreamDomainerDroppedSample.java | 21 + examples/java/StreamDomainerExpired.java | 26 + .../java/StreamDomainerExpiredCleaned.java | 26 + .../StreamDomainerExpiredCleanedEmail.java | 26 + .../StreamDomainerExpiredCleanedPhone.java | 26 + .../StreamDomainerExpiredCleanedSample.java | 21 + .../java/StreamDomainerExpiredSample.java | 21 + examples/java/StreamDomainerGtld.java | 26 + examples/java/StreamDomainerGtldCleaned.java | 26 + .../java/StreamDomainerGtldCleanedEmail.java | 26 + .../java/StreamDomainerGtldCleanedPhone.java | 26 + .../java/StreamDomainerGtldCleanedSample.java | 21 + examples/java/StreamDomainerGtldSample.java | 21 + examples/java/StreamThreatFeedMalware.java | 25 + .../java/StreamThreatFeedMalwareSample.java | 20 + examples/java/StreamThreatFeedPhishing.java | 25 + .../java/StreamThreatFeedPhishingSample.java | 20 + examples/java/StreamThreatFeedSpam.java | 25 + examples/java/StreamThreatFeedSpamSample.java | 20 + examples/javascript/README.md | 30 + examples/javascript/StreamDomainerCctld.js | 24 + .../javascript/StreamDomainerCctldCleaned.js | 24 + .../StreamDomainerCctldCleanedEmail.js | 24 + .../StreamDomainerCctldCleanedPhone.js | 24 + .../StreamDomainerCctldCleanedSample.js | 21 + .../javascript/StreamDomainerCctldSample.js | 21 + examples/javascript/StreamDomainerDropped.js | 24 + .../StreamDomainerDroppedBacklinks.js | 24 + .../StreamDomainerDroppedBacklinksSample.js | 21 + .../javascript/StreamDomainerDroppedSample.js | 21 + examples/javascript/StreamDomainerExpired.js | 24 + .../StreamDomainerExpiredCleaned.js | 24 + .../StreamDomainerExpiredCleanedEmail.js | 24 + .../StreamDomainerExpiredCleanedPhone.js | 24 + .../StreamDomainerExpiredCleanedSample.js | 21 + .../javascript/StreamDomainerExpiredSample.js | 21 + examples/javascript/StreamDomainerGtld.js | 24 + .../javascript/StreamDomainerGtldCleaned.js | 24 + .../StreamDomainerGtldCleanedEmail.js | 24 + .../StreamDomainerGtldCleanedPhone.js | 24 + .../StreamDomainerGtldCleanedSample.js | 21 + .../javascript/StreamDomainerGtldSample.js | 21 + .../javascript/StreamThreatFeedMalware.js | 23 + .../StreamThreatFeedMalwareSample.js | 20 + .../javascript/StreamThreatFeedPhishing.js | 23 + .../StreamThreatFeedPhishingSample.js | 20 + examples/javascript/StreamThreatFeedSpam.js | 23 + .../javascript/StreamThreatFeedSpamSample.js | 20 + examples/kotlin/README.md | 30 + examples/kotlin/StreamDomainerCctld.kt | 18 + examples/kotlin/StreamDomainerCctldCleaned.kt | 18 + .../kotlin/StreamDomainerCctldCleanedEmail.kt | 18 + .../kotlin/StreamDomainerCctldCleanedPhone.kt | 18 + .../StreamDomainerCctldCleanedSample.kt | 15 + examples/kotlin/StreamDomainerCctldSample.kt | 15 + examples/kotlin/StreamDomainerDropped.kt | 18 + .../kotlin/StreamDomainerDroppedBacklinks.kt | 18 + .../StreamDomainerDroppedBacklinksSample.kt | 15 + .../kotlin/StreamDomainerDroppedSample.kt | 15 + examples/kotlin/StreamDomainerExpired.kt | 18 + .../kotlin/StreamDomainerExpiredCleaned.kt | 18 + .../StreamDomainerExpiredCleanedEmail.kt | 18 + .../StreamDomainerExpiredCleanedPhone.kt | 18 + .../StreamDomainerExpiredCleanedSample.kt | 15 + .../kotlin/StreamDomainerExpiredSample.kt | 15 + examples/kotlin/StreamDomainerGtld.kt | 18 + examples/kotlin/StreamDomainerGtldCleaned.kt | 18 + .../kotlin/StreamDomainerGtldCleanedEmail.kt | 18 + .../kotlin/StreamDomainerGtldCleanedPhone.kt | 18 + .../kotlin/StreamDomainerGtldCleanedSample.kt | 15 + examples/kotlin/StreamDomainerGtldSample.kt | 15 + examples/kotlin/StreamThreatFeedMalware.kt | 17 + .../kotlin/StreamThreatFeedMalwareSample.kt | 14 + examples/kotlin/StreamThreatFeedPhishing.kt | 17 + .../kotlin/StreamThreatFeedPhishingSample.kt | 14 + examples/kotlin/StreamThreatFeedSpam.kt | 17 + examples/kotlin/StreamThreatFeedSpamSample.kt | 14 + examples/php/README.md | 30 + examples/php/StreamDomainerCctld.php | 29 + examples/php/StreamDomainerCctldCleaned.php | 29 + .../php/StreamDomainerCctldCleanedEmail.php | 29 + .../php/StreamDomainerCctldCleanedPhone.php | 29 + .../php/StreamDomainerCctldCleanedSample.php | 29 + examples/php/StreamDomainerCctldSample.php | 29 + examples/php/StreamDomainerDropped.php | 29 + .../php/StreamDomainerDroppedBacklinks.php | 29 + .../StreamDomainerDroppedBacklinksSample.php | 29 + examples/php/StreamDomainerDroppedSample.php | 29 + examples/php/StreamDomainerExpired.php | 29 + examples/php/StreamDomainerExpiredCleaned.php | 29 + .../php/StreamDomainerExpiredCleanedEmail.php | 29 + .../php/StreamDomainerExpiredCleanedPhone.php | 29 + .../StreamDomainerExpiredCleanedSample.php | 29 + examples/php/StreamDomainerExpiredSample.php | 29 + examples/php/StreamDomainerGtld.php | 29 + examples/php/StreamDomainerGtldCleaned.php | 29 + .../php/StreamDomainerGtldCleanedEmail.php | 29 + .../php/StreamDomainerGtldCleanedPhone.php | 29 + .../php/StreamDomainerGtldCleanedSample.php | 29 + examples/php/StreamDomainerGtldSample.php | 29 + examples/php/StreamThreatFeedMalware.php | 28 + .../php/StreamThreatFeedMalwareSample.php | 28 + examples/php/StreamThreatFeedPhishing.php | 28 + .../php/StreamThreatFeedPhishingSample.php | 28 + examples/php/StreamThreatFeedSpam.php | 28 + examples/php/StreamThreatFeedSpamSample.php | 28 + examples/python/README.md | 30 + examples/python/StreamDomainerCctld.py | 23 + examples/python/StreamDomainerCctldCleaned.py | 23 + .../python/StreamDomainerCctldCleanedEmail.py | 23 + .../python/StreamDomainerCctldCleanedPhone.py | 23 + .../StreamDomainerCctldCleanedSample.py | 20 + examples/python/StreamDomainerCctldSample.py | 20 + examples/python/StreamDomainerDropped.py | 23 + .../python/StreamDomainerDroppedBacklinks.py | 23 + .../StreamDomainerDroppedBacklinksSample.py | 20 + .../python/StreamDomainerDroppedSample.py | 20 + examples/python/StreamDomainerExpired.py | 23 + .../python/StreamDomainerExpiredCleaned.py | 23 + .../StreamDomainerExpiredCleanedEmail.py | 23 + .../StreamDomainerExpiredCleanedPhone.py | 23 + .../StreamDomainerExpiredCleanedSample.py | 20 + .../python/StreamDomainerExpiredSample.py | 20 + examples/python/StreamDomainerGtld.py | 23 + examples/python/StreamDomainerGtldCleaned.py | 23 + .../python/StreamDomainerGtldCleanedEmail.py | 23 + .../python/StreamDomainerGtldCleanedPhone.py | 23 + .../python/StreamDomainerGtldCleanedSample.py | 20 + examples/python/StreamDomainerGtldSample.py | 20 + examples/python/StreamThreatFeedMalware.py | 22 + .../python/StreamThreatFeedMalwareSample.py | 19 + examples/python/StreamThreatFeedPhishing.py | 22 + .../python/StreamThreatFeedPhishingSample.py | 19 + examples/python/StreamThreatFeedSpam.py | 22 + examples/python/StreamThreatFeedSpamSample.py | 19 + examples/ruby/README.md | 30 + examples/ruby/StreamDomainerCctld.rb | 25 + examples/ruby/StreamDomainerCctldCleaned.rb | 25 + .../ruby/StreamDomainerCctldCleanedEmail.rb | 25 + .../ruby/StreamDomainerCctldCleanedPhone.rb | 25 + .../ruby/StreamDomainerCctldCleanedSample.rb | 24 + examples/ruby/StreamDomainerCctldSample.rb | 24 + examples/ruby/StreamDomainerDropped.rb | 25 + .../ruby/StreamDomainerDroppedBacklinks.rb | 25 + .../StreamDomainerDroppedBacklinksSample.rb | 24 + examples/ruby/StreamDomainerDroppedSample.rb | 24 + examples/ruby/StreamDomainerExpired.rb | 25 + examples/ruby/StreamDomainerExpiredCleaned.rb | 25 + .../ruby/StreamDomainerExpiredCleanedEmail.rb | 25 + .../ruby/StreamDomainerExpiredCleanedPhone.rb | 25 + .../StreamDomainerExpiredCleanedSample.rb | 24 + examples/ruby/StreamDomainerExpiredSample.rb | 24 + examples/ruby/StreamDomainerGtld.rb | 25 + examples/ruby/StreamDomainerGtldCleaned.rb | 25 + .../ruby/StreamDomainerGtldCleanedEmail.rb | 25 + .../ruby/StreamDomainerGtldCleanedPhone.rb | 25 + .../ruby/StreamDomainerGtldCleanedSample.rb | 24 + examples/ruby/StreamDomainerGtldSample.rb | 24 + examples/ruby/StreamThreatFeedMalware.rb | 24 + .../ruby/StreamThreatFeedMalwareSample.rb | 23 + examples/ruby/StreamThreatFeedPhishing.rb | 24 + .../ruby/StreamThreatFeedPhishingSample.rb | 23 + examples/ruby/StreamThreatFeedSpam.rb | 24 + examples/ruby/StreamThreatFeedSpamSample.rb | 23 + examples/swift/README.md | 30 + examples/swift/StreamDomainerCctld.swift | 27 + .../swift/StreamDomainerCctldCleaned.swift | 27 + .../StreamDomainerCctldCleanedEmail.swift | 27 + .../StreamDomainerCctldCleanedPhone.swift | 27 + .../StreamDomainerCctldCleanedSample.swift | 27 + .../swift/StreamDomainerCctldSample.swift | 27 + examples/swift/StreamDomainerDropped.swift | 27 + .../StreamDomainerDroppedBacklinks.swift | 27 + ...StreamDomainerDroppedBacklinksSample.swift | 27 + .../swift/StreamDomainerDroppedSample.swift | 27 + examples/swift/StreamDomainerExpired.swift | 27 + .../swift/StreamDomainerExpiredCleaned.swift | 27 + .../StreamDomainerExpiredCleanedEmail.swift | 27 + .../StreamDomainerExpiredCleanedPhone.swift | 27 + .../StreamDomainerExpiredCleanedSample.swift | 27 + .../swift/StreamDomainerExpiredSample.swift | 27 + examples/swift/StreamDomainerGtld.swift | 27 + .../swift/StreamDomainerGtldCleaned.swift | 27 + .../StreamDomainerGtldCleanedEmail.swift | 27 + .../StreamDomainerGtldCleanedPhone.swift | 27 + .../StreamDomainerGtldCleanedSample.swift | 27 + examples/swift/StreamDomainerGtldSample.swift | 27 + examples/swift/StreamThreatFeedMalware.swift | 26 + .../swift/StreamThreatFeedMalwareSample.swift | 26 + examples/swift/StreamThreatFeedPhishing.swift | 26 + .../StreamThreatFeedPhishingSample.swift | 26 + examples/swift/StreamThreatFeedSpam.swift | 26 + .../swift/StreamThreatFeedSpamSample.swift | 26 + examples/typescript/README.md | 30 + examples/typescript/StreamDomainerCctld.ts | 27 + .../typescript/StreamDomainerCctldCleaned.ts | 27 + .../StreamDomainerCctldCleanedEmail.ts | 27 + .../StreamDomainerCctldCleanedPhone.ts | 27 + .../StreamDomainerCctldCleanedSample.ts | 25 + .../typescript/StreamDomainerCctldSample.ts | 25 + examples/typescript/StreamDomainerDropped.ts | 27 + .../StreamDomainerDroppedBacklinks.ts | 27 + .../StreamDomainerDroppedBacklinksSample.ts | 25 + .../typescript/StreamDomainerDroppedSample.ts | 25 + examples/typescript/StreamDomainerExpired.ts | 27 + .../StreamDomainerExpiredCleaned.ts | 27 + .../StreamDomainerExpiredCleanedEmail.ts | 27 + .../StreamDomainerExpiredCleanedPhone.ts | 27 + .../StreamDomainerExpiredCleanedSample.ts | 25 + .../typescript/StreamDomainerExpiredSample.ts | 25 + examples/typescript/StreamDomainerGtld.ts | 27 + .../typescript/StreamDomainerGtldCleaned.ts | 27 + .../StreamDomainerGtldCleanedEmail.ts | 27 + .../StreamDomainerGtldCleanedPhone.ts | 27 + .../StreamDomainerGtldCleanedSample.ts | 25 + .../typescript/StreamDomainerGtldSample.ts | 25 + .../typescript/StreamThreatFeedMalware.ts | 26 + .../StreamThreatFeedMalwareSample.ts | 24 + .../typescript/StreamThreatFeedPhishing.ts | 26 + .../StreamThreatFeedPhishingSample.ts | 24 + examples/typescript/StreamThreatFeedSpam.ts | 26 + .../typescript/StreamThreatFeedSpamSample.ts | 24 + spec/whoisfreaks-openapi.yaml | 647 ++++ 305 files changed, 20052 insertions(+), 14 deletions(-) create mode 100644 docs/endpoints/databases-streaming.md create mode 100644 examples/csharp/StreamDomainerCctld.cs create mode 100644 examples/csharp/StreamDomainerCctldCleaned.cs create mode 100644 examples/csharp/StreamDomainerCctldCleanedEmail.cs create mode 100644 examples/csharp/StreamDomainerCctldCleanedPhone.cs create mode 100644 examples/csharp/StreamDomainerCctldCleanedSample.cs create mode 100644 examples/csharp/StreamDomainerCctldSample.cs create mode 100644 examples/csharp/StreamDomainerDropped.cs create mode 100644 examples/csharp/StreamDomainerDroppedBacklinks.cs create mode 100644 examples/csharp/StreamDomainerDroppedBacklinksSample.cs create mode 100644 examples/csharp/StreamDomainerDroppedSample.cs create mode 100644 examples/csharp/StreamDomainerExpired.cs create mode 100644 examples/csharp/StreamDomainerExpiredCleaned.cs create mode 100644 examples/csharp/StreamDomainerExpiredCleanedEmail.cs create mode 100644 examples/csharp/StreamDomainerExpiredCleanedPhone.cs create mode 100644 examples/csharp/StreamDomainerExpiredCleanedSample.cs create mode 100644 examples/csharp/StreamDomainerExpiredSample.cs create mode 100644 examples/csharp/StreamDomainerGtld.cs create mode 100644 examples/csharp/StreamDomainerGtldCleaned.cs create mode 100644 examples/csharp/StreamDomainerGtldCleanedEmail.cs create mode 100644 examples/csharp/StreamDomainerGtldCleanedPhone.cs create mode 100644 examples/csharp/StreamDomainerGtldCleanedSample.cs create mode 100644 examples/csharp/StreamDomainerGtldSample.cs create mode 100644 examples/csharp/StreamThreatFeedMalware.cs create mode 100644 examples/csharp/StreamThreatFeedMalwareSample.cs create mode 100644 examples/csharp/StreamThreatFeedPhishing.cs create mode 100644 examples/csharp/StreamThreatFeedPhishingSample.cs create mode 100644 examples/csharp/StreamThreatFeedSpam.cs create mode 100644 examples/csharp/StreamThreatFeedSpamSample.cs create mode 100644 examples/go/StreamDomainerCctld.go create mode 100644 examples/go/StreamDomainerCctldCleaned.go create mode 100644 examples/go/StreamDomainerCctldCleanedEmail.go create mode 100644 examples/go/StreamDomainerCctldCleanedPhone.go create mode 100644 examples/go/StreamDomainerCctldCleanedSample.go create mode 100644 examples/go/StreamDomainerCctldSample.go create mode 100644 examples/go/StreamDomainerDropped.go create mode 100644 examples/go/StreamDomainerDroppedBacklinks.go create mode 100644 examples/go/StreamDomainerDroppedBacklinksSample.go create mode 100644 examples/go/StreamDomainerDroppedSample.go create mode 100644 examples/go/StreamDomainerExpired.go create mode 100644 examples/go/StreamDomainerExpiredCleaned.go create mode 100644 examples/go/StreamDomainerExpiredCleanedEmail.go create mode 100644 examples/go/StreamDomainerExpiredCleanedPhone.go create mode 100644 examples/go/StreamDomainerExpiredCleanedSample.go create mode 100644 examples/go/StreamDomainerExpiredSample.go create mode 100644 examples/go/StreamDomainerGtld.go create mode 100644 examples/go/StreamDomainerGtldCleaned.go create mode 100644 examples/go/StreamDomainerGtldCleanedEmail.go create mode 100644 examples/go/StreamDomainerGtldCleanedPhone.go create mode 100644 examples/go/StreamDomainerGtldCleanedSample.go create mode 100644 examples/go/StreamDomainerGtldSample.go create mode 100644 examples/go/StreamThreatFeedMalware.go create mode 100644 examples/go/StreamThreatFeedMalwareSample.go create mode 100644 examples/go/StreamThreatFeedPhishing.go create mode 100644 examples/go/StreamThreatFeedPhishingSample.go create mode 100644 examples/go/StreamThreatFeedSpam.go create mode 100644 examples/go/StreamThreatFeedSpamSample.go create mode 100644 examples/java/StreamDomainerCctld.java create mode 100644 examples/java/StreamDomainerCctldCleaned.java create mode 100644 examples/java/StreamDomainerCctldCleanedEmail.java create mode 100644 examples/java/StreamDomainerCctldCleanedPhone.java create mode 100644 examples/java/StreamDomainerCctldCleanedSample.java create mode 100644 examples/java/StreamDomainerCctldSample.java create mode 100644 examples/java/StreamDomainerDropped.java create mode 100644 examples/java/StreamDomainerDroppedBacklinks.java create mode 100644 examples/java/StreamDomainerDroppedBacklinksSample.java create mode 100644 examples/java/StreamDomainerDroppedSample.java create mode 100644 examples/java/StreamDomainerExpired.java create mode 100644 examples/java/StreamDomainerExpiredCleaned.java create mode 100644 examples/java/StreamDomainerExpiredCleanedEmail.java create mode 100644 examples/java/StreamDomainerExpiredCleanedPhone.java create mode 100644 examples/java/StreamDomainerExpiredCleanedSample.java create mode 100644 examples/java/StreamDomainerExpiredSample.java create mode 100644 examples/java/StreamDomainerGtld.java create mode 100644 examples/java/StreamDomainerGtldCleaned.java create mode 100644 examples/java/StreamDomainerGtldCleanedEmail.java create mode 100644 examples/java/StreamDomainerGtldCleanedPhone.java create mode 100644 examples/java/StreamDomainerGtldCleanedSample.java create mode 100644 examples/java/StreamDomainerGtldSample.java create mode 100644 examples/java/StreamThreatFeedMalware.java create mode 100644 examples/java/StreamThreatFeedMalwareSample.java create mode 100644 examples/java/StreamThreatFeedPhishing.java create mode 100644 examples/java/StreamThreatFeedPhishingSample.java create mode 100644 examples/java/StreamThreatFeedSpam.java create mode 100644 examples/java/StreamThreatFeedSpamSample.java create mode 100644 examples/javascript/StreamDomainerCctld.js create mode 100644 examples/javascript/StreamDomainerCctldCleaned.js create mode 100644 examples/javascript/StreamDomainerCctldCleanedEmail.js create mode 100644 examples/javascript/StreamDomainerCctldCleanedPhone.js create mode 100644 examples/javascript/StreamDomainerCctldCleanedSample.js create mode 100644 examples/javascript/StreamDomainerCctldSample.js create mode 100644 examples/javascript/StreamDomainerDropped.js create mode 100644 examples/javascript/StreamDomainerDroppedBacklinks.js create mode 100644 examples/javascript/StreamDomainerDroppedBacklinksSample.js create mode 100644 examples/javascript/StreamDomainerDroppedSample.js create mode 100644 examples/javascript/StreamDomainerExpired.js create mode 100644 examples/javascript/StreamDomainerExpiredCleaned.js create mode 100644 examples/javascript/StreamDomainerExpiredCleanedEmail.js create mode 100644 examples/javascript/StreamDomainerExpiredCleanedPhone.js create mode 100644 examples/javascript/StreamDomainerExpiredCleanedSample.js create mode 100644 examples/javascript/StreamDomainerExpiredSample.js create mode 100644 examples/javascript/StreamDomainerGtld.js create mode 100644 examples/javascript/StreamDomainerGtldCleaned.js create mode 100644 examples/javascript/StreamDomainerGtldCleanedEmail.js create mode 100644 examples/javascript/StreamDomainerGtldCleanedPhone.js create mode 100644 examples/javascript/StreamDomainerGtldCleanedSample.js create mode 100644 examples/javascript/StreamDomainerGtldSample.js create mode 100644 examples/javascript/StreamThreatFeedMalware.js create mode 100644 examples/javascript/StreamThreatFeedMalwareSample.js create mode 100644 examples/javascript/StreamThreatFeedPhishing.js create mode 100644 examples/javascript/StreamThreatFeedPhishingSample.js create mode 100644 examples/javascript/StreamThreatFeedSpam.js create mode 100644 examples/javascript/StreamThreatFeedSpamSample.js create mode 100644 examples/kotlin/StreamDomainerCctld.kt create mode 100644 examples/kotlin/StreamDomainerCctldCleaned.kt create mode 100644 examples/kotlin/StreamDomainerCctldCleanedEmail.kt create mode 100644 examples/kotlin/StreamDomainerCctldCleanedPhone.kt create mode 100644 examples/kotlin/StreamDomainerCctldCleanedSample.kt create mode 100644 examples/kotlin/StreamDomainerCctldSample.kt create mode 100644 examples/kotlin/StreamDomainerDropped.kt create mode 100644 examples/kotlin/StreamDomainerDroppedBacklinks.kt create mode 100644 examples/kotlin/StreamDomainerDroppedBacklinksSample.kt create mode 100644 examples/kotlin/StreamDomainerDroppedSample.kt create mode 100644 examples/kotlin/StreamDomainerExpired.kt create mode 100644 examples/kotlin/StreamDomainerExpiredCleaned.kt create mode 100644 examples/kotlin/StreamDomainerExpiredCleanedEmail.kt create mode 100644 examples/kotlin/StreamDomainerExpiredCleanedPhone.kt create mode 100644 examples/kotlin/StreamDomainerExpiredCleanedSample.kt create mode 100644 examples/kotlin/StreamDomainerExpiredSample.kt create mode 100644 examples/kotlin/StreamDomainerGtld.kt create mode 100644 examples/kotlin/StreamDomainerGtldCleaned.kt create mode 100644 examples/kotlin/StreamDomainerGtldCleanedEmail.kt create mode 100644 examples/kotlin/StreamDomainerGtldCleanedPhone.kt create mode 100644 examples/kotlin/StreamDomainerGtldCleanedSample.kt create mode 100644 examples/kotlin/StreamDomainerGtldSample.kt create mode 100644 examples/kotlin/StreamThreatFeedMalware.kt create mode 100644 examples/kotlin/StreamThreatFeedMalwareSample.kt create mode 100644 examples/kotlin/StreamThreatFeedPhishing.kt create mode 100644 examples/kotlin/StreamThreatFeedPhishingSample.kt create mode 100644 examples/kotlin/StreamThreatFeedSpam.kt create mode 100644 examples/kotlin/StreamThreatFeedSpamSample.kt create mode 100644 examples/php/StreamDomainerCctld.php create mode 100644 examples/php/StreamDomainerCctldCleaned.php create mode 100644 examples/php/StreamDomainerCctldCleanedEmail.php create mode 100644 examples/php/StreamDomainerCctldCleanedPhone.php create mode 100644 examples/php/StreamDomainerCctldCleanedSample.php create mode 100644 examples/php/StreamDomainerCctldSample.php create mode 100644 examples/php/StreamDomainerDropped.php create mode 100644 examples/php/StreamDomainerDroppedBacklinks.php create mode 100644 examples/php/StreamDomainerDroppedBacklinksSample.php create mode 100644 examples/php/StreamDomainerDroppedSample.php create mode 100644 examples/php/StreamDomainerExpired.php create mode 100644 examples/php/StreamDomainerExpiredCleaned.php create mode 100644 examples/php/StreamDomainerExpiredCleanedEmail.php create mode 100644 examples/php/StreamDomainerExpiredCleanedPhone.php create mode 100644 examples/php/StreamDomainerExpiredCleanedSample.php create mode 100644 examples/php/StreamDomainerExpiredSample.php create mode 100644 examples/php/StreamDomainerGtld.php create mode 100644 examples/php/StreamDomainerGtldCleaned.php create mode 100644 examples/php/StreamDomainerGtldCleanedEmail.php create mode 100644 examples/php/StreamDomainerGtldCleanedPhone.php create mode 100644 examples/php/StreamDomainerGtldCleanedSample.php create mode 100644 examples/php/StreamDomainerGtldSample.php create mode 100644 examples/php/StreamThreatFeedMalware.php create mode 100644 examples/php/StreamThreatFeedMalwareSample.php create mode 100644 examples/php/StreamThreatFeedPhishing.php create mode 100644 examples/php/StreamThreatFeedPhishingSample.php create mode 100644 examples/php/StreamThreatFeedSpam.php create mode 100644 examples/php/StreamThreatFeedSpamSample.php create mode 100644 examples/python/StreamDomainerCctld.py create mode 100644 examples/python/StreamDomainerCctldCleaned.py create mode 100644 examples/python/StreamDomainerCctldCleanedEmail.py create mode 100644 examples/python/StreamDomainerCctldCleanedPhone.py create mode 100644 examples/python/StreamDomainerCctldCleanedSample.py create mode 100644 examples/python/StreamDomainerCctldSample.py create mode 100644 examples/python/StreamDomainerDropped.py create mode 100644 examples/python/StreamDomainerDroppedBacklinks.py create mode 100644 examples/python/StreamDomainerDroppedBacklinksSample.py create mode 100644 examples/python/StreamDomainerDroppedSample.py create mode 100644 examples/python/StreamDomainerExpired.py create mode 100644 examples/python/StreamDomainerExpiredCleaned.py create mode 100644 examples/python/StreamDomainerExpiredCleanedEmail.py create mode 100644 examples/python/StreamDomainerExpiredCleanedPhone.py create mode 100644 examples/python/StreamDomainerExpiredCleanedSample.py create mode 100644 examples/python/StreamDomainerExpiredSample.py create mode 100644 examples/python/StreamDomainerGtld.py create mode 100644 examples/python/StreamDomainerGtldCleaned.py create mode 100644 examples/python/StreamDomainerGtldCleanedEmail.py create mode 100644 examples/python/StreamDomainerGtldCleanedPhone.py create mode 100644 examples/python/StreamDomainerGtldCleanedSample.py create mode 100644 examples/python/StreamDomainerGtldSample.py create mode 100644 examples/python/StreamThreatFeedMalware.py create mode 100644 examples/python/StreamThreatFeedMalwareSample.py create mode 100644 examples/python/StreamThreatFeedPhishing.py create mode 100644 examples/python/StreamThreatFeedPhishingSample.py create mode 100644 examples/python/StreamThreatFeedSpam.py create mode 100644 examples/python/StreamThreatFeedSpamSample.py create mode 100644 examples/ruby/StreamDomainerCctld.rb create mode 100644 examples/ruby/StreamDomainerCctldCleaned.rb create mode 100644 examples/ruby/StreamDomainerCctldCleanedEmail.rb create mode 100644 examples/ruby/StreamDomainerCctldCleanedPhone.rb create mode 100644 examples/ruby/StreamDomainerCctldCleanedSample.rb create mode 100644 examples/ruby/StreamDomainerCctldSample.rb create mode 100644 examples/ruby/StreamDomainerDropped.rb create mode 100644 examples/ruby/StreamDomainerDroppedBacklinks.rb create mode 100644 examples/ruby/StreamDomainerDroppedBacklinksSample.rb create mode 100644 examples/ruby/StreamDomainerDroppedSample.rb create mode 100644 examples/ruby/StreamDomainerExpired.rb create mode 100644 examples/ruby/StreamDomainerExpiredCleaned.rb create mode 100644 examples/ruby/StreamDomainerExpiredCleanedEmail.rb create mode 100644 examples/ruby/StreamDomainerExpiredCleanedPhone.rb create mode 100644 examples/ruby/StreamDomainerExpiredCleanedSample.rb create mode 100644 examples/ruby/StreamDomainerExpiredSample.rb create mode 100644 examples/ruby/StreamDomainerGtld.rb create mode 100644 examples/ruby/StreamDomainerGtldCleaned.rb create mode 100644 examples/ruby/StreamDomainerGtldCleanedEmail.rb create mode 100644 examples/ruby/StreamDomainerGtldCleanedPhone.rb create mode 100644 examples/ruby/StreamDomainerGtldCleanedSample.rb create mode 100644 examples/ruby/StreamDomainerGtldSample.rb create mode 100644 examples/ruby/StreamThreatFeedMalware.rb create mode 100644 examples/ruby/StreamThreatFeedMalwareSample.rb create mode 100644 examples/ruby/StreamThreatFeedPhishing.rb create mode 100644 examples/ruby/StreamThreatFeedPhishingSample.rb create mode 100644 examples/ruby/StreamThreatFeedSpam.rb create mode 100644 examples/ruby/StreamThreatFeedSpamSample.rb create mode 100644 examples/swift/StreamDomainerCctld.swift create mode 100644 examples/swift/StreamDomainerCctldCleaned.swift create mode 100644 examples/swift/StreamDomainerCctldCleanedEmail.swift create mode 100644 examples/swift/StreamDomainerCctldCleanedPhone.swift create mode 100644 examples/swift/StreamDomainerCctldCleanedSample.swift create mode 100644 examples/swift/StreamDomainerCctldSample.swift create mode 100644 examples/swift/StreamDomainerDropped.swift create mode 100644 examples/swift/StreamDomainerDroppedBacklinks.swift create mode 100644 examples/swift/StreamDomainerDroppedBacklinksSample.swift create mode 100644 examples/swift/StreamDomainerDroppedSample.swift create mode 100644 examples/swift/StreamDomainerExpired.swift create mode 100644 examples/swift/StreamDomainerExpiredCleaned.swift create mode 100644 examples/swift/StreamDomainerExpiredCleanedEmail.swift create mode 100644 examples/swift/StreamDomainerExpiredCleanedPhone.swift create mode 100644 examples/swift/StreamDomainerExpiredCleanedSample.swift create mode 100644 examples/swift/StreamDomainerExpiredSample.swift create mode 100644 examples/swift/StreamDomainerGtld.swift create mode 100644 examples/swift/StreamDomainerGtldCleaned.swift create mode 100644 examples/swift/StreamDomainerGtldCleanedEmail.swift create mode 100644 examples/swift/StreamDomainerGtldCleanedPhone.swift create mode 100644 examples/swift/StreamDomainerGtldCleanedSample.swift create mode 100644 examples/swift/StreamDomainerGtldSample.swift create mode 100644 examples/swift/StreamThreatFeedMalware.swift create mode 100644 examples/swift/StreamThreatFeedMalwareSample.swift create mode 100644 examples/swift/StreamThreatFeedPhishing.swift create mode 100644 examples/swift/StreamThreatFeedPhishingSample.swift create mode 100644 examples/swift/StreamThreatFeedSpam.swift create mode 100644 examples/swift/StreamThreatFeedSpamSample.swift create mode 100644 examples/typescript/StreamDomainerCctld.ts create mode 100644 examples/typescript/StreamDomainerCctldCleaned.ts create mode 100644 examples/typescript/StreamDomainerCctldCleanedEmail.ts create mode 100644 examples/typescript/StreamDomainerCctldCleanedPhone.ts create mode 100644 examples/typescript/StreamDomainerCctldCleanedSample.ts create mode 100644 examples/typescript/StreamDomainerCctldSample.ts create mode 100644 examples/typescript/StreamDomainerDropped.ts create mode 100644 examples/typescript/StreamDomainerDroppedBacklinks.ts create mode 100644 examples/typescript/StreamDomainerDroppedBacklinksSample.ts create mode 100644 examples/typescript/StreamDomainerDroppedSample.ts create mode 100644 examples/typescript/StreamDomainerExpired.ts create mode 100644 examples/typescript/StreamDomainerExpiredCleaned.ts create mode 100644 examples/typescript/StreamDomainerExpiredCleanedEmail.ts create mode 100644 examples/typescript/StreamDomainerExpiredCleanedPhone.ts create mode 100644 examples/typescript/StreamDomainerExpiredCleanedSample.ts create mode 100644 examples/typescript/StreamDomainerExpiredSample.ts create mode 100644 examples/typescript/StreamDomainerGtld.ts create mode 100644 examples/typescript/StreamDomainerGtldCleaned.ts create mode 100644 examples/typescript/StreamDomainerGtldCleanedEmail.ts create mode 100644 examples/typescript/StreamDomainerGtldCleanedPhone.ts create mode 100644 examples/typescript/StreamDomainerGtldCleanedSample.ts create mode 100644 examples/typescript/StreamDomainerGtldSample.ts create mode 100644 examples/typescript/StreamThreatFeedMalware.ts create mode 100644 examples/typescript/StreamThreatFeedMalwareSample.ts create mode 100644 examples/typescript/StreamThreatFeedPhishing.ts create mode 100644 examples/typescript/StreamThreatFeedPhishingSample.ts create mode 100644 examples/typescript/StreamThreatFeedSpam.ts create mode 100644 examples/typescript/StreamThreatFeedSpamSample.ts diff --git a/README.md b/README.md index 6125c81..ce71356 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # WhoisFreaks SDK Documentation Official documentation for the **WhoisFreaks** SDKs: one API, 10 -languages, 66 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 66 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 diff --git a/docs/endpoints/README.md b/docs/endpoints/README.md index 053f574..cf66056 100644 --- a/docs/endpoints/README.md +++ b/docs/endpoints/README.md @@ -1,6 +1,6 @@ # Endpoint Reference -The WhoisFreaks API exposes **66 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 @@ -115,3 +115,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` | +| Other | Databases - Streaming | GET | `/v3.4/stream/threat-feed/phishing` | `streamThreatFeedPhishing` | +| Other | Databases - Streaming | GET | `/v3.4/stream/threat-feed/phishing/sample` | `streamThreatFeedPhishingSample` | +| Other | Databases - Streaming | GET | `/v3.4/stream/threat-feed/malware` | `streamThreatFeedMalware` | +| Other | Databases - Streaming | GET | `/v3.4/stream/threat-feed/malware/sample` | `streamThreatFeedMalwareSample` | +| Other | Databases - Streaming | GET | `/v3.4/stream/threat-feed/spam` | `streamThreatFeedSpam` | +| Other | Databases - Streaming | GET | `/v3.4/stream/threat-feed/spam/sample` | `streamThreatFeedSpamSample` | +| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/gtld` | `streamDomainerGtld` | +| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/gtld/cleaned` | `streamDomainerGtldCleaned` | +| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/gtld/cleaned/email` | `streamDomainerGtldCleanedEmail` | +| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/gtld/cleaned/phone` | `streamDomainerGtldCleanedPhone` | +| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/cctld` | `streamDomainerCctld` | +| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/cctld/cleaned` | `streamDomainerCctldCleaned` | +| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/cctld/cleaned/email` | `streamDomainerCctldCleanedEmail` | +| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/cctld/cleaned/phone` | `streamDomainerCctldCleanedPhone` | +| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/expired` | `streamDomainerExpired` | +| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/expired/cleaned` | `streamDomainerExpiredCleaned` | +| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/expired/cleaned/email` | `streamDomainerExpiredCleanedEmail` | +| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/expired/cleaned/phone` | `streamDomainerExpiredCleanedPhone` | +| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/dropped` | `streamDomainerDropped` | +| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/dropped/backlinks` | `streamDomainerDroppedBacklinks` | +| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/sample/gtld` | `streamDomainerGtldSample` | +| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/sample/gtld/cleaned` | `streamDomainerGtldCleanedSample` | +| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/sample/cctld` | `streamDomainerCctldSample` | +| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/sample/cctld/cleaned` | `streamDomainerCctldCleanedSample` | +| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/sample/expired` | `streamDomainerExpiredSample` | +| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/sample/expired/cleaned` | `streamDomainerExpiredCleanedSample` | +| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/sample/dropped` | `streamDomainerDroppedSample` | +| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/sample/dropped/backlinks` | `streamDomainerDroppedBacklinksSample` | diff --git a/docs/endpoints/databases-streaming.md b/docs/endpoints/databases-streaming.md new file mode 100644 index 0000000..84aada5 --- /dev/null +++ b/docs/endpoints/databases-streaming.md @@ -0,0 +1,3395 @@ +# Databases - Streaming + +*Section: Other* + +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... + new_key = api.stream_threat_feed_phishing(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamThreatFeedPhishing({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_threat_feed_phishing_sample() # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamThreatFeedPhishingSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_threat_feed_malware(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamThreatFeedMalware({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_threat_feed_malware_sample() # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamThreatFeedMalwareSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_threat_feed_spam(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamThreatFeedSpam({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_threat_feed_spam_sample() # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamThreatFeedSpamSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_domainer_gtld(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamDomainerGtld({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_domainer_gtld_cleaned(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamDomainerGtldCleaned({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_domainer_gtld_cleaned_email(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamDomainerGtldCleanedEmail({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_domainer_gtld_cleaned_phone(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamDomainerGtldCleanedPhone({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_domainer_cctld(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamDomainerCctld({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_domainer_cctld_cleaned(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamDomainerCctldCleaned({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_domainer_cctld_cleaned_email(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamDomainerCctldCleanedEmail({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_domainer_cctld_cleaned_phone(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamDomainerCctldCleanedPhone({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_domainer_expired(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamDomainerExpired({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_domainer_expired_cleaned(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamDomainerExpiredCleaned({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_domainer_expired_cleaned_email(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamDomainerExpiredCleanedEmail({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_domainer_expired_cleaned_phone(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamDomainerExpiredCleanedPhone({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_domainer_dropped(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamDomainerDropped({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_domainer_dropped_backlinks(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamDomainerDroppedBacklinks({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_domainer_gtld_sample() # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamDomainerGtldSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_domainer_gtld_cleaned_sample() # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamDomainerGtldCleanedSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_domainer_cctld_sample() # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamDomainerCctldSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_domainer_cctld_cleaned_sample() # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamDomainerCctldCleanedSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_domainer_expired_sample() # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamDomainerExpiredSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_domainer_expired_cleaned_sample() # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamDomainerExpiredCleanedSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_domainer_dropped_sample() # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamDomainerDroppedSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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... + new_key = api.stream_domainer_dropped_backlinks_sample() # use this key from now on + print("New API key:", new_key) +``` + +
+ +
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 newKey = await api.streamDomainerDroppedBacklinksSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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/languages/csharp.md b/docs/languages/csharp.md index 6f555c7..f9a01f1 100644 --- a/docs/languages/csharp.md +++ b/docs/languages/csharp.md @@ -93,7 +93,7 @@ Console.WriteLine(result.ToJson()); ## Endpoints -All 66 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 @@ -2086,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 aaa0e47..f6d217a 100644 --- a/docs/languages/go.md +++ b/docs/languages/go.md @@ -116,7 +116,7 @@ func main() { ## Endpoints -All 66 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 @@ -3174,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 382474d..5b16005 100644 --- a/docs/languages/java.md +++ b/docs/languages/java.md @@ -144,7 +144,7 @@ public class WhoisLive { ## Endpoints -All 66 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 @@ -2487,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 c4ddd29..d035717 100644 --- a/docs/languages/javascript.md +++ b/docs/languages/javascript.md @@ -99,7 +99,7 @@ main().catch((err) => { ## Endpoints -All 66 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 @@ -2171,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 newKey = await api.streamThreatFeedPhishing("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamThreatFeedPhishingSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamThreatFeedMalware("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamThreatFeedMalwareSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamThreatFeedSpam("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamThreatFeedSpamSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerGtld("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerGtldCleaned("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerGtldCleanedEmail("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerGtldCleanedPhone("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerCctld("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerCctldCleaned("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerCctldCleanedEmail("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerCctldCleanedPhone("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerExpired("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerExpiredCleaned("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerExpiredCleanedEmail("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerExpiredCleanedPhone("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerDropped("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerDroppedBacklinks("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerGtldSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerGtldCleanedSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerCctldSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerCctldCleanedSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerExpiredSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerExpiredCleanedSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerDroppedSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerDroppedBacklinksSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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 c3eaf23..876c1bb 100644 --- a/docs/languages/kotlin.md +++ b/docs/languages/kotlin.md @@ -111,7 +111,7 @@ fun main() { ## Endpoints -All 66 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 @@ -1800,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 9e6d02d..6b8b4a2 100644 --- a/docs/languages/php.md +++ b/docs/languages/php.md @@ -104,7 +104,7 @@ try { ## Endpoints -All 66 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 @@ -2585,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 81db6ce..6613502 100644 --- a/docs/languages/python.md +++ b/docs/languages/python.md @@ -92,7 +92,7 @@ with whoisfreaks.ApiClient(config) as client: ## Endpoints -All 66 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 @@ -2063,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... + new_key = api.stream_threat_feed_phishing(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_threat_feed_phishing_sample() # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_threat_feed_malware(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_threat_feed_malware_sample() # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_threat_feed_spam(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_threat_feed_spam_sample() # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_domainer_gtld(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_domainer_gtld_cleaned(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_domainer_gtld_cleaned_email(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_domainer_gtld_cleaned_phone(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_domainer_cctld(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_domainer_cctld_cleaned(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_domainer_cctld_cleaned_email(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_domainer_cctld_cleaned_phone(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_domainer_expired(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_domainer_expired_cleaned(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_domainer_expired_cleaned_email(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_domainer_expired_cleaned_phone(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_domainer_dropped(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_domainer_dropped_backlinks(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_domainer_gtld_sample() # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_domainer_gtld_cleaned_sample() # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_domainer_cctld_sample() # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_domainer_cctld_cleaned_sample() # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_domainer_expired_sample() # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_domainer_expired_cleaned_sample() # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_domainer_dropped_sample() # use this key from now on + print("New API key:", new_key) +``` + +#### 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... + new_key = api.stream_domainer_dropped_backlinks_sample() # use this key from now on + print("New API key:", new_key) +``` diff --git a/docs/languages/ruby.md b/docs/languages/ruby.md index 97e7df8..d4a4b1e 100644 --- a/docs/languages/ruby.md +++ b/docs/languages/ruby.md @@ -109,7 +109,7 @@ end ## Endpoints -All 66 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 @@ -2324,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 3a4645b..12ea170 100644 --- a/docs/languages/swift.md +++ b/docs/languages/swift.md @@ -117,7 +117,7 @@ do { ## Endpoints -All 66 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 @@ -2471,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 59fa479..1cc264e 100644 --- a/docs/languages/typescript.md +++ b/docs/languages/typescript.md @@ -113,7 +113,7 @@ main().catch(async (err: unknown) => { ## Endpoints -All 66 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 @@ -2384,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 newKey = await api.streamThreatFeedPhishing({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamThreatFeedPhishingSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamThreatFeedMalware({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamThreatFeedMalwareSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamThreatFeedSpam({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamThreatFeedSpamSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerGtld({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerGtldCleaned({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerGtldCleanedEmail({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerGtldCleanedPhone({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerCctld({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerCctldCleaned({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerCctldCleanedEmail({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerCctldCleanedPhone({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerExpired({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerExpiredCleaned({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerExpiredCleanedEmail({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerExpiredCleanedPhone({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerDropped({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerDroppedBacklinks({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerGtldSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerGtldCleanedSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerCctldSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerCctldCleanedSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerExpiredSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerExpiredCleanedSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerDroppedSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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 newKey = await api.streamDomainerDroppedBacklinksSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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 a3836a9..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 66 endpoints** in **all 10 languages** (660 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//.`. @@ -72,3 +72,31 @@ Set the `WHOISFREAKS_API_KEY` environment variable to your key (from { + // 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..c0ab6c9 --- /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 newKey = await api.streamDomainerCctldCleaned("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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..0001dcf --- /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 newKey = await api.streamDomainerCctldCleanedEmail("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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..7dcdf17 --- /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 newKey = await api.streamDomainerCctldCleanedPhone("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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..5c40bd0 --- /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 newKey = await api.streamDomainerCctldCleanedSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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..40e2a75 --- /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 newKey = await api.streamDomainerCctldSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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..166dd8c --- /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 newKey = await api.streamDomainerDropped("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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..c72a671 --- /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 newKey = await api.streamDomainerDroppedBacklinks("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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..357afed --- /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 newKey = await api.streamDomainerDroppedBacklinksSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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..c0b3561 --- /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 newKey = await api.streamDomainerDroppedSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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..ba90bb2 --- /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 newKey = await api.streamDomainerExpired("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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..fc9b161 --- /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 newKey = await api.streamDomainerExpiredCleaned("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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..1c28ac1 --- /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 newKey = await api.streamDomainerExpiredCleanedEmail("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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..9a5abe5 --- /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 newKey = await api.streamDomainerExpiredCleanedPhone("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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..0bc43fb --- /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 newKey = await api.streamDomainerExpiredCleanedSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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..c820a78 --- /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 newKey = await api.streamDomainerExpiredSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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..2ed5e8d --- /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 newKey = await api.streamDomainerGtld("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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..e5c22f2 --- /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 newKey = await api.streamDomainerGtldCleaned("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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..1fcb053 --- /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 newKey = await api.streamDomainerGtldCleanedEmail("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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..ec12585 --- /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 newKey = await api.streamDomainerGtldCleanedPhone("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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..7f28b52 --- /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 newKey = await api.streamDomainerGtldCleanedSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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..ef3483c --- /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 newKey = await api.streamDomainerGtldSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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..fe4d0c9 --- /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 newKey = await api.streamThreatFeedMalware("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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..5b0f1b2 --- /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 newKey = await api.streamThreatFeedMalwareSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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..496fc27 --- /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 newKey = await api.streamThreatFeedPhishing("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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..e0e73c9 --- /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 newKey = await api.streamThreatFeedPhishingSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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..352feba --- /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 newKey = await api.streamThreatFeedSpam("2026-10-01"); // use this key from now on + console.log("New API key:", newKey); +} + +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..eaffa62 --- /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 newKey = await api.streamThreatFeedSpamSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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/README.md b/examples/kotlin/README.md index 531c293..1e7a6d6 100644 --- a/examples/kotlin/README.md +++ b/examples/kotlin/README.md @@ -111,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/README.md b/examples/php/README.md index e9b1d9f..2e70a3f 100644 --- a/examples/php/README.md +++ b/examples/php/README.md @@ -111,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/README.md b/examples/python/README.md index 5b631af..f49b822 100644 --- a/examples/python/README.md +++ b/examples/python/README.md @@ -111,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..d38d6db --- /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... + new_key = api.stream_domainer_cctld(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamDomainerCctldCleaned.py b/examples/python/StreamDomainerCctldCleaned.py new file mode 100644 index 0000000..4b12e04 --- /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... + new_key = api.stream_domainer_cctld_cleaned(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamDomainerCctldCleanedEmail.py b/examples/python/StreamDomainerCctldCleanedEmail.py new file mode 100644 index 0000000..f0ff2bd --- /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... + new_key = api.stream_domainer_cctld_cleaned_email(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamDomainerCctldCleanedPhone.py b/examples/python/StreamDomainerCctldCleanedPhone.py new file mode 100644 index 0000000..6c3eaae --- /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... + new_key = api.stream_domainer_cctld_cleaned_phone(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamDomainerCctldCleanedSample.py b/examples/python/StreamDomainerCctldCleanedSample.py new file mode 100644 index 0000000..198283b --- /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... + new_key = api.stream_domainer_cctld_cleaned_sample() # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamDomainerCctldSample.py b/examples/python/StreamDomainerCctldSample.py new file mode 100644 index 0000000..a65aa3c --- /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... + new_key = api.stream_domainer_cctld_sample() # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamDomainerDropped.py b/examples/python/StreamDomainerDropped.py new file mode 100644 index 0000000..acc1f15 --- /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... + new_key = api.stream_domainer_dropped(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamDomainerDroppedBacklinks.py b/examples/python/StreamDomainerDroppedBacklinks.py new file mode 100644 index 0000000..e0d6113 --- /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... + new_key = api.stream_domainer_dropped_backlinks(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamDomainerDroppedBacklinksSample.py b/examples/python/StreamDomainerDroppedBacklinksSample.py new file mode 100644 index 0000000..846accf --- /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... + new_key = api.stream_domainer_dropped_backlinks_sample() # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamDomainerDroppedSample.py b/examples/python/StreamDomainerDroppedSample.py new file mode 100644 index 0000000..eaabfa8 --- /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... + new_key = api.stream_domainer_dropped_sample() # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamDomainerExpired.py b/examples/python/StreamDomainerExpired.py new file mode 100644 index 0000000..80f34f6 --- /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... + new_key = api.stream_domainer_expired(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamDomainerExpiredCleaned.py b/examples/python/StreamDomainerExpiredCleaned.py new file mode 100644 index 0000000..8b3e8f0 --- /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... + new_key = api.stream_domainer_expired_cleaned(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamDomainerExpiredCleanedEmail.py b/examples/python/StreamDomainerExpiredCleanedEmail.py new file mode 100644 index 0000000..8c52d78 --- /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... + new_key = api.stream_domainer_expired_cleaned_email(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamDomainerExpiredCleanedPhone.py b/examples/python/StreamDomainerExpiredCleanedPhone.py new file mode 100644 index 0000000..20b9228 --- /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... + new_key = api.stream_domainer_expired_cleaned_phone(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamDomainerExpiredCleanedSample.py b/examples/python/StreamDomainerExpiredCleanedSample.py new file mode 100644 index 0000000..ecff7d5 --- /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... + new_key = api.stream_domainer_expired_cleaned_sample() # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamDomainerExpiredSample.py b/examples/python/StreamDomainerExpiredSample.py new file mode 100644 index 0000000..49f0e18 --- /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... + new_key = api.stream_domainer_expired_sample() # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamDomainerGtld.py b/examples/python/StreamDomainerGtld.py new file mode 100644 index 0000000..11effc9 --- /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... + new_key = api.stream_domainer_gtld(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamDomainerGtldCleaned.py b/examples/python/StreamDomainerGtldCleaned.py new file mode 100644 index 0000000..1b43fd3 --- /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... + new_key = api.stream_domainer_gtld_cleaned(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamDomainerGtldCleanedEmail.py b/examples/python/StreamDomainerGtldCleanedEmail.py new file mode 100644 index 0000000..3a23315 --- /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... + new_key = api.stream_domainer_gtld_cleaned_email(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamDomainerGtldCleanedPhone.py b/examples/python/StreamDomainerGtldCleanedPhone.py new file mode 100644 index 0000000..c4113c8 --- /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... + new_key = api.stream_domainer_gtld_cleaned_phone(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamDomainerGtldCleanedSample.py b/examples/python/StreamDomainerGtldCleanedSample.py new file mode 100644 index 0000000..23a8d3e --- /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... + new_key = api.stream_domainer_gtld_cleaned_sample() # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamDomainerGtldSample.py b/examples/python/StreamDomainerGtldSample.py new file mode 100644 index 0000000..922d8ef --- /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... + new_key = api.stream_domainer_gtld_sample() # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamThreatFeedMalware.py b/examples/python/StreamThreatFeedMalware.py new file mode 100644 index 0000000..ba7f208 --- /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... + new_key = api.stream_threat_feed_malware(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamThreatFeedMalwareSample.py b/examples/python/StreamThreatFeedMalwareSample.py new file mode 100644 index 0000000..7a04c03 --- /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... + new_key = api.stream_threat_feed_malware_sample() # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamThreatFeedPhishing.py b/examples/python/StreamThreatFeedPhishing.py new file mode 100644 index 0000000..71cd1aa --- /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... + new_key = api.stream_threat_feed_phishing(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamThreatFeedPhishingSample.py b/examples/python/StreamThreatFeedPhishingSample.py new file mode 100644 index 0000000..66b5c96 --- /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... + new_key = api.stream_threat_feed_phishing_sample() # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamThreatFeedSpam.py b/examples/python/StreamThreatFeedSpam.py new file mode 100644 index 0000000..49539c4 --- /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... + new_key = api.stream_threat_feed_spam(date(2026, 10, 1)) # use this key from now on + print("New API key:", new_key) diff --git a/examples/python/StreamThreatFeedSpamSample.py b/examples/python/StreamThreatFeedSpamSample.py new file mode 100644 index 0000000..a0b0d11 --- /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... + new_key = api.stream_threat_feed_spam_sample() # use this key from now on + print("New API key:", new_key) diff --git a/examples/ruby/README.md b/examples/ruby/README.md index 7e2dbd9..d146e16 100644 --- a/examples/ruby/README.md +++ b/examples/ruby/README.md @@ -111,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/README.md b/examples/swift/README.md index 40c4292..dec8860 100644 --- a/examples/swift/README.md +++ b/examples/swift/README.md @@ -111,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/README.md b/examples/typescript/README.md index 73e7b86..f718790 100644 --- a/examples/typescript/README.md +++ b/examples/typescript/README.md @@ -111,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..6f088d5 --- /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 newKey = await api.streamDomainerCctld({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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..1e4c46d --- /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 newKey = await api.streamDomainerCctldCleaned({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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..e50e05e --- /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 newKey = await api.streamDomainerCctldCleanedEmail({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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..64ea2a9 --- /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 newKey = await api.streamDomainerCctldCleanedPhone({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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..8a14ea3 --- /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 newKey = await api.streamDomainerCctldCleanedSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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..60b552d --- /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 newKey = await api.streamDomainerCctldSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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..b80a30e --- /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 newKey = await api.streamDomainerDropped({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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..d6bc48b --- /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 newKey = await api.streamDomainerDroppedBacklinks({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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..efe64cc --- /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 newKey = await api.streamDomainerDroppedBacklinksSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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..a17477e --- /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 newKey = await api.streamDomainerDroppedSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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..8a49549 --- /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 newKey = await api.streamDomainerExpired({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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..ee7ba8d --- /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 newKey = await api.streamDomainerExpiredCleaned({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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..12c25d4 --- /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 newKey = await api.streamDomainerExpiredCleanedEmail({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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..b415a59 --- /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 newKey = await api.streamDomainerExpiredCleanedPhone({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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..f64158b --- /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 newKey = await api.streamDomainerExpiredCleanedSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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..7ec0232 --- /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 newKey = await api.streamDomainerExpiredSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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..6c6c846 --- /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 newKey = await api.streamDomainerGtld({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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..1d5d480 --- /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 newKey = await api.streamDomainerGtldCleaned({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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..134548f --- /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 newKey = await api.streamDomainerGtldCleanedEmail({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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..032d3bd --- /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 newKey = await api.streamDomainerGtldCleanedPhone({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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..756a8fc --- /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 newKey = await api.streamDomainerGtldCleanedSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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..5c0a8b2 --- /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 newKey = await api.streamDomainerGtldSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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..258bc7d --- /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 newKey = await api.streamThreatFeedMalware({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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..14ed8ac --- /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 newKey = await api.streamThreatFeedMalwareSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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..82df99f --- /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 newKey = await api.streamThreatFeedPhishing({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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..32ee1c0 --- /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 newKey = await api.streamThreatFeedPhishingSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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..0025872 --- /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 newKey = await api.streamThreatFeedSpam({ date: new Date("2026-10-01") }); // use this key from now on + console.log("New API key:", newKey); +} + +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..3576f34 --- /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 newKey = await api.streamThreatFeedSpamSample(); // use this key from now on + console.log("New API key:", newKey); +} + +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/spec/whoisfreaks-openapi.yaml b/spec/whoisfreaks-openapi.yaml index c4fa55e..a354c2b 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: @@ -1840,6 +1842,616 @@ paths: 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" + /v3.3/stream/domainer/dropped/backlinks: + servers: *id001 + get: + tags: + - 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: Plain CSV text, streamed as the file is read + content: + text/plain: + schema: + type: string + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.3/stream/domainer/sample/gtld: + servers: *id001 + get: + tags: + - 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: + - $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/sample/gtld/cleaned: + servers: *id001 + get: + tags: + - 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: + - $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/sample/cctld: + servers: *id001 + get: + tags: + - 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: + - $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/sample/cctld/cleaned: + servers: *id001 + get: + tags: + - 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: Plain CSV text, streamed as the file is read + content: + text/plain: + schema: + type: string + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.3/stream/domainer/sample/expired: + servers: *id001 + get: + tags: + - 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: + - $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/sample/expired/cleaned: + servers: *id001 + get: + tags: + - 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: Plain CSV text, streamed as the file is read + content: + text/plain: + schema: + type: string + 4XX: + $ref: "#/components/responses/ErrorResponse" + /v3.3/stream/domainer/sample/dropped: + servers: *id001 + get: + tags: + - 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: + - $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/sample/dropped/backlinks: + servers: *id001 + get: + tags: + - 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: Plain CSV text, streamed as the file is read + content: + text/plain: + schema: + type: string + 4XX: + $ref: "#/components/responses/ErrorResponse" /v3.4/status: servers: *id001 get: @@ -1882,6 +2494,41 @@ 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 From 96c7d9db17a4473817eb0f0ed9ee19263de0adf3 Mon Sep 17 00:00:00 2001 From: qasimleoo Date: Mon, 16 Nov 2026 19:51:42 +0500 Subject: [PATCH 3/4] docs: group the streaming endpoints and stop calling a CSV stream an API key The generator put the new tag in the "Other" section because the Databases section lists its tags by name, and it printed "New API key:" for every streaming example because three of the ten language modules treated any text/plain response as the key rotation endpoint. The other seven already keyed off the operation id, so they were right; those three now do the same and print the CSV instead. --- README.md | 4 +- docs/endpoints/README.md | 59 ++--- docs/endpoints/databases-streaming.md | 226 +++++++++--------- docs/endpoints/databases.md | 37 ++- docs/languages/javascript.md | 112 ++++----- docs/languages/python.md | 112 ++++----- docs/languages/typescript.md | 112 ++++----- examples/javascript/StreamDomainerCctld.js | 4 +- .../javascript/StreamDomainerCctldCleaned.js | 4 +- .../StreamDomainerCctldCleanedEmail.js | 4 +- .../StreamDomainerCctldCleanedPhone.js | 4 +- .../StreamDomainerCctldCleanedSample.js | 4 +- .../javascript/StreamDomainerCctldSample.js | 4 +- examples/javascript/StreamDomainerDropped.js | 4 +- .../StreamDomainerDroppedBacklinks.js | 4 +- .../StreamDomainerDroppedBacklinksSample.js | 4 +- .../javascript/StreamDomainerDroppedSample.js | 4 +- examples/javascript/StreamDomainerExpired.js | 4 +- .../StreamDomainerExpiredCleaned.js | 4 +- .../StreamDomainerExpiredCleanedEmail.js | 4 +- .../StreamDomainerExpiredCleanedPhone.js | 4 +- .../StreamDomainerExpiredCleanedSample.js | 4 +- .../javascript/StreamDomainerExpiredSample.js | 4 +- examples/javascript/StreamDomainerGtld.js | 4 +- .../javascript/StreamDomainerGtldCleaned.js | 4 +- .../StreamDomainerGtldCleanedEmail.js | 4 +- .../StreamDomainerGtldCleanedPhone.js | 4 +- .../StreamDomainerGtldCleanedSample.js | 4 +- .../javascript/StreamDomainerGtldSample.js | 4 +- .../javascript/StreamThreatFeedMalware.js | 4 +- .../StreamThreatFeedMalwareSample.js | 4 +- .../javascript/StreamThreatFeedPhishing.js | 4 +- .../StreamThreatFeedPhishingSample.js | 4 +- examples/javascript/StreamThreatFeedSpam.js | 4 +- .../javascript/StreamThreatFeedSpamSample.js | 4 +- examples/python/StreamDomainerCctld.py | 4 +- examples/python/StreamDomainerCctldCleaned.py | 4 +- .../python/StreamDomainerCctldCleanedEmail.py | 4 +- .../python/StreamDomainerCctldCleanedPhone.py | 4 +- .../StreamDomainerCctldCleanedSample.py | 4 +- examples/python/StreamDomainerCctldSample.py | 4 +- examples/python/StreamDomainerDropped.py | 4 +- .../python/StreamDomainerDroppedBacklinks.py | 4 +- .../StreamDomainerDroppedBacklinksSample.py | 4 +- .../python/StreamDomainerDroppedSample.py | 4 +- examples/python/StreamDomainerExpired.py | 4 +- .../python/StreamDomainerExpiredCleaned.py | 4 +- .../StreamDomainerExpiredCleanedEmail.py | 4 +- .../StreamDomainerExpiredCleanedPhone.py | 4 +- .../StreamDomainerExpiredCleanedSample.py | 4 +- .../python/StreamDomainerExpiredSample.py | 4 +- examples/python/StreamDomainerGtld.py | 4 +- examples/python/StreamDomainerGtldCleaned.py | 4 +- .../python/StreamDomainerGtldCleanedEmail.py | 4 +- .../python/StreamDomainerGtldCleanedPhone.py | 4 +- .../python/StreamDomainerGtldCleanedSample.py | 4 +- examples/python/StreamDomainerGtldSample.py | 4 +- examples/python/StreamThreatFeedMalware.py | 4 +- .../python/StreamThreatFeedMalwareSample.py | 4 +- examples/python/StreamThreatFeedPhishing.py | 4 +- .../python/StreamThreatFeedPhishingSample.py | 4 +- examples/python/StreamThreatFeedSpam.py | 4 +- examples/python/StreamThreatFeedSpamSample.py | 4 +- examples/typescript/StreamDomainerCctld.ts | 4 +- .../typescript/StreamDomainerCctldCleaned.ts | 4 +- .../StreamDomainerCctldCleanedEmail.ts | 4 +- .../StreamDomainerCctldCleanedPhone.ts | 4 +- .../StreamDomainerCctldCleanedSample.ts | 4 +- .../typescript/StreamDomainerCctldSample.ts | 4 +- examples/typescript/StreamDomainerDropped.ts | 4 +- .../StreamDomainerDroppedBacklinks.ts | 4 +- .../StreamDomainerDroppedBacklinksSample.ts | 4 +- .../typescript/StreamDomainerDroppedSample.ts | 4 +- examples/typescript/StreamDomainerExpired.ts | 4 +- .../StreamDomainerExpiredCleaned.ts | 4 +- .../StreamDomainerExpiredCleanedEmail.ts | 4 +- .../StreamDomainerExpiredCleanedPhone.ts | 4 +- .../StreamDomainerExpiredCleanedSample.ts | 4 +- .../typescript/StreamDomainerExpiredSample.ts | 4 +- examples/typescript/StreamDomainerGtld.ts | 4 +- .../typescript/StreamDomainerGtldCleaned.ts | 4 +- .../StreamDomainerGtldCleanedEmail.ts | 4 +- .../StreamDomainerGtldCleanedPhone.ts | 4 +- .../StreamDomainerGtldCleanedSample.ts | 4 +- .../typescript/StreamDomainerGtldSample.ts | 4 +- .../typescript/StreamThreatFeedMalware.ts | 4 +- .../StreamThreatFeedMalwareSample.ts | 4 +- .../typescript/StreamThreatFeedPhishing.ts | 4 +- .../StreamThreatFeedPhishingSample.ts | 4 +- examples/typescript/StreamThreatFeedSpam.ts | 4 +- .../typescript/StreamThreatFeedSpamSample.ts | 4 +- scripts/docs_lang/javascript.py | 7 +- scripts/docs_lang/python.py | 7 +- scripts/docs_lang/typescript.py | 7 +- scripts/gen_docs.py | 2 +- 95 files changed, 533 insertions(+), 488 deletions(-) diff --git a/README.md b/README.md index ce71356..4431d25 100644 --- a/README.md +++ b/README.md @@ -62,11 +62,11 @@ Real-time and on-demand lookup APIs. Query a single domain, IP, or ASN and get s [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 cf66056..fb09b23 100644 --- a/docs/endpoints/README.md +++ b/docs/endpoints/README.md @@ -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 @@ -115,31 +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` | -| Other | Databases - Streaming | GET | `/v3.4/stream/threat-feed/phishing` | `streamThreatFeedPhishing` | -| Other | Databases - Streaming | GET | `/v3.4/stream/threat-feed/phishing/sample` | `streamThreatFeedPhishingSample` | -| Other | Databases - Streaming | GET | `/v3.4/stream/threat-feed/malware` | `streamThreatFeedMalware` | -| Other | Databases - Streaming | GET | `/v3.4/stream/threat-feed/malware/sample` | `streamThreatFeedMalwareSample` | -| Other | Databases - Streaming | GET | `/v3.4/stream/threat-feed/spam` | `streamThreatFeedSpam` | -| Other | Databases - Streaming | GET | `/v3.4/stream/threat-feed/spam/sample` | `streamThreatFeedSpamSample` | -| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/gtld` | `streamDomainerGtld` | -| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/gtld/cleaned` | `streamDomainerGtldCleaned` | -| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/gtld/cleaned/email` | `streamDomainerGtldCleanedEmail` | -| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/gtld/cleaned/phone` | `streamDomainerGtldCleanedPhone` | -| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/cctld` | `streamDomainerCctld` | -| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/cctld/cleaned` | `streamDomainerCctldCleaned` | -| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/cctld/cleaned/email` | `streamDomainerCctldCleanedEmail` | -| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/cctld/cleaned/phone` | `streamDomainerCctldCleanedPhone` | -| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/expired` | `streamDomainerExpired` | -| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/expired/cleaned` | `streamDomainerExpiredCleaned` | -| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/expired/cleaned/email` | `streamDomainerExpiredCleanedEmail` | -| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/expired/cleaned/phone` | `streamDomainerExpiredCleanedPhone` | -| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/dropped` | `streamDomainerDropped` | -| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/dropped/backlinks` | `streamDomainerDroppedBacklinks` | -| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/sample/gtld` | `streamDomainerGtldSample` | -| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/sample/gtld/cleaned` | `streamDomainerGtldCleanedSample` | -| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/sample/cctld` | `streamDomainerCctldSample` | -| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/sample/cctld/cleaned` | `streamDomainerCctldCleanedSample` | -| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/sample/expired` | `streamDomainerExpiredSample` | -| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/sample/expired/cleaned` | `streamDomainerExpiredCleanedSample` | -| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/sample/dropped` | `streamDomainerDroppedSample` | -| Other | Databases - Streaming | GET | `/v3.3/stream/domainer/sample/dropped/backlinks` | `streamDomainerDroppedBacklinksSample` | +| 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/databases-streaming.md b/docs/endpoints/databases-streaming.md index 84aada5..a352868 100644 --- a/docs/endpoints/databases-streaming.md +++ b/docs/endpoints/databases-streaming.md @@ -1,6 +1,6 @@ # Databases - Streaming -*Section: Other* +*Section: Databases* Stream database files and threat feeds as plain CSV text instead of downloading a gzip file @@ -45,8 +45,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_threat_feed_phishing(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_threat_feed_phishing(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) ``` @@ -67,8 +67,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamThreatFeedPhishing({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedPhishing({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -164,8 +164,8 @@ with whoisfreaks.ApiClient(config) as 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... - new_key = api.stream_threat_feed_phishing_sample() # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_threat_feed_phishing_sample() # plain CSV text, already decompressed + print(csv_text) ``` @@ -184,8 +184,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamThreatFeedPhishingSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedPhishingSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -279,8 +279,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_threat_feed_malware(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_threat_feed_malware(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) ``` @@ -301,8 +301,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamThreatFeedMalware({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedMalware({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -398,8 +398,8 @@ with whoisfreaks.ApiClient(config) as 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... - new_key = api.stream_threat_feed_malware_sample() # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_threat_feed_malware_sample() # plain CSV text, already decompressed + print(csv_text) ``` @@ -418,8 +418,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamThreatFeedMalwareSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedMalwareSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -513,8 +513,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_threat_feed_spam(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_threat_feed_spam(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) ``` @@ -535,8 +535,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamThreatFeedSpam({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedSpam({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -632,8 +632,8 @@ with whoisfreaks.ApiClient(config) as 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... - new_key = api.stream_threat_feed_spam_sample() # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_threat_feed_spam_sample() # plain CSV text, already decompressed + print(csv_text) ``` @@ -652,8 +652,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamThreatFeedSpamSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedSpamSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -749,8 +749,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_gtld(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_gtld(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) ``` @@ -772,8 +772,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerGtld({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtld({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -874,8 +874,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_gtld_cleaned(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_gtld_cleaned(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) ``` @@ -897,8 +897,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerGtldCleaned({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtldCleaned({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -999,8 +999,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_gtld_cleaned_email(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_gtld_cleaned_email(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) ``` @@ -1022,8 +1022,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerGtldCleanedEmail({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtldCleanedEmail({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -1124,8 +1124,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_gtld_cleaned_phone(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_gtld_cleaned_phone(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) ``` @@ -1147,8 +1147,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerGtldCleanedPhone({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtldCleanedPhone({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -1249,8 +1249,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_cctld(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_cctld(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) ``` @@ -1272,8 +1272,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerCctld({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctld({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -1374,8 +1374,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_cctld_cleaned(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_cctld_cleaned(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) ``` @@ -1397,8 +1397,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerCctldCleaned({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctldCleaned({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -1499,8 +1499,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_cctld_cleaned_email(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_cctld_cleaned_email(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) ``` @@ -1522,8 +1522,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerCctldCleanedEmail({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctldCleanedEmail({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -1624,8 +1624,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_cctld_cleaned_phone(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_cctld_cleaned_phone(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) ``` @@ -1647,8 +1647,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerCctldCleanedPhone({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctldCleanedPhone({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -1749,8 +1749,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_expired(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_expired(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) ``` @@ -1772,8 +1772,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerExpired({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpired({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -1874,8 +1874,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_expired_cleaned(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_expired_cleaned(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) ``` @@ -1897,8 +1897,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerExpiredCleaned({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpiredCleaned({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -1999,8 +1999,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_expired_cleaned_email(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_expired_cleaned_email(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) ``` @@ -2022,8 +2022,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerExpiredCleanedEmail({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpiredCleanedEmail({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -2124,8 +2124,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_expired_cleaned_phone(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_expired_cleaned_phone(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) ``` @@ -2147,8 +2147,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerExpiredCleanedPhone({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpiredCleanedPhone({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -2249,8 +2249,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_dropped(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_dropped(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) ``` @@ -2272,8 +2272,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerDropped({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerDropped({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -2374,8 +2374,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_dropped_backlinks(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_dropped_backlinks(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) ``` @@ -2397,8 +2397,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerDroppedBacklinks({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerDroppedBacklinks({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -2497,8 +2497,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_gtld_sample() # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_gtld_sample() # plain CSV text, already decompressed + print(csv_text) ``` @@ -2518,8 +2518,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerGtldSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtldSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -2614,8 +2614,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_gtld_cleaned_sample() # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_gtld_cleaned_sample() # plain CSV text, already decompressed + print(csv_text) ``` @@ -2635,8 +2635,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerGtldCleanedSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtldCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -2731,8 +2731,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_cctld_sample() # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_cctld_sample() # plain CSV text, already decompressed + print(csv_text) ``` @@ -2752,8 +2752,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerCctldSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctldSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -2848,8 +2848,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_cctld_cleaned_sample() # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_cctld_cleaned_sample() # plain CSV text, already decompressed + print(csv_text) ``` @@ -2869,8 +2869,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerCctldCleanedSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctldCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -2965,8 +2965,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_expired_sample() # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_expired_sample() # plain CSV text, already decompressed + print(csv_text) ``` @@ -2986,8 +2986,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerExpiredSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpiredSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -3082,8 +3082,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_expired_cleaned_sample() # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_expired_cleaned_sample() # plain CSV text, already decompressed + print(csv_text) ``` @@ -3103,8 +3103,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerExpiredCleanedSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpiredCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -3199,8 +3199,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_dropped_sample() # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_dropped_sample() # plain CSV text, already decompressed + print(csv_text) ``` @@ -3220,8 +3220,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerDroppedSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerDroppedSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -3316,8 +3316,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_dropped_backlinks_sample() # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_dropped_backlinks_sample() # plain CSV text, already decompressed + print(csv_text) ``` @@ -3337,8 +3337,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerDroppedBacklinksSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerDroppedBacklinksSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { 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/languages/javascript.md b/docs/languages/javascript.md index d035717..6b49853 100644 --- a/docs/languages/javascript.md +++ b/docs/languages/javascript.md @@ -2193,8 +2193,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamThreatFeedPhishing("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedPhishing("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2220,8 +2220,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamThreatFeedPhishingSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedPhishingSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2250,8 +2250,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamThreatFeedMalware("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedMalware("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2277,8 +2277,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamThreatFeedMalwareSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedMalwareSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2307,8 +2307,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamThreatFeedSpam("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedSpam("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2334,8 +2334,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamThreatFeedSpamSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedSpamSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2365,8 +2365,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerGtld("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtld("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2396,8 +2396,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerGtldCleaned("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtldCleaned("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2427,8 +2427,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerGtldCleanedEmail("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtldCleanedEmail("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2458,8 +2458,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerGtldCleanedPhone("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtldCleanedPhone("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2489,8 +2489,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerCctld("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctld("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2520,8 +2520,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerCctldCleaned("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctldCleaned("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2551,8 +2551,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerCctldCleanedEmail("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctldCleanedEmail("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2582,8 +2582,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerCctldCleanedPhone("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctldCleanedPhone("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2613,8 +2613,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerExpired("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpired("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2644,8 +2644,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerExpiredCleaned("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpiredCleaned("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2675,8 +2675,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerExpiredCleanedEmail("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpiredCleanedEmail("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2706,8 +2706,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerExpiredCleanedPhone("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpiredCleanedPhone("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2737,8 +2737,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerDropped("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerDropped("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2768,8 +2768,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerDroppedBacklinks("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerDroppedBacklinks("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2796,8 +2796,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerGtldSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtldSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2824,8 +2824,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerGtldCleanedSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtldCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2852,8 +2852,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerCctldSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctldSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2880,8 +2880,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerCctldCleanedSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctldCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2908,8 +2908,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerExpiredSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpiredSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2936,8 +2936,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerExpiredCleanedSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpiredCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2964,8 +2964,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerDroppedSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerDroppedSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { @@ -2992,8 +2992,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerDroppedBacklinksSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerDroppedBacklinksSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/docs/languages/python.md b/docs/languages/python.md index 6613502..ef9cb35 100644 --- a/docs/languages/python.md +++ b/docs/languages/python.md @@ -2091,8 +2091,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_threat_feed_phishing(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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) @@ -2117,8 +2117,8 @@ with whoisfreaks.ApiClient(config) as 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... - new_key = api.stream_threat_feed_phishing_sample() # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_threat_feed_phishing_sample() # plain CSV text, already decompressed + print(csv_text) ``` #### Stream the daily malware threat feed (CSV) @@ -2146,8 +2146,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_threat_feed_malware(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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) @@ -2172,8 +2172,8 @@ with whoisfreaks.ApiClient(config) as 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... - new_key = api.stream_threat_feed_malware_sample() # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_threat_feed_malware_sample() # plain CSV text, already decompressed + print(csv_text) ``` #### Stream the daily spam threat feed (CSV) @@ -2201,8 +2201,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_threat_feed_spam(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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) @@ -2227,8 +2227,8 @@ with whoisfreaks.ApiClient(config) as 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... - new_key = api.stream_threat_feed_spam_sample() # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_threat_feed_spam_sample() # plain CSV text, already decompressed + print(csv_text) ``` #### Stream newly registered gTLD domains (CSV) @@ -2257,8 +2257,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_gtld(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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) @@ -2287,8 +2287,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_gtld_cleaned(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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) @@ -2317,8 +2317,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_gtld_cleaned_email(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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) @@ -2347,8 +2347,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_gtld_cleaned_phone(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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) @@ -2377,8 +2377,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_cctld(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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) @@ -2407,8 +2407,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_cctld_cleaned(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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) @@ -2437,8 +2437,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_cctld_cleaned_email(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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) @@ -2467,8 +2467,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_cctld_cleaned_phone(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_cctld_cleaned_phone(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) ``` #### Stream expiring domains (CSV) @@ -2497,8 +2497,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_expired(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_expired(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) ``` #### Stream cleaned expiring domains (CSV) @@ -2527,8 +2527,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_expired_cleaned(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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) @@ -2557,8 +2557,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_expired_cleaned_email(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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) @@ -2587,8 +2587,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_expired_cleaned_phone(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_expired_cleaned_phone(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) ``` #### Stream dropped domains (CSV) @@ -2617,8 +2617,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_dropped(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_dropped(date(2026, 10, 1)) # plain CSV text, already decompressed + print(csv_text) ``` #### Stream dropped domains with backlinks (CSV) @@ -2647,8 +2647,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_dropped_backlinks(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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) @@ -2674,8 +2674,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_gtld_sample() # use this key from now on - print("New API key:", new_key) + 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) @@ -2701,8 +2701,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_gtld_cleaned_sample() # use this key from now on - print("New API key:", new_key) + 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) @@ -2728,8 +2728,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_cctld_sample() # use this key from now on - print("New API key:", new_key) + 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) @@ -2755,8 +2755,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_cctld_cleaned_sample() # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_cctld_cleaned_sample() # plain CSV text, already decompressed + print(csv_text) ``` #### Stream a sample of expiring domains (CSV) @@ -2782,8 +2782,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_expired_sample() # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_expired_sample() # plain CSV text, already decompressed + print(csv_text) ``` #### Stream a sample of cleaned expiring domains (CSV) @@ -2809,8 +2809,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_expired_cleaned_sample() # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_expired_cleaned_sample() # plain CSV text, already decompressed + print(csv_text) ``` #### Stream a sample of dropped domains (CSV) @@ -2836,8 +2836,8 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_dropped_sample() # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_dropped_sample() # plain CSV text, already decompressed + print(csv_text) ``` #### Stream a sample of dropped domains with backlinks (CSV) @@ -2863,6 +2863,6 @@ with whoisfreaks.ApiClient(config) as client: # 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... - new_key = api.stream_domainer_dropped_backlinks_sample() # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_domainer_dropped_backlinks_sample() # plain CSV text, already decompressed + print(csv_text) ``` diff --git a/docs/languages/typescript.md b/docs/languages/typescript.md index 1cc264e..617cb66 100644 --- a/docs/languages/typescript.md +++ b/docs/languages/typescript.md @@ -2405,8 +2405,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamThreatFeedPhishing({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedPhishing({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -2436,8 +2436,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamThreatFeedPhishingSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedPhishingSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -2469,8 +2469,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamThreatFeedMalware({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedMalware({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -2500,8 +2500,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamThreatFeedMalwareSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedMalwareSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -2533,8 +2533,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamThreatFeedSpam({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedSpam({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -2564,8 +2564,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamThreatFeedSpamSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedSpamSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -2598,8 +2598,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerGtld({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtld({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -2632,8 +2632,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerGtldCleaned({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtldCleaned({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -2666,8 +2666,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerGtldCleanedEmail({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtldCleanedEmail({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -2700,8 +2700,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerGtldCleanedPhone({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtldCleanedPhone({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -2734,8 +2734,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerCctld({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctld({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -2768,8 +2768,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerCctldCleaned({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctldCleaned({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -2802,8 +2802,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerCctldCleanedEmail({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctldCleanedEmail({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -2836,8 +2836,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerCctldCleanedPhone({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctldCleanedPhone({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -2870,8 +2870,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerExpired({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpired({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -2904,8 +2904,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerExpiredCleaned({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpiredCleaned({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -2938,8 +2938,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerExpiredCleanedEmail({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpiredCleanedEmail({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -2972,8 +2972,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerExpiredCleanedPhone({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpiredCleanedPhone({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -3006,8 +3006,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerDropped({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerDropped({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -3040,8 +3040,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerDroppedBacklinks({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerDroppedBacklinks({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -3072,8 +3072,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerGtldSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtldSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -3104,8 +3104,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerGtldCleanedSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtldCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -3136,8 +3136,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerCctldSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctldSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -3168,8 +3168,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerCctldCleanedSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctldCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -3200,8 +3200,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerExpiredSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpiredSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -3232,8 +3232,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerExpiredCleanedSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpiredCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -3264,8 +3264,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerDroppedSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerDroppedSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { @@ -3296,8 +3296,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerDroppedBacklinksSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerDroppedBacklinksSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/javascript/StreamDomainerCctld.js b/examples/javascript/StreamDomainerCctld.js index 274f15c..381a31a 100644 --- a/examples/javascript/StreamDomainerCctld.js +++ b/examples/javascript/StreamDomainerCctld.js @@ -13,8 +13,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerCctld("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctld("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamDomainerCctldCleaned.js b/examples/javascript/StreamDomainerCctldCleaned.js index c0ab6c9..2c3422b 100644 --- a/examples/javascript/StreamDomainerCctldCleaned.js +++ b/examples/javascript/StreamDomainerCctldCleaned.js @@ -13,8 +13,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerCctldCleaned("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctldCleaned("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamDomainerCctldCleanedEmail.js b/examples/javascript/StreamDomainerCctldCleanedEmail.js index 0001dcf..90e21f5 100644 --- a/examples/javascript/StreamDomainerCctldCleanedEmail.js +++ b/examples/javascript/StreamDomainerCctldCleanedEmail.js @@ -13,8 +13,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerCctldCleanedEmail("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctldCleanedEmail("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamDomainerCctldCleanedPhone.js b/examples/javascript/StreamDomainerCctldCleanedPhone.js index 7dcdf17..205568c 100644 --- a/examples/javascript/StreamDomainerCctldCleanedPhone.js +++ b/examples/javascript/StreamDomainerCctldCleanedPhone.js @@ -13,8 +13,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerCctldCleanedPhone("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctldCleanedPhone("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamDomainerCctldCleanedSample.js b/examples/javascript/StreamDomainerCctldCleanedSample.js index 5c40bd0..92f2e3e 100644 --- a/examples/javascript/StreamDomainerCctldCleanedSample.js +++ b/examples/javascript/StreamDomainerCctldCleanedSample.js @@ -10,8 +10,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerCctldCleanedSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctldCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamDomainerCctldSample.js b/examples/javascript/StreamDomainerCctldSample.js index 40e2a75..1c600f7 100644 --- a/examples/javascript/StreamDomainerCctldSample.js +++ b/examples/javascript/StreamDomainerCctldSample.js @@ -10,8 +10,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerCctldSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctldSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamDomainerDropped.js b/examples/javascript/StreamDomainerDropped.js index 166dd8c..e08096c 100644 --- a/examples/javascript/StreamDomainerDropped.js +++ b/examples/javascript/StreamDomainerDropped.js @@ -13,8 +13,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerDropped("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerDropped("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamDomainerDroppedBacklinks.js b/examples/javascript/StreamDomainerDroppedBacklinks.js index c72a671..7b5b628 100644 --- a/examples/javascript/StreamDomainerDroppedBacklinks.js +++ b/examples/javascript/StreamDomainerDroppedBacklinks.js @@ -13,8 +13,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerDroppedBacklinks("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerDroppedBacklinks("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamDomainerDroppedBacklinksSample.js b/examples/javascript/StreamDomainerDroppedBacklinksSample.js index 357afed..a49cca2 100644 --- a/examples/javascript/StreamDomainerDroppedBacklinksSample.js +++ b/examples/javascript/StreamDomainerDroppedBacklinksSample.js @@ -10,8 +10,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerDroppedBacklinksSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerDroppedBacklinksSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamDomainerDroppedSample.js b/examples/javascript/StreamDomainerDroppedSample.js index c0b3561..9493e09 100644 --- a/examples/javascript/StreamDomainerDroppedSample.js +++ b/examples/javascript/StreamDomainerDroppedSample.js @@ -10,8 +10,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerDroppedSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerDroppedSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamDomainerExpired.js b/examples/javascript/StreamDomainerExpired.js index ba90bb2..cf4bd60 100644 --- a/examples/javascript/StreamDomainerExpired.js +++ b/examples/javascript/StreamDomainerExpired.js @@ -13,8 +13,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerExpired("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpired("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamDomainerExpiredCleaned.js b/examples/javascript/StreamDomainerExpiredCleaned.js index fc9b161..2571dbb 100644 --- a/examples/javascript/StreamDomainerExpiredCleaned.js +++ b/examples/javascript/StreamDomainerExpiredCleaned.js @@ -13,8 +13,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerExpiredCleaned("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpiredCleaned("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamDomainerExpiredCleanedEmail.js b/examples/javascript/StreamDomainerExpiredCleanedEmail.js index 1c28ac1..d3dae62 100644 --- a/examples/javascript/StreamDomainerExpiredCleanedEmail.js +++ b/examples/javascript/StreamDomainerExpiredCleanedEmail.js @@ -13,8 +13,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerExpiredCleanedEmail("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpiredCleanedEmail("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamDomainerExpiredCleanedPhone.js b/examples/javascript/StreamDomainerExpiredCleanedPhone.js index 9a5abe5..a201dde 100644 --- a/examples/javascript/StreamDomainerExpiredCleanedPhone.js +++ b/examples/javascript/StreamDomainerExpiredCleanedPhone.js @@ -13,8 +13,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerExpiredCleanedPhone("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpiredCleanedPhone("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamDomainerExpiredCleanedSample.js b/examples/javascript/StreamDomainerExpiredCleanedSample.js index 0bc43fb..2a42f42 100644 --- a/examples/javascript/StreamDomainerExpiredCleanedSample.js +++ b/examples/javascript/StreamDomainerExpiredCleanedSample.js @@ -10,8 +10,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerExpiredCleanedSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpiredCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamDomainerExpiredSample.js b/examples/javascript/StreamDomainerExpiredSample.js index c820a78..9ce5140 100644 --- a/examples/javascript/StreamDomainerExpiredSample.js +++ b/examples/javascript/StreamDomainerExpiredSample.js @@ -10,8 +10,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerExpiredSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpiredSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamDomainerGtld.js b/examples/javascript/StreamDomainerGtld.js index 2ed5e8d..265e6cc 100644 --- a/examples/javascript/StreamDomainerGtld.js +++ b/examples/javascript/StreamDomainerGtld.js @@ -13,8 +13,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerGtld("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtld("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamDomainerGtldCleaned.js b/examples/javascript/StreamDomainerGtldCleaned.js index e5c22f2..ec25501 100644 --- a/examples/javascript/StreamDomainerGtldCleaned.js +++ b/examples/javascript/StreamDomainerGtldCleaned.js @@ -13,8 +13,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerGtldCleaned("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtldCleaned("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamDomainerGtldCleanedEmail.js b/examples/javascript/StreamDomainerGtldCleanedEmail.js index 1fcb053..176417e 100644 --- a/examples/javascript/StreamDomainerGtldCleanedEmail.js +++ b/examples/javascript/StreamDomainerGtldCleanedEmail.js @@ -13,8 +13,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerGtldCleanedEmail("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtldCleanedEmail("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamDomainerGtldCleanedPhone.js b/examples/javascript/StreamDomainerGtldCleanedPhone.js index ec12585..8d3e8e7 100644 --- a/examples/javascript/StreamDomainerGtldCleanedPhone.js +++ b/examples/javascript/StreamDomainerGtldCleanedPhone.js @@ -13,8 +13,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamDomainerGtldCleanedPhone("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtldCleanedPhone("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamDomainerGtldCleanedSample.js b/examples/javascript/StreamDomainerGtldCleanedSample.js index 7f28b52..6b070f6 100644 --- a/examples/javascript/StreamDomainerGtldCleanedSample.js +++ b/examples/javascript/StreamDomainerGtldCleanedSample.js @@ -10,8 +10,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerGtldCleanedSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtldCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamDomainerGtldSample.js b/examples/javascript/StreamDomainerGtldSample.js index ef3483c..30cf555 100644 --- a/examples/javascript/StreamDomainerGtldSample.js +++ b/examples/javascript/StreamDomainerGtldSample.js @@ -10,8 +10,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerGtldSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtldSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamThreatFeedMalware.js b/examples/javascript/StreamThreatFeedMalware.js index fe4d0c9..867baf8 100644 --- a/examples/javascript/StreamThreatFeedMalware.js +++ b/examples/javascript/StreamThreatFeedMalware.js @@ -12,8 +12,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamThreatFeedMalware("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedMalware("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamThreatFeedMalwareSample.js b/examples/javascript/StreamThreatFeedMalwareSample.js index 5b0f1b2..dacce61 100644 --- a/examples/javascript/StreamThreatFeedMalwareSample.js +++ b/examples/javascript/StreamThreatFeedMalwareSample.js @@ -9,8 +9,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamThreatFeedMalwareSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedMalwareSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamThreatFeedPhishing.js b/examples/javascript/StreamThreatFeedPhishing.js index 496fc27..a2758a1 100644 --- a/examples/javascript/StreamThreatFeedPhishing.js +++ b/examples/javascript/StreamThreatFeedPhishing.js @@ -12,8 +12,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamThreatFeedPhishing("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedPhishing("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamThreatFeedPhishingSample.js b/examples/javascript/StreamThreatFeedPhishingSample.js index e0e73c9..50199f5 100644 --- a/examples/javascript/StreamThreatFeedPhishingSample.js +++ b/examples/javascript/StreamThreatFeedPhishingSample.js @@ -9,8 +9,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamThreatFeedPhishingSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedPhishingSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamThreatFeedSpam.js b/examples/javascript/StreamThreatFeedSpam.js index 352feba..0dc1a13 100644 --- a/examples/javascript/StreamThreatFeedSpam.js +++ b/examples/javascript/StreamThreatFeedSpam.js @@ -12,8 +12,8 @@ const api = new DatabasesStreamingApi(client); // 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 newKey = await api.streamThreatFeedSpam("2026-10-01"); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedSpam("2026-10-01"); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/javascript/StreamThreatFeedSpamSample.js b/examples/javascript/StreamThreatFeedSpamSample.js index eaffa62..3502327 100644 --- a/examples/javascript/StreamThreatFeedSpamSample.js +++ b/examples/javascript/StreamThreatFeedSpamSample.js @@ -9,8 +9,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamThreatFeedSpamSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedSpamSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch((err) => { diff --git a/examples/python/StreamDomainerCctld.py b/examples/python/StreamDomainerCctld.py index d38d6db..3eeb664 100644 --- a/examples/python/StreamDomainerCctld.py +++ b/examples/python/StreamDomainerCctld.py @@ -19,5 +19,5 @@ # 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... - new_key = api.stream_domainer_cctld(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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 index 4b12e04..3e38cb3 100644 --- a/examples/python/StreamDomainerCctldCleaned.py +++ b/examples/python/StreamDomainerCctldCleaned.py @@ -19,5 +19,5 @@ # 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... - new_key = api.stream_domainer_cctld_cleaned(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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 index f0ff2bd..07a42ee 100644 --- a/examples/python/StreamDomainerCctldCleanedEmail.py +++ b/examples/python/StreamDomainerCctldCleanedEmail.py @@ -19,5 +19,5 @@ # 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... - new_key = api.stream_domainer_cctld_cleaned_email(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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 index 6c3eaae..6982fdb 100644 --- a/examples/python/StreamDomainerCctldCleanedPhone.py +++ b/examples/python/StreamDomainerCctldCleanedPhone.py @@ -19,5 +19,5 @@ # 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... - new_key = api.stream_domainer_cctld_cleaned_phone(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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 index 198283b..c946877 100644 --- a/examples/python/StreamDomainerCctldCleanedSample.py +++ b/examples/python/StreamDomainerCctldCleanedSample.py @@ -16,5 +16,5 @@ # 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... - new_key = api.stream_domainer_cctld_cleaned_sample() # use this key from now on - print("New API key:", new_key) + 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 index a65aa3c..76ea15c 100644 --- a/examples/python/StreamDomainerCctldSample.py +++ b/examples/python/StreamDomainerCctldSample.py @@ -16,5 +16,5 @@ # 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... - new_key = api.stream_domainer_cctld_sample() # use this key from now on - print("New API key:", new_key) + 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 index acc1f15..1bc1cb0 100644 --- a/examples/python/StreamDomainerDropped.py +++ b/examples/python/StreamDomainerDropped.py @@ -19,5 +19,5 @@ # 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... - new_key = api.stream_domainer_dropped(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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 index e0d6113..71ccc43 100644 --- a/examples/python/StreamDomainerDroppedBacklinks.py +++ b/examples/python/StreamDomainerDroppedBacklinks.py @@ -19,5 +19,5 @@ # 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... - new_key = api.stream_domainer_dropped_backlinks(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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 index 846accf..c323ad6 100644 --- a/examples/python/StreamDomainerDroppedBacklinksSample.py +++ b/examples/python/StreamDomainerDroppedBacklinksSample.py @@ -16,5 +16,5 @@ # 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... - new_key = api.stream_domainer_dropped_backlinks_sample() # use this key from now on - print("New API key:", new_key) + 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 index eaabfa8..c66b923 100644 --- a/examples/python/StreamDomainerDroppedSample.py +++ b/examples/python/StreamDomainerDroppedSample.py @@ -16,5 +16,5 @@ # 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... - new_key = api.stream_domainer_dropped_sample() # use this key from now on - print("New API key:", new_key) + 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 index 80f34f6..bc6d435 100644 --- a/examples/python/StreamDomainerExpired.py +++ b/examples/python/StreamDomainerExpired.py @@ -19,5 +19,5 @@ # 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... - new_key = api.stream_domainer_expired(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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 index 8b3e8f0..e7647a3 100644 --- a/examples/python/StreamDomainerExpiredCleaned.py +++ b/examples/python/StreamDomainerExpiredCleaned.py @@ -19,5 +19,5 @@ # 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... - new_key = api.stream_domainer_expired_cleaned(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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 index 8c52d78..68adebb 100644 --- a/examples/python/StreamDomainerExpiredCleanedEmail.py +++ b/examples/python/StreamDomainerExpiredCleanedEmail.py @@ -19,5 +19,5 @@ # 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... - new_key = api.stream_domainer_expired_cleaned_email(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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 index 20b9228..e2f0c58 100644 --- a/examples/python/StreamDomainerExpiredCleanedPhone.py +++ b/examples/python/StreamDomainerExpiredCleanedPhone.py @@ -19,5 +19,5 @@ # 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... - new_key = api.stream_domainer_expired_cleaned_phone(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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 index ecff7d5..2c53df4 100644 --- a/examples/python/StreamDomainerExpiredCleanedSample.py +++ b/examples/python/StreamDomainerExpiredCleanedSample.py @@ -16,5 +16,5 @@ # 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... - new_key = api.stream_domainer_expired_cleaned_sample() # use this key from now on - print("New API key:", new_key) + 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 index 49f0e18..04a344c 100644 --- a/examples/python/StreamDomainerExpiredSample.py +++ b/examples/python/StreamDomainerExpiredSample.py @@ -16,5 +16,5 @@ # 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... - new_key = api.stream_domainer_expired_sample() # use this key from now on - print("New API key:", new_key) + 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 index 11effc9..78cb423 100644 --- a/examples/python/StreamDomainerGtld.py +++ b/examples/python/StreamDomainerGtld.py @@ -19,5 +19,5 @@ # 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... - new_key = api.stream_domainer_gtld(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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 index 1b43fd3..df66a80 100644 --- a/examples/python/StreamDomainerGtldCleaned.py +++ b/examples/python/StreamDomainerGtldCleaned.py @@ -19,5 +19,5 @@ # 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... - new_key = api.stream_domainer_gtld_cleaned(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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 index 3a23315..8e1b617 100644 --- a/examples/python/StreamDomainerGtldCleanedEmail.py +++ b/examples/python/StreamDomainerGtldCleanedEmail.py @@ -19,5 +19,5 @@ # 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... - new_key = api.stream_domainer_gtld_cleaned_email(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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 index c4113c8..f00ff28 100644 --- a/examples/python/StreamDomainerGtldCleanedPhone.py +++ b/examples/python/StreamDomainerGtldCleanedPhone.py @@ -19,5 +19,5 @@ # 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... - new_key = api.stream_domainer_gtld_cleaned_phone(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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 index 23a8d3e..37644aa 100644 --- a/examples/python/StreamDomainerGtldCleanedSample.py +++ b/examples/python/StreamDomainerGtldCleanedSample.py @@ -16,5 +16,5 @@ # 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... - new_key = api.stream_domainer_gtld_cleaned_sample() # use this key from now on - print("New API key:", new_key) + 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 index 922d8ef..726fd63 100644 --- a/examples/python/StreamDomainerGtldSample.py +++ b/examples/python/StreamDomainerGtldSample.py @@ -16,5 +16,5 @@ # 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... - new_key = api.stream_domainer_gtld_sample() # use this key from now on - print("New API key:", new_key) + 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 index ba7f208..e415ba8 100644 --- a/examples/python/StreamThreatFeedMalware.py +++ b/examples/python/StreamThreatFeedMalware.py @@ -18,5 +18,5 @@ # 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... - new_key = api.stream_threat_feed_malware(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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 index 7a04c03..e8d557c 100644 --- a/examples/python/StreamThreatFeedMalwareSample.py +++ b/examples/python/StreamThreatFeedMalwareSample.py @@ -15,5 +15,5 @@ # 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... - new_key = api.stream_threat_feed_malware_sample() # use this key from now on - print("New API key:", new_key) + 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 index 71cd1aa..b01009d 100644 --- a/examples/python/StreamThreatFeedPhishing.py +++ b/examples/python/StreamThreatFeedPhishing.py @@ -18,5 +18,5 @@ # 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... - new_key = api.stream_threat_feed_phishing(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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 index 66b5c96..42e1b11 100644 --- a/examples/python/StreamThreatFeedPhishingSample.py +++ b/examples/python/StreamThreatFeedPhishingSample.py @@ -15,5 +15,5 @@ # 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... - new_key = api.stream_threat_feed_phishing_sample() # use this key from now on - print("New API key:", new_key) + 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 index 49539c4..7a3bde4 100644 --- a/examples/python/StreamThreatFeedSpam.py +++ b/examples/python/StreamThreatFeedSpam.py @@ -18,5 +18,5 @@ # 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... - new_key = api.stream_threat_feed_spam(date(2026, 10, 1)) # use this key from now on - print("New API key:", new_key) + 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 index a0b0d11..8036fa4 100644 --- a/examples/python/StreamThreatFeedSpamSample.py +++ b/examples/python/StreamThreatFeedSpamSample.py @@ -15,5 +15,5 @@ # 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... - new_key = api.stream_threat_feed_spam_sample() # use this key from now on - print("New API key:", new_key) + csv_text = api.stream_threat_feed_spam_sample() # plain CSV text, already decompressed + print(csv_text) diff --git a/examples/typescript/StreamDomainerCctld.ts b/examples/typescript/StreamDomainerCctld.ts index 6f088d5..9459d00 100644 --- a/examples/typescript/StreamDomainerCctld.ts +++ b/examples/typescript/StreamDomainerCctld.ts @@ -12,8 +12,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerCctld({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctld({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamDomainerCctldCleaned.ts b/examples/typescript/StreamDomainerCctldCleaned.ts index 1e4c46d..504e55b 100644 --- a/examples/typescript/StreamDomainerCctldCleaned.ts +++ b/examples/typescript/StreamDomainerCctldCleaned.ts @@ -12,8 +12,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerCctldCleaned({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctldCleaned({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamDomainerCctldCleanedEmail.ts b/examples/typescript/StreamDomainerCctldCleanedEmail.ts index e50e05e..7b1ecfb 100644 --- a/examples/typescript/StreamDomainerCctldCleanedEmail.ts +++ b/examples/typescript/StreamDomainerCctldCleanedEmail.ts @@ -12,8 +12,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerCctldCleanedEmail({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctldCleanedEmail({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamDomainerCctldCleanedPhone.ts b/examples/typescript/StreamDomainerCctldCleanedPhone.ts index 64ea2a9..6d9ff11 100644 --- a/examples/typescript/StreamDomainerCctldCleanedPhone.ts +++ b/examples/typescript/StreamDomainerCctldCleanedPhone.ts @@ -12,8 +12,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerCctldCleanedPhone({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctldCleanedPhone({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamDomainerCctldCleanedSample.ts b/examples/typescript/StreamDomainerCctldCleanedSample.ts index 8a14ea3..17d6139 100644 --- a/examples/typescript/StreamDomainerCctldCleanedSample.ts +++ b/examples/typescript/StreamDomainerCctldCleanedSample.ts @@ -10,8 +10,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerCctldCleanedSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctldCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamDomainerCctldSample.ts b/examples/typescript/StreamDomainerCctldSample.ts index 60b552d..b6a11a4 100644 --- a/examples/typescript/StreamDomainerCctldSample.ts +++ b/examples/typescript/StreamDomainerCctldSample.ts @@ -10,8 +10,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerCctldSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerCctldSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamDomainerDropped.ts b/examples/typescript/StreamDomainerDropped.ts index b80a30e..e02d814 100644 --- a/examples/typescript/StreamDomainerDropped.ts +++ b/examples/typescript/StreamDomainerDropped.ts @@ -12,8 +12,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerDropped({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerDropped({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamDomainerDroppedBacklinks.ts b/examples/typescript/StreamDomainerDroppedBacklinks.ts index d6bc48b..24bf9ee 100644 --- a/examples/typescript/StreamDomainerDroppedBacklinks.ts +++ b/examples/typescript/StreamDomainerDroppedBacklinks.ts @@ -12,8 +12,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerDroppedBacklinks({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerDroppedBacklinks({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamDomainerDroppedBacklinksSample.ts b/examples/typescript/StreamDomainerDroppedBacklinksSample.ts index efe64cc..4c59f95 100644 --- a/examples/typescript/StreamDomainerDroppedBacklinksSample.ts +++ b/examples/typescript/StreamDomainerDroppedBacklinksSample.ts @@ -10,8 +10,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerDroppedBacklinksSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerDroppedBacklinksSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamDomainerDroppedSample.ts b/examples/typescript/StreamDomainerDroppedSample.ts index a17477e..dd2b029 100644 --- a/examples/typescript/StreamDomainerDroppedSample.ts +++ b/examples/typescript/StreamDomainerDroppedSample.ts @@ -10,8 +10,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerDroppedSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerDroppedSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamDomainerExpired.ts b/examples/typescript/StreamDomainerExpired.ts index 8a49549..8384da9 100644 --- a/examples/typescript/StreamDomainerExpired.ts +++ b/examples/typescript/StreamDomainerExpired.ts @@ -12,8 +12,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerExpired({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpired({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamDomainerExpiredCleaned.ts b/examples/typescript/StreamDomainerExpiredCleaned.ts index ee7ba8d..2d4d1e5 100644 --- a/examples/typescript/StreamDomainerExpiredCleaned.ts +++ b/examples/typescript/StreamDomainerExpiredCleaned.ts @@ -12,8 +12,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerExpiredCleaned({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpiredCleaned({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamDomainerExpiredCleanedEmail.ts b/examples/typescript/StreamDomainerExpiredCleanedEmail.ts index 12c25d4..3912c60 100644 --- a/examples/typescript/StreamDomainerExpiredCleanedEmail.ts +++ b/examples/typescript/StreamDomainerExpiredCleanedEmail.ts @@ -12,8 +12,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerExpiredCleanedEmail({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpiredCleanedEmail({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamDomainerExpiredCleanedPhone.ts b/examples/typescript/StreamDomainerExpiredCleanedPhone.ts index b415a59..5658c92 100644 --- a/examples/typescript/StreamDomainerExpiredCleanedPhone.ts +++ b/examples/typescript/StreamDomainerExpiredCleanedPhone.ts @@ -12,8 +12,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerExpiredCleanedPhone({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpiredCleanedPhone({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamDomainerExpiredCleanedSample.ts b/examples/typescript/StreamDomainerExpiredCleanedSample.ts index f64158b..bece80e 100644 --- a/examples/typescript/StreamDomainerExpiredCleanedSample.ts +++ b/examples/typescript/StreamDomainerExpiredCleanedSample.ts @@ -10,8 +10,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerExpiredCleanedSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpiredCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamDomainerExpiredSample.ts b/examples/typescript/StreamDomainerExpiredSample.ts index 7ec0232..bd1f6d5 100644 --- a/examples/typescript/StreamDomainerExpiredSample.ts +++ b/examples/typescript/StreamDomainerExpiredSample.ts @@ -10,8 +10,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerExpiredSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerExpiredSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamDomainerGtld.ts b/examples/typescript/StreamDomainerGtld.ts index 6c6c846..58f05f8 100644 --- a/examples/typescript/StreamDomainerGtld.ts +++ b/examples/typescript/StreamDomainerGtld.ts @@ -12,8 +12,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerGtld({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtld({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamDomainerGtldCleaned.ts b/examples/typescript/StreamDomainerGtldCleaned.ts index 1d5d480..c2540fc 100644 --- a/examples/typescript/StreamDomainerGtldCleaned.ts +++ b/examples/typescript/StreamDomainerGtldCleaned.ts @@ -12,8 +12,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerGtldCleaned({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtldCleaned({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamDomainerGtldCleanedEmail.ts b/examples/typescript/StreamDomainerGtldCleanedEmail.ts index 134548f..5e3e43f 100644 --- a/examples/typescript/StreamDomainerGtldCleanedEmail.ts +++ b/examples/typescript/StreamDomainerGtldCleanedEmail.ts @@ -12,8 +12,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerGtldCleanedEmail({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtldCleanedEmail({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamDomainerGtldCleanedPhone.ts b/examples/typescript/StreamDomainerGtldCleanedPhone.ts index 032d3bd..ae6bd4f 100644 --- a/examples/typescript/StreamDomainerGtldCleanedPhone.ts +++ b/examples/typescript/StreamDomainerGtldCleanedPhone.ts @@ -12,8 +12,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamDomainerGtldCleanedPhone({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtldCleanedPhone({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamDomainerGtldCleanedSample.ts b/examples/typescript/StreamDomainerGtldCleanedSample.ts index 756a8fc..ffb1898 100644 --- a/examples/typescript/StreamDomainerGtldCleanedSample.ts +++ b/examples/typescript/StreamDomainerGtldCleanedSample.ts @@ -10,8 +10,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerGtldCleanedSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtldCleanedSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamDomainerGtldSample.ts b/examples/typescript/StreamDomainerGtldSample.ts index 5c0a8b2..245eb73 100644 --- a/examples/typescript/StreamDomainerGtldSample.ts +++ b/examples/typescript/StreamDomainerGtldSample.ts @@ -10,8 +10,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamDomainerGtldSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamDomainerGtldSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamThreatFeedMalware.ts b/examples/typescript/StreamThreatFeedMalware.ts index 258bc7d..5fa1fdd 100644 --- a/examples/typescript/StreamThreatFeedMalware.ts +++ b/examples/typescript/StreamThreatFeedMalware.ts @@ -11,8 +11,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamThreatFeedMalware({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedMalware({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamThreatFeedMalwareSample.ts b/examples/typescript/StreamThreatFeedMalwareSample.ts index 14ed8ac..77fad95 100644 --- a/examples/typescript/StreamThreatFeedMalwareSample.ts +++ b/examples/typescript/StreamThreatFeedMalwareSample.ts @@ -9,8 +9,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamThreatFeedMalwareSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedMalwareSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamThreatFeedPhishing.ts b/examples/typescript/StreamThreatFeedPhishing.ts index 82df99f..77a14e6 100644 --- a/examples/typescript/StreamThreatFeedPhishing.ts +++ b/examples/typescript/StreamThreatFeedPhishing.ts @@ -11,8 +11,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamThreatFeedPhishing({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedPhishing({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamThreatFeedPhishingSample.ts b/examples/typescript/StreamThreatFeedPhishingSample.ts index 32ee1c0..a60b100 100644 --- a/examples/typescript/StreamThreatFeedPhishingSample.ts +++ b/examples/typescript/StreamThreatFeedPhishingSample.ts @@ -9,8 +9,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamThreatFeedPhishingSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedPhishingSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamThreatFeedSpam.ts b/examples/typescript/StreamThreatFeedSpam.ts index 0025872..7213063 100644 --- a/examples/typescript/StreamThreatFeedSpam.ts +++ b/examples/typescript/StreamThreatFeedSpam.ts @@ -11,8 +11,8 @@ const api = new DatabasesStreamingApi(config); // 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 newKey = await api.streamThreatFeedSpam({ date: new Date("2026-10-01") }); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedSpam({ date: new Date("2026-10-01") }); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { diff --git a/examples/typescript/StreamThreatFeedSpamSample.ts b/examples/typescript/StreamThreatFeedSpamSample.ts index 3576f34..64d9027 100644 --- a/examples/typescript/StreamThreatFeedSpamSample.ts +++ b/examples/typescript/StreamThreatFeedSpamSample.ts @@ -9,8 +9,8 @@ const api = new DatabasesStreamingApi(); // 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 newKey = await api.streamThreatFeedSpamSample(); // use this key from now on - console.log("New API key:", newKey); + const csvText = await api.streamThreatFeedSpamSample(); // plain CSV text, already decompressed + console.log(csvText); } main().catch(async (err: unknown) => { 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"]), From a5ad84a0a022f977adc603c8623f3e378944f351 Mon Sep 17 00:00:00 2001 From: qasimleoo Date: Mon, 16 Nov 2026 19:58:59 +0500 Subject: [PATCH 4/4] docs: correct what v2.0 IP reputation actually returns Both v2.0 descriptions claimed the response carries asn_name and the IPv4 and IPv6 route counts. It does not: those fields, along with allocation_status and network.company, exist only in v1.0, which nests the ASN block under network. v2.0 moves asn to the top level with seven fields and adds the announced route prefix with the anycast and CDN flags. The schemas were already right, so only the prose was misleading. IpSecurityNetwork was missing is_cdn and cdn_provider_name, which v2.0 returns. --- docs/endpoints/ip-reputation.md | 12 ++++++++++-- spec/whoisfreaks-openapi.yaml | 18 +++++++++++------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/docs/endpoints/ip-reputation.md b/docs/endpoints/ip-reputation.md index 8fa8926..6c7fbd9 100644 --- a/docs/endpoints/ip-reputation.md +++ b/docs/endpoints/ip-reputation.md @@ -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 | | @@ -420,7 +424,7 @@ func main() { `GET https://api.whoisfreaks.com/v2.0/security` -Same lookup as /v1.0/security, on the current data set. The response carries the full ASN block, including asn_name, rir and the IPv4 and IPv6 route counts, and the security block uses the newer field names with the added VPN, relay, residential proxy, bot and corporate gateway signals. 1 credit. +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** @@ -472,6 +476,8 @@ Same lookup as /v1.0/security, on the current data set. The response carries the | `connection_type` | string | | | `route` | string | | | `is_anycast` | boolean | | +| `is_cdn` | boolean | | +| `cdn_provider_name` | string | | @@ -620,7 +626,7 @@ func main() { `POST https://api.whoisfreaks.com/v2.0/security` -Up to 100 IPs, returning the same entry as GET /v2.0/security for each one. Unlike POST /v1.0/security, this returns the full ASN block, including the IPv4 and IPv6 route counts. 1 credit per IP. +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** @@ -678,6 +684,8 @@ Example: `{"ips": ["1.1.1.1", "2.2.2.2", "8.8.8.8"]}` | `connection_type` | string | | | `route` | string | | | `is_anycast` | boolean | | +| `is_cdn` | boolean | | +| `cdn_provider_name` | string | | diff --git a/spec/whoisfreaks-openapi.yaml b/spec/whoisfreaks-openapi.yaml index a354c2b..63a33ee 100644 --- a/spec/whoisfreaks-openapi.yaml +++ b/spec/whoisfreaks-openapi.yaml @@ -765,10 +765,11 @@ paths: - IP Reputation summary: IP Reputation Lookup (v2.0) description: - Same lookup as /v1.0/security, on the current data set. The response carries the full ASN - block, including asn_name, rir and the IPv4 and IPv6 route counts, and the security block - uses the newer field names with the added VPN, relay, residential proxy, bot and - corporate gateway signals. 1 credit. + 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 @@ -791,9 +792,8 @@ paths: - 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. Unlike - POST /v1.0/security, this returns the full ASN block, including the IPv4 and IPv6 route - counts. 1 credit per IP. + 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: @@ -4089,6 +4089,10 @@ components: type: string is_anycast: type: boolean + is_cdn: + type: boolean + cdn_provider_name: + type: string additionalProperties: true IpSecurityAsn: type: object