Complete WhoisFreaks API — WHOIS, DNS, SSL, Geolocation, Typosquatting, IP Intelligence, Domain Reputation, and bulk database downloads.
All requests require an apiKey query parameter.
- Docs: https://whoisfreaks.com/documentation
- Billing: https://billing.whoisfreaks.com
- Support: support@whoisfreaks.com
This C# SDK is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- SDK version: 0.21.0
- Generator version: 7.11.0
- Build package: org.openapitools.codegen.languages.CSharpClientCodegen For more information, please visit https://whoisfreaks.com
- Json.NET - 13.0.2 or later
- JsonSubTypes - 1.8.0 or later
- System.ComponentModel.Annotations - 5.0.0 or later
The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
Install-Package System.ComponentModel.Annotations
Run the following command to generate the DLL
- [Mac/Linux]
/bin/sh build.sh - [Windows]
build.bat
Then include the DLL (under the bin folder) in the C# project, and use the namespaces:
using WhoisFreaks.Api;
using WhoisFreaks.Client;
using WhoisFreaks.Model;A .nuspec is included with the project. You can follow the Nuget quickstart to create and publish packages.
This .nuspec uses placeholders from the .csproj, so build the .csproj directly:
nuget pack -Build -OutputDirectory out WhoisFreaks.csproj
Then, publish to a local feed or other host and consume the new package via Nuget as usual.
To use the API client with a HTTP proxy, setup a System.Net.WebProxy
Configuration c = new Configuration();
System.Net.WebProxy webProxy = new System.Net.WebProxy("http://myProxyUrl:80/");
webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
c.Proxy = webProxy;Each ApiClass (properly the ApiClient inside it) will create an instance of HttpClient. It will use that for the entire lifecycle and dispose it when called the Dispose method.
To better manager the connections it's a common practice to reuse the HttpClient and HttpClientHandler (see here for details). To use your own HttpClient instance just pass it to the ApiClass constructor.
HttpClientHandler yourHandler = new HttpClientHandler();
HttpClient yourHttpClient = new HttpClient(yourHandler);
var api = new YourApiClass(yourHttpClient, yourHandler);If you want to use an HttpClient and don't have access to the handler, for example in a DI context in Asp.net Core when using IHttpClientFactory.
HttpClient yourHttpClient = new HttpClient();
var api = new YourApiClass(yourHttpClient);You'll loose some configuration settings, the features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. You need to either manually handle those in your setup of the HttpClient or they won't be available.
Here an example of DI setup in a sample web project:
services.AddHttpClient<YourApiClass>(httpClient =>
new PetApi(httpClient));using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using WhoisFreaks.Api;
using WhoisFreaks.Client;
using WhoisFreaks.Model;
namespace Example
{
public class Example
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.whoisfreaks.com";
// Configure API key authorization: ApiKeyAuth
config.ApiKey.Add("apiKey", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.ApiKeyPrefix.Add("apiKey", "Bearer");
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new ASNWHOISApi(httpClient, config, httpClientHandler);
var asn = as15169; // string |
var format = "json"; // string? | (optional) (default to json)
try
{
// ASN WHOIS Lookup
AsnWhoisResponse result = apiInstance.AsnWhois(asn, format);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ASNWHOISApi.AsnWhois: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}All URIs are relative to https://api.whoisfreaks.com
| Class | Method | HTTP request | Description |
|---|---|---|---|
| ASNWHOISApi | AsnWhois | GET /v2.0/asn-whois | ASN WHOIS Lookup |
| AccountApi | AccountUsage | GET /v1.0/whoisapi/usage | Account Usage |
| AccountApi | DatabaseFileStatus | GET /v3.4/status | Database File Status (Public) |
| AccountApi | RotateApiKey | GET /v1.0/api-key/rotate | Rotate API Key |
| DNSApi | DnsBulk | POST /v2.0/dns/bulk/live | Bulk DNS Lookup |
| DNSApi | DnsHistorical | GET /v2.0/dns/historical | Historical DNS Lookup |
| DNSApi | DnsLive | GET /v2.0/dns/live | Live DNS Lookup |
| DNSApi | DnsReverse | GET /v2.1/dns/reverse | Reverse DNS Lookup |
| DatabasesASNWHOISApi | DbAsnWhois | GET /v3.3/download/snapshot/asn/whois | ASN WHOIS Snapshot |
| DatabasesASNWHOISApi | DbAsnWhoisStatus | GET /v3.3/status/snapshot/asn/whois | ASN WHOIS Snapshot Status |
| DatabasesDNSApi | DbDnsDaily | GET /v3.2/download/dbupdate/daily/dns | DNS Database Daily |
| DatabasesDNSApi | DbDnsMonthly | GET /v3.2/download/dbupdate/monthly/dns | DNS Database Monthly |
| DatabasesDNSApi | DbDnsWeekly | GET /v3.2/download/dbupdate/weekly/dns | DNS Database Weekly |
| DatabasesExpiringDroppedApi | DbDropped | GET /v3.1/download/domainer/dropped | Dropped Domains |
| DatabasesExpiringDroppedApi | DbDroppedBacklinks | GET /v3.3/download/domainer/dropped/backlinks | Dropped With Backlinks |
| DatabasesExpiringDroppedApi | DbDroppedJson | GET /v3.1/domains/dropped | Dropped Domains (JSON) |
| DatabasesExpiringDroppedApi | DbExpired | GET /v3.1/download/domainer/expired | Expiring Domains |
| DatabasesExpiringDroppedApi | DbExpiredCleaned | GET /v3.1/download/domainer/expired/cleaned | Expiring Cleaned WHOIS |
| DatabasesIPGeolocationApi | DbIpCity | GET /v3.3/download/snapshot/ip/city | IP to City Snapshot |
| DatabasesIPGeolocationApi | DbIpCityStatus | GET /v3.3/status/snapshot/ip/city | IP to City Snapshot Status |
| DatabasesIPGeolocationApi | DbIpCountry | GET /v3.3/download/snapshot/ip/country | IP to Country Snapshot |
| DatabasesIPGeolocationApi | DbIpCountryStatus | GET /v3.3/status/snapshot/ip/country | IP to Country Snapshot Status |
| DatabasesIPSecurityApi | DbIpSecurity | GET /v3.3/download/snapshot/ip/security | IP Security Snapshot |
| DatabasesIPSecurityApi | DbIpSecurityStatus | GET /v3.3/status/snapshot/ip/security | IP Security Snapshot Status |
| DatabasesIPWHOISApi | DbIpWhois | GET /v3.3/download/snapshot/ip/whois | IP WHOIS Snapshot |
| DatabasesIPWHOISApi | DbIpWhoisStatus | GET /v3.3/status/snapshot/ip/whois | IP WHOIS Snapshot Status |
| DatabasesNewlyRegisteredApi | DbNewlyCctld | GET /v3.1/download/domainer/cctld | Newly Registered ccTLD (CSV) |
| DatabasesNewlyRegisteredApi | DbNewlyCctldCleaned | GET /v3.1/download/domainer/cctld/cleaned | Newly Registered ccTLD Cleaned WHOIS (CSV) |
| DatabasesNewlyRegisteredApi | DbNewlyCctldJson | GET /v3.1/domains/newly/cctld | Newly Registered ccTLD (JSON) |
| DatabasesNewlyRegisteredApi | DbNewlyDns | GET /v3.1/download/domainer/newly/dns | Newly Registered With DNS |
| DatabasesNewlyRegisteredApi | DbNewlyGtld | GET /v3.1/download/domainer/gtld | Newly Registered gTLD (CSV) |
| DatabasesNewlyRegisteredApi | DbNewlyGtldCleaned | GET /v3.1/download/domainer/gtld/cleaned | Newly Registered gTLD Cleaned WHOIS (CSV) |
| DatabasesNewlyRegisteredApi | DbNewlyGtldJson | GET /v3.1/domains/newly/gtld | Newly Registered gTLD (JSON) |
| DatabasesSubdomainsApi | DbSubdomainsDaily | GET /v3.2/download/dbupdate/daily/subdomains | Subdomains Daily |
| DatabasesSubdomainsApi | DbSubdomainsMonthly | GET /v3.2/download/dbupdate/monthly/subdomains | Subdomains Monthly |
| DatabasesSubdomainsApi | DbSubdomainsWeekly | GET /v3.2/download/dbupdate/weekly/subdomains | Subdomains Weekly |
| DatabasesThreatFeedApi | DownloadThreatFeedMalware | GET /v3.4/download/threat-feed/malware | Download the daily malware threat feed (CSV) |
| DatabasesThreatFeedApi | DownloadThreatFeedMalwareSample | GET /v3.4/download/threat-feed/malware/sample | Download a sample of the malware threat feed (CSV) |
| DatabasesThreatFeedApi | DownloadThreatFeedPhishing | GET /v3.4/download/threat-feed/phishing | Download the daily phishing threat feed (CSV) |
| DatabasesThreatFeedApi | DownloadThreatFeedPhishingSample | GET /v3.4/download/threat-feed/phishing/sample | Download a sample of the phishing threat feed (CSV) |
| DatabasesThreatFeedApi | DownloadThreatFeedSpam | GET /v3.4/download/threat-feed/spam | Download the daily spam threat feed (CSV) |
| DatabasesThreatFeedApi | DownloadThreatFeedSpamSample | GET /v3.4/download/threat-feed/spam/sample | Download a sample of the spam threat feed (CSV) |
| DatabasesWHOISApi | DbWhoisDaily | GET /v3.3/download/dbupdate/daily/domains/whois | WHOIS Database Daily |
| DatabasesWHOISApi | DbWhoisMonthly | GET /v3.3/download/dbupdate/monthly/domains/whois | WHOIS Database Monthly |
| DatabasesWHOISApi | DbWhoisWeekly | GET /v3.3/download/dbupdate/weekly/domains/whois | WHOIS Database Weekly |
| DomainAvailabilityApi | BulkDomainAvailabilityV2 | POST /v2.0/domain/availability | Bulk Domain Availability Check |
| DomainAvailabilityApi | DomainAvailabilityV2 | GET /v2.0/domain/availability | Domain Availability Check with Suggestions |
| DomainReputationApi | DomainReputation | GET /v1/domain/security | Domain Reputation Lookup |
| GeolocationApi | BulkGeolocation | POST /v1.0/geolocation | Bulk IP Geolocation |
| GeolocationApi | Geolocation | GET /v1.0/geolocation | IP Geolocation Lookup |
| IPReputationApi | BulkIpReputation | POST /v1.0/security | Bulk IP Reputation |
| IPReputationApi | IpReputation | GET /v1.0/security | IP Reputation Lookup |
| IPWHOISApi | IpWhois | GET /v1.0/ip-whois | IP WHOIS Lookup |
| SSLApi | SslLookup | GET /v1.0/ssl/live | SSL Certificate Lookup |
| SubdomainsApi | Subdomains | GET /v1.0/subdomains | Subdomains Lookup |
| TyposquattingApi | Typosquatting | GET /v3.0/domain/typos | Typosquatting Lookup |
| WHOISApi | BulkWhois | POST /v2.0/bulkwhois/live | Bulk WHOIS Lookup |
| WHOISApi | WhoisHistory | GET /v2.0/whois/history | Historical WHOIS records for a domain |
| WHOISApi | WhoisLive | GET /v2.0/whois/live | Live WHOIS Lookup |
| WHOISApi | WhoisReverse | GET /v2.0/whois/reverse | Reverse WHOIS lookup by keyword |
- Model.AccountUsageResponse
- Model.ApiCredits
- Model.ApiSubscription
- Model.AsnInfo
- Model.AsnPeer
- Model.AsnWhoisResponse
- Model.BulkDnsResponse
- Model.BulkDomainAvailabilityRequest
- Model.BulkDomainAvailabilityResponse
- Model.BulkGeolocationRequest
- Model.BulkWhoisItem
- Model.BulkWhoisRequest
- Model.BulkWhoisResponse
- Model.CountryMetadata
- Model.Currency
- Model.DatabaseFileStatus
- Model.DatabaseUpdates
- Model.DateRangeStatus
- Model.DgaFeatures
- Model.DgaScore
- Model.DnsBulkRequest
- Model.DnsRecord
- Model.DnsResponse
- Model.DomainAvailabilityItem
- Model.DomainAvailabilityResponse
- Model.DomainReputationInput
- Model.DomainReputationResponse
- Model.EligibilityInfo
- Model.ErrorResponse
- Model.EvidenceSummary
- Model.GeoAsn
- Model.GeoCompany
- Model.GeoNetwork
- Model.GeolocationResponse
- Model.HistoricalDnsResponse
- Model.InetNum
- Model.IpLocation
- Model.IpReputationResponse
- Model.IpSecurity
- Model.IpSecurityAsn
- Model.IpSecurityNetwork
- Model.IpWhoisResponse
- Model.Irt
- Model.NewlyStatus
- Model.PersonalInformation
- Model.PivotMatch
- Model.RegistrarInformation
- Model.RegistryData
- Model.RelatedIoc
- Model.ReputationIndicators
- Model.ReputationIntelligence
- Model.ReputationSignal
- Model.ReputationSignals
- Model.ResellerContact
- Model.ReverseDnsResponse
- Model.ReverseWhoisResponse
- Model.RiskCategory
- Model.Route
- Model.SnapshotStatus
- Model.SslAlternateNames
- Model.SslAuthorityInfo
- Model.SslCertificate
- Model.SslCertificatePolicy
- Model.SslExtensionsInfo
- Model.SslPublicKeyInfo
- Model.SslResponse
- Model.SslUnitInfo
- Model.Subdomain
- Model.SubdomainsResponse
- Model.ThreatFeedStatus
- Model.ThreatSource
- Model.TrustSignals
- Model.TyposquattingDomain
- Model.TyposquattingResponse
- Model.UpdateFrequencies
- Model.WhoisHistoricalItem
- Model.WhoisHistoricalResponse
- Model.WhoisOrganization
- Model.WhoisPerson
- Model.WhoisResponse
- Model.WhoisRole
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: apiKey
- Location: URL query string