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 API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 1.0.0
- Package version: 0.21.0
- Generator version: 7.11.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit https://whoisfreaks.com
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/net/contextPut the package under your project folder and add the following in import:
import whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"To use a proxy, set the environment variable HTTP_PROXY:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.
For using other server than the one defined on index 0 set context value whoisfreaks.ContextServerIndex of type int.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextServerIndex, 1)Templated server URL is formatted using default variables from configuration or from context value whoisfreaks.ContextServerVariables of type map[string]string.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextServerVariables, map[string]string{
"basePath": "v2",
})Note, enum values are always validated and all unused variables are silently ignored.
Each operation can use different server URL defined using OperationServers map in the Configuration.
An operation is uniquely identified by "{classname}Service.{nickname}" string.
Similar rules for overriding default operation server index and variables applies by using whoisfreaks.ContextOperationServerIndices and whoisfreaks.ContextOperationServerVariables context maps.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), whoisfreaks.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})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 |
- AccountUsageResponse
- ApiCredits
- ApiSubscription
- AsnInfo
- AsnPeer
- AsnWhoisResponse
- BulkDnsResponse
- BulkDomainAvailabilityRequest
- BulkDomainAvailabilityResponse
- BulkGeolocationRequest
- BulkWhoisItem
- BulkWhoisRequest
- BulkWhoisResponse
- CountryMetadata
- Currency
- DatabaseFileStatus
- DatabaseUpdates
- DateRangeStatus
- DgaFeatures
- DgaScore
- DnsBulkRequest
- DnsRecord
- DnsResponse
- DomainAvailabilityItem
- DomainAvailabilityResponse
- DomainReputationInput
- DomainReputationResponse
- EligibilityInfo
- ErrorResponse
- EvidenceSummary
- GeoAsn
- GeoCompany
- GeoNetwork
- GeolocationResponse
- HistoricalDnsResponse
- InetNum
- IpLocation
- IpReputationResponse
- IpSecurity
- IpSecurityAsn
- IpSecurityNetwork
- IpWhoisResponse
- Irt
- NewlyStatus
- PersonalInformation
- PivotMatch
- RegistrarInformation
- RegistryData
- RelatedIoc
- ReputationIndicators
- ReputationIntelligence
- ReputationSignal
- ReputationSignals
- ResellerContact
- ReverseDnsResponse
- ReverseWhoisResponse
- RiskCategory
- Route
- SnapshotStatus
- SslAlternateNames
- SslAuthorityInfo
- SslCertificate
- SslCertificatePolicy
- SslExtensionsInfo
- SslPublicKeyInfo
- SslResponse
- SslUnitInfo
- Subdomain
- SubdomainsResponse
- ThreatFeedStatus
- ThreatSource
- TrustSignals
- TyposquattingDomain
- TyposquattingResponse
- UpdateFrequencies
- WhoisHistoricalItem
- WhoisHistoricalResponse
- WhoisOrganization
- WhoisPerson
- WhoisResponse
- WhoisRole
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: apiKey
- Location: URL query string
Note, each API key must be added to a map of map[string]APIKey where the key is: ApiKeyAuth and passed in as the auth context for each request.
Example
auth := context.WithValue(
context.Background(),
whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{
"ApiKeyAuth": {Key: "API_KEY_STRING"},
},
)
r, err := client.Service.Operation(auth, args)Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBoolPtrIntPtrInt32PtrInt64PtrFloatPtrFloat32PtrFloat64PtrStringPtrTime