Skip to content
IPv4 cache refreshed 20 hr ago  ◆  IPv6 cache refreshed 18 hr ago  ◆  Prefixes in table 1,110,589 v4 · 261,978 v6  ◆  Peers 90 v4 · 20 v6  ◆  whois.pwhois.org:43 answering  ◆ 
Prefix WhoIs The Prefix
WhoIs Project
integrations·free·no account required

Use Prefix WhoIs from the tools you already run.

Every integration on this page does the same thing: at the moment your software has an address in hand, it asks the live routing table who announces it, and acts on the answer. Some we wrote; some are a line in a configuration file. If yours is missing, the rules for writing one are below.

writing your own

Eight rules of the road.

Prefix WhoIs is a query service, not a dataset. An integration that follows these rules behaves well on a busy mail server, survives an outage on either side, and stays inside the free allowance.

1

Query at the moment of need

Look up an address when you have one in hand. The service answers single addresses and batches over port 43, and that is the whole interface: there is no data file, no DNS zone and no bulk export, so integrations are live lookups by design.

2

Identify yourself

Put app="name-version" at the front of the query, letters, digits, dot, space, underscore and hyphen only. It changes nothing in the answer and it is how the service recognises a kind of traffic when you ask for a larger allowance.

3

Respect the allowance

Every network address gets 5,000 queries a day, reset at 00:00 UTC; hosts behind one NAT address share one. When it is used up the server answers with a short notice instead of a record. Detect that and stop for the day rather than retrying per message. Higher limits are customarily granted free for reasonable use: ask.

4

Cache briefly, by prefix

Repeat senders should cost one query, not one per message. Cache answers for about an hour, keyed by the returned prefix so every address in the block hits the cache, bounded in size, and shared across your workers where you can (the Rspamd plug-in uses Redis). A cache is de-duplication, not a copy of the table; do not build one.

5

Skip what has no route

Private, loopback and link-local addresses, and your own authenticated users, have nothing to look up. Filter them before the query.

6

Fail open

A slow or unreachable lookup must never delay or refuse mail, block a login, or hold an alert. Use a short timeout, and after a few consecutive failures stop querying for several minutes before trying again, so an outage on either side never turns into per-message latency.

7

Connect over IPv4

Queries over IPv6 are limited to a smaller allowance and fewer output types. Resolve the A record, or pin the address family, when your runtime would otherwise prefer IPv6.

8

Handle the data as the registries ask

Answers include registry information. Use it to make your decision and discard or cache it briefly; redistribution is not part of the free service and needs a conversation first.

quick answers

Before you ask.

What does a query look like on the wire?

A single line to whois.pwhois.org port 43, for example app="mytool-1.0" 8.8.8.8, answered with Field: value lines. type=all adds registry fields; type=cymru gives the one-line format many tools already parse. The FAQ covers the output formats, and whois -h whois.pwhois.org 8.8.8.8 shows you a live answer.

Is there an HTTPS or DNS interface?

No. Port 43 and the MCP server are the two doors. If your platform cannot open outbound TCP to port 43, run a small relay on a host that can and point your tool at it.

How fresh is the answer?

It comes from the current routing table. Cache-Date in every record says when that table was built.

Do you keep what I ask about?

No. Like the whois service itself, queries are not stored. The address you connect from is remembered so your queries share its allowance, and usage is published only as aggregate percentages.

I wrote one. Will you list it?

Yes, if it follows the rules above. Send the link through the request form.