# Tables of Query Types Supported by the RIPE Database

# Table 1: Queries Using Primary and Lookup Keys

Lookup key(s) Objects Returned
IPv4 address prefix, range or single address inetnum, route objects with exact match on the specified key. If the exact match does not exist, the objects with the smallest less specific match are returned. When you specify a single address, an inet-rtr object whose "ifaddr:" attribute matches the query argument is also returned..
IPv6 address prefix or single address inet6num, route6 objects with exact match on a specified key. If the exact match does not exist, the objects with the smallest less specific match are returned. If you specify a single address, an inet-rtr object whose "interface:" attribute matches the query argument is also returned.
Network name inetnum and inet6num objects whose "netname:" attribute matches the query argument.
AS Number aut-num object whose "aut-num:" attribute matches the query argument and an as-block object with the range containing the aut-num object, if it exists.
AS Number – AS Number as-block object whose primary key defines a range that exactly matches or fully contains the range specified in the query argument.
Domain/reverse domain domain and inet-rtr objects whose primary keys match the query argument.
IRT name irt object whose primary key matches the query argument.
Person or role name person and role objects whose "person:" or "role:" attributes contain the name specified in the query argument.
Set name A as-set, filter-set, peering-set, route-set or rtr-set whose primary key matches the query argument.
NIC handle person or role object whose "nic-hdl:" attribute matches the query argument.
Maintainer name mntner object whose primary key matches the query argument.
Organisation name All organisation objects with an "org-name:" containing the name specified in the query.
Organisation ID organisation object whose primary key matches the query argument.
Key-cert key-cert object whose primary key matches the query argument.
Poem poem object whose primary key matches the query argument.
Poetic form poetic-form object whose primary key matches the query argument.
Route/route6 Exact match or less specific route/route6 object and exact match or less specific inetnum/inetnum6 object
Router interface address inet-rtr with an "ifaddr:" containing the IPv4 or IPv6 address specified in the query
Email person, role and organisation objects with a matching "email:"

# Table 2: Queries For IP Networks table

Flag Objects Returned or Effect
-x
--exact
Only inetnum, inet6num, route, route6 or domain objects that exactly match the prefix. If no exact match is found, no objects are returned.
-M
--all-more
All level more specific inetnum, inet6num, route, route6 or domain objects, excluding exact matches.
-m
--one-more
First level more specific inetnum, inet6num, route or route6 objects, excluding exact matches.
-L
--all-less
All level less specific inetnum, inet6num, route, route6 or domain objects, including exact matches.
-l
--one-less
First level less specific inetnum, inet6num, route, route6 or domain objects, excluding exact matches.
-d
--reverse-domain
When used with -x, -M, -m, -L and -l flags, both address and route object types and domain object types are returned.
-c
--irt
The smallest, less specific inetnum or inet6num object found encompassing the range specified in the query argument. Also any irt objects found referenced from the returned inetnum or inet6num, or referenced from the first less specific inetnum or inet6num to the returned object that has such a reference.
-b
--abuse-contact
Provides a brief output of ranges with associated abuse contact information.

# Table 3: Inverse Queries

Flag Argument (Alternative Form) Lookup Key(s) Objects Returned
-i am (abuse-mailbox) Email Objects whose "abuse-mailbox:" attribute matches the query argument.
-i au (abuse-c) NIC handle Objects whose "abuse-c:" attribute matches the query argument.
-i ac (admin-c) NIC handle Objects whose "admin-c:" attributes match the query argument.
-i pc (ping-hdl) NIC handle route(6) objects whose "ping-hdl:" attribute match the query argument.
-i ah (author) NIC handle poem object whose "author:" attribute match the query argument.
-i at (auth) PGP key mntner objects whose "auth:" attribute matches the query argument. Please note that encrypted passwords and SSO usernames cannot be inverse- searched, but only PGPKEY and X509 certicates.
-i fp (fingerpr) Fingerprint key-cert objects whose "fingerpr:" attribute matches the query argument.
-i pn (person) NIC handle Objects whose "admin-c:", "tech-c:", "zone-c:" or "author:" attribute matches the query argument.
-i iy (irt-nfy) Email irt objects whose "irt-nfy:" attribute matches the query argument.
-i la (local-as) AS Number inet-rtr objects whose "local-as:" attribute matches the query argument.
-i mi (mnt-irt) IRT name inetnum and inet6num objects whose "mnt-irt:" attribute matches the query argument.
-i mr (mbrs-by-ref) Maintainer name Set objects (as-set, route-set and rtr-set) whose "mbrs-by-ref:" attribute matches the query argument.
-i mo (member-of) Set name Objects whose "member-of:" attribute matches the query argument and their membership claim is validated by the "mbrs-by-ref:" attribute of the set. Absence of the "mbrs-by-ref:" attribute means that the membership is only defined by the "members:" attribute of the set.
-i mb (mnt-by) Maintainer name Objects whose "mnt-by:" attribute matches the query argument.
-i md (mnt-domains) Maintainer name Objects whose "mnt-domains:" attribute matches the query argument.
-i ml (mnt-lower) Maintainer name Objects whose "mnt-lower:" attribute matches the query argument.
-i mn (mnt-nfy) Email mntner objects whose "mnt-nfy:" attribute matches the query argument.
-i mu (mnt-routes) Maintainer name aut-num, inetnum, route and route6 objects whose "mnt-routes:" attribute matches the query argument.
-i mz (mnt-ref) Maintainer name Returns all objects whose "mnt-ref:" attribute matches the query argument.
-i ny (notify) Organisation objects with a matching "ref-nfy:" Objects whose "notify:" attribute matches the query argument.
-i ns (nserver) Domain name or single address domain objects whose "nserver:" attribute matches the query argument.
-i or (origin) AS Number route and route6 objects whose "origin:" attribute matches the query argument.
-i og (org) Organisation ID Objects whose "organisation:" attribute matches the query argument.
-i tc (tech-c) NIC handle Objects whose "tech-c:" attribute matches the query argument.
-i dt (upd-to) Email mntner objects whose "upd-to:" attribute matches the query argument.
-i zc (zone-c) NIC handle Objects whose "zone-c:" attribute matches the query argument.
-i rn (ref-nfy) Email Objects whose "notify" attribute matches the query argument.
-i fr (form) Poetic form Poetic form objects whose matches the query argument.
-i sp (sponsoring-org) Organisation ID Objects whose "sponsoring-org:" attribute matches the query argument.

# Table 4: Query Support For Tools

Flag Lookup Key(s) Effect
-F --brief Produces output using shorthand notation for attribute names. Produces slower responses.
-K --primary- keys Requests that only the primary keys of an object be returned. The exceptions are set objects, where the "members:" attributes will also be returned. This flag does not apply to person and role objects.
-k --persistent- connection (optional normal query) Requests a persistent connection. After returning the result, the connection will not be closed by the server and a client may issue multiple queries on the same connection. The server implements a "stop-and-wait" protocol, whereby no next query can be sent before receiving a reply for the previous one. Use RIPE Whois client to be able to send queries in batch mode. Except the first -k query, -k without an argument closes the persistent connection.

# Table 5: Miscellaneous Queries

Flag Argument Effect
-r --no- referenced Switches off lookups for referenced contact information after retrieving the objects that match the lookup key.
-B --no- filtering Switches off default filtering of objects.
-G --no- grouping Switches off grouping of associated objects.
-T --select- types Comma separated list of object types, no white space is allowed Restricts the types of primary objects to lookup in the query.
-a --all- sources Specifies that the server should perform lookups in all available sources. See also -q sources query. `
-s --sources Comma separated list of sources, no white space is allowed. Specifies which sources are to be looked up when performing a query and in which order.
--list- versions
--diff- versions Version number Indicates the difference between given historical versions of the object.
--show- version Version number Returns the historical version of the object with this index number. Must use --list- versions to get the index numbers.
--types Lists available RPSL object types.
--version Displays the current software version.
--list- sources Returns the current set of sources along with the information required for mirroring.
--resource Search all sources for the specified resource and returns the authoritative one. Placeholders are omitted.
--show- personal Include referenced person and role objects in results.
--no- personal Filter referenced person and role objects from results. A client can be blocked for excessive querying of these objects.

# Table 6: Informational Queries

The following notations are used in this table:

<object-type> means full or abbreviated name;

Flag Argument Effect
-q sources Returns the current set of sources along with the information required for mirroring.
-q version Displays the current version of the server.
-q types A list of all available object types.
-t --template Object type Requests a template for the specified object type.
-v --verbose Object type Requests a verbose template for the specified object type.
-V --client Client type Sends information about the client to the server.