WhoisFreaks Docs

IP WHOIS

Section: API Solutions

IP address WHOIS

1 endpoint. Requests need your API key unless noted otherwise. See Authentication.

IP WHOIS Lookup

GET https://api.whoisfreaks.com/v1.0/ip-whois

WHOIS for an IP address. 1 credit.

Parameters

Parameter In Required Type Default Description
ip query yes string    
format query no string json (one of: json, xml)

Response (IpWhoisResponse)

Field Type Description
status boolean  
ip_address string  
as_number string  
query_time string  
whois_server string  
whois_raw_response string  
r_whois_raw_response string  
inet_nums array  
organization WhoisOrganization  
irt Irt  
administrative_contacts array  
technical_contacts array  
abuse_contacts array  
routes array  
InetNum object | Field | Type | Description | |-------|------|-------------| | `start_ip` | string | | | `end_ip` | string | | | `cidr` | array | | | `net_name` | string | | | `net_handle` | string | | | `description` | array | | | `countries` | array | | | `geofeed` | string | | | `latitude` | number | | | `longitude` | number | | | `city` | string | | | `languages` | array | | | `status` | string | | | `organization` | string | | | `sponsoring_organization` | string | | | `remarks` | array | | | `assignment_size` | string | | | `notify` | array | | | `mnt_by` | array | | | `mnt_lower` | array | | | `mnt_domains` | array | | | `mnt_routes` | array | | | `mnt_irt` | array | | | `date_created` | string | | | `date_updated` | string | | | `source` | string | | | `parents` | array | | </details>
WhoisOrganization object | Field | Type | Description | |-------|------|-------------| | `handle` | string | | | `name` | string | | | `type` | string | | | `description` | array | | | `address` | array | | | `street` | string | | | `city` | string | | | `district` | string | | | `state` | string | | | `zip_code` | string | | | `country` | array | | | `latitude` | number | | | `longitude` | number | | | `email` | array | | | `abuse_mailbox` | array | | | `phone` | array | | | `fax_no` | array | | | `organizations` | array | | | `admin_contacts` | array | | | `tech_contacts` | array | | | `abuse_contacts` | array | | | `languages` | array | | | `remarks` | array | | | `notify` | array | | | `ref_nfy` | array | | | `mnt_ref` | array | | | `mnt_by` | array | | | `date_created` | string | | | `date_updated` | string | | | `source` | string | | </details>
Irt object | Field | Type | Description | |-------|------|-------------| | `handle` | string | | | `address` | array | | | `street` | string | | | `city` | string | | | `district` | string | | | `state` | string | | | `zip_code` | string | | | `country` | string | | | `email` | array | | | `abuse_mailbox` | array | | | `phone` | array | | | `fax_no` | array | | | `organizations` | array | | | `admin_contacts` | array | | | `tech_contacts` | array | | | `remarks` | array | | | `signature` | array | | | `encryption` | array | | | `auth` | array | | | `notify` | array | | | `irt_nfy` | array | | | `mnt_by` | array | | | `mnt_ref` | array | | </details>
WhoisPerson object | Field | Type | Description | |-------|------|-------------| | `handle` | string | | | `name` | string | | | `address` | array | | | `street` | string | | | `city` | string | | | `district` | string | | | `state` | string | | | `zip_code` | string | | | `country` | string | | | `email` | array | | | `abuse_mailbox` | array | | | `phone` | array | | | `fax_no` | array | | | `organizations` | array | | | `admin_contacts` | array | | | `tech_contacts` | array | | | `remarks` | array | | | `notify` | array | | | `mnt_by` | array | | | `mnt_ref` | array | | | `date_created` | string | | | `date_updated` | string | | | `source` | string | | </details>
Route object | Field | Type | Description | |-------|------|-------------| | `route` | string | | | `description` | array | | | `origin` | string | | | `pingable` | array | | | `ping_hdl` | array | | | `holes` | array | | | `country` | string | | | `organizations` | array | | | `member_of` | array | | | `inject` | array | | | `aggr_mtd` | string | | | `aggr_bndry` | string | | | `export_comps` | string | | | `components` | string | | | `remarks` | array | | | `notify` | array | | | `mnt_lower` | array | | | `mnt_routes` | array | | | `mnt_by` | array | | | `date_created` | string | | | `date_updated` | string | | | `source` | string | | </details> **Usage**
Python ```python """IP WHOIS Lookup: GET https://api.whoisfreaks.com/v1.0/ip-whois Run it with your API key in the environment: WHOISFREAKS_API_KEY=your_api_key python IpWhois.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.IPWHOISApi(client) # ip_whois parameters: # ip (str, required) # format (str, optional, keyword): one of json, xml; default "json" result = api.ip_whois("8.8.8.8") print(json.dumps(result.to_dict(), indent=2)) ```
TypeScript ```typescript // IP WHOIS Lookup: GET https://api.whoisfreaks.com/v1.0/ip-whois // Run: WHOISFREAKS_API_KEY=your_api_key npx tsx IpWhois.ts import { Configuration, IPWHOISApi, 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 IPWHOISApi(config); // ipWhois({ ip, format? }) // ip (string, required) // format ("json" | "xml", optional): default "json" async function main(): Promise { const result = await api.ipWhois({ 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; }); ``` </details>
Go ```go // Runnable example: IP WHOIS Lookup (GET /v1.0/ip-whois) // Run it from the Getting Started module: save it as main.go, then `go run .` // Parameters for ipWhois (GET /v1.0/ip-whois): // - ip (string, required) // - 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.IPWHOISAPI.IpWhois(ctx).Ip("8.8.8.8").Execute() if err != nil { log.Fatal(err) } out, _ := json.MarshalIndent(result, "", " ") fmt.Println(string(out)) } ```
---