Advanced search in the APNIC Whois

Query Options

To query Whois v3, use the following command syntax:

whois [-flags [argument]] <lookup-key>

Queries using primary and lookup keys

Example:

whois -h whois.apnic.net 202.12.29.0

Example in web lookup tool

Lookup keyObjects returned by query
Address prefix or range or single address
IPv4: Most specific inetnum and route object. If single address, returns inet-rtr with matching ifaddr attribute.
IPv6: Most specific inet6num and route6 object. If single address, returns inet-rtr with matching address attribute
Network nameAll inetnum and inet6num objects with a netname attribute containing the name specified in the query.
PersonAll person and role objects with a person or role attribute containing the name specified in the query argument.
NIC-handleperson or role object with a matching nic-hdl attribute.
Maintainermntner object with a matching primary key.
Reverse domaindomain with a matching primary key.
AS numberaut-num object with a matching aut-num attribute and associated as-block.
AS number – AS numberas-block object whose primary key matches or fully contains the query range.
Set nameas-set, filter-set, peering-set, route-set or rtr-set with a matching primary key.
Domaininet-rtr objects with a matching primary key.

IP address lookups

Example:

whois -h whois.apnic.net -l 202.12.29.0

Example in web lookup tool

FlagObjects returned by query
-LAll less specific inetnum, inet6num, route, or route6 objects, including exact matches.
-mFirst level more specific inetnum, inet6num, route, or route6 objects, excluding exact matches.
-MAll more specific inetnum, inet6num, route, or route6 objects, excluding exact matches.
-lFirst level less specific inetnum, inet6num, route, or route6 objects, excluding exact matches.
-xOnly an exact match on a prefix will be performed. If no exact match is found, no objects are returned.
-dEnables use of the -m, -M, -l and -L flags for lookups on reverse delegation domains.

 

Less specific query options

Use this option to view IP address blocks that match or are larger than the IP address or range you wish to query.

-l First level less specificUse this option when querying:

  • a single IP address
  • a range of IP addresses
  • an IP address prefix

This option returns: the smallest IP address range that includes the IP address or range specified in the query.
Hint: when querying the APNIC Whois Database on an IP address range, -l is the default option.

-L All levels less specificUse this option when querying:

  • a single IP address
  • a range of IP addresses
  • an IP address prefix

This option returns: all IP address ranges that include the IP address or range specified in the query.

Hint:
use this option to view any upstream IP address blocks associated with the query range. Viewing the upstream IP address range can be useful for network troubleshooting.

Please note, that as well as upstream address blocks, the top level ‘parent’ range allocated to APNIC by IANA will also be returned. APNIC makes allocations from this range, but does operate the networks that use these
addresses. The netname of the APNIC IP address block begins with ‘APNIC-AP’ (or similar).

 

More specific query options

Use these options to view IP address blocks that match or are smaller than the IP address or range you wish to query.

-m First level more specificUse this option when querying:

  • a range of IP addresses
  • an IP address prefix

This option returns: first level more specific address ranges within the boundaries of the IP address range specified in the query.

 

Hint: use this option to:

  • view assignments made from a network’s allocation block to customers
  • view allocations or assignments made from an RIR or NIR block to networks
-M All levels more specificUse this option when querying:

  • a range of IP addresses
  • an IP address prefix

This option returns: all more specific address ranges within the boundaries of the IP address range specified in the query.

 

Hint: use this option to:

  • view all allocations and assignments made from a specified address block.
  • check that no unauthorized address blocks have been created under address space allocated or assigned to your network.

Note: do not use this option to view all allocations and assignments in a /8. If you do try to do this, you will be blocked by the server for excessive query load.

 

Exact lookups

Use this option to view IP address blocks that exactly match the IP address range you wish to query.

-x Exact match onlyUse this option when querying:

  • a range of IP addresses
  • an IP address prefix

This option returns: the specific address range specified in the query. If no exact match is found, nothing will be returned.

 

Hint: use this option to:

  • view details of a specific address range you know exists

Note: if you are not sure of the exact address range, do not use this option. Instead, use one of the following options: -l, -L, -m, -M.

 

Associated reverse domains

Use this option to view reverse domains associated with IP address blocks returned by the query on an IP address or range.

-d Return associated reverse domainUse this option when querying:

  • a single IP address
  • a range of IP addresses
  • an IP address prefix

This option returns: an exact match, or the smallest IP address range that includes the IP address or range specified in the query. It also returns the smallest reverse domain that encompasses that IP address range.

 

Hints: use this option to:

  • view the reverse domain associated with an IP address or range.
  • check if reverse domains have been created for all assigned address space.

Use this option in combination with -l, -L, -m or -M to:

  • view reverse domains associated with all IP address ranges returned by the normal -l, -L, -m or -M queries.

Use this option in combination with -T <object-type> to:</object-type>

  • restrict the search results to reverse domains only

Note: all assigned address space should have associated reverse domains created in the APNIC Whois Database. To create reverse domains for address blocks, see Reverse DNS Delegations Manual.

Inverse queries

Example:

whois -h whois.apnic.net -i pn NO4-AP

Example in web lookup tool

Use this option when:

  • searching for objects in the APNIC Whois Database that have an attribute matching the attribute type chosen from the inverse lookup scroll list and the query text given by the user.

This option returns: all objects that have an attribute that matches the query text and attribute type.

Hint: use this option to:

  • view all objects maintained by a particular maintainer
  • view all objects where a particular NIC-handle is referenced
  • Note: use -i person or -i mntner when staff leave a network to identify objects referencing that person that need to be updated.

 

FlagAlternative flagLookup keyObjects returned by query
-i ac-i admin-cNIC-handle or personObjects with a matching admin-c attribute.
-i pn-i personNIC-handle or personObjects with matching admin-c, tech-c, zone-c, or cross-nfy attributes.
-i mb-i mnt-byMaintainerObjects with a matching mnt-by attribute.
-i ml-i mnt-lowerMaintainerObjects with a matching mnt-lower attribute.
-i mn-i mnt-nfye-mailmntner objects with a matching mnt-nfy attribute.
-i ny-i notifye-mailObjects with a matching notify attribute.
-i ns-i nserverDomain or address prefix or range or single addressdomain objects with a matching nserver attribute.
-i rz-i rev-srvDomain or address prefix or range or single addressinetnum and inet6num objects with a matching rev-srv attribute.
-i sd-i sub-domDomaindomain objects with a matching sub-dom attribute.
-i tc-i tech-cNIC-handle or personObjects with a matching tech-c attribute.
-i dt-i upd-toe-mailmntner objects with a matching upd-to attribute.
-i zc-i zone-cNIC-handle or personObjects with a matching zone-c attribute.
-i rb-i referral-byMaintainermntner objects with a matching referral-by attribute.
-i la-i local-asAS numberinet-rtr objects with a matching local-as attribute.
-i mr-i mbrs-by-refMaintainerSet objects (as-set, route-set and rtr-set) with a matching mbrs-by-ref attribute.
-i mo-i member-ofSet nameObjects with a matching member-of attribute, provided that their membership claim is validated by the mbrs-by-ref attribute of the set.
-i mu-i mnt-routesMaintaineraut-num, inetnum and route objects with a matching mnt-routes attribute.
-i or-i originAS numberroute and route6 objects with a matching origin attribute.

Miscellaneous queries

Example:

whois -h whois.apnic.net -T domain -i mb APNIC-HM

Example in web lookup tool

FlagArgumentEffect
-rSwitches off recursion for contact information after retrieving the objects that match the lookup key.
-T(comma separated list of object
types, no white space allowed)
Restricts the types of objects to lookup in the query.
-aSpecifies that the server should perform lookups in all available sources. See also “in-q sources” query.
-s(comma separated list of sources,
no white space allowed)
Specifies which sources and in which order are to be looked up when performing a query.
-FProduces output using shorthand notation for attribute names. Produces slower responses.
-RSwitches off use of the referral mechanism for domain lookups, so that the database returns an object in the local database with the exact match with the lookup argument, rather than doing a referral lookup.
-KOnly the primary keys of an object are returned.

  • The exceptions are set objects, where the members attributes will also be returned.
  • This flag does not apply to person and role objects.

Informational queries

Example:

whois -h whois.apnic.net -q sources

FlagArgumentEffect
-tObject typeTemplate for the specified object type.
-vObject typeVerbose template for the specified object type.
“help”Help on query options available in the database.
-q“sources”Current set of sources along with the information required for mirroring.
-q“version”Current version of the server.