claude-plugin/skills/whois-lookup/SKILL.md
2026-11-28 15:28:04 +02:00

5.3 KiB


name: whois-lookup description: Look up any domain name with the free Interweb Mozambique WHOIS API: whether it is free or registered, expiry date, registry status, nameservers, price to register, renew or transfer at Interweb Mozambique, and similar free names. Works without an API key. Use when the user asks if a domain is free, who holds it, when it expires, or wants name ideas.

Interweb Mozambique WHOIS

Use this skill to look up domain names, even with no Interweb Mozambique account. To buy, use manage-domains.

Setup

  • API address: https://api.interweb.co.mz/v1. It is fixed for Interweb Mozambique: never ask the user for another address.
  • API key: always read it from the INTERWEB_API_KEY environment variable. Check it without printing it: test -n "$INTERWEB_API_KEY" && echo set || echo missing
  • If it is missing, ask the user to create a key in the API Center (https://www.meu.interweb.co.mz/api-center.php) with any permission (the key is optional here: WHOIS also works without one, with a lower hourly limit), then to run export INTERWEB_API_KEY="sandbox_..." and restart Claude Code (or the editor).
  • sandbox_ keys read the real account but only simulate writes and never charge. prod_ keys change the account and can charge. GET /v1/token gives the mode in data.mode and the permissions in data.permissions. Suggest a sandbox_ key for a first try.
  • Never print, log or commit the key, and never put it in code that runs in a browser or a mobile app. In code, read it from the environment.

Every request looks like this:

curl -sS "https://api.interweb.co.mz/v1/PATH" -H "Authorization: Bearer $INTERWEB_API_KEY" -H "Accept: application/json"

Rules

  • Before anything that charges, deletes data or cannot be undone, tell the user exactly what will happen (with the price, when the API gives one) and wait for a clear yes.
  • Send an Idempotency-Key header on purchases, sends and other POST requests that accept it, and reuse the same value if you retry the same request: IDEM=$(uuidgen 2>/dev/null || cat /proc/sys/kernel/random/uuid).
  • Lists come in pages: ?page=1&per_page=100, and meta.total_pages says how many there are.
  • Long operations answer 202 with an action_id. Follow them with GET /v1/actions/{action_id} every 10 to 20 seconds until status is done or failed.
  • Answer the user in the language they write in, and show amounts with the currency the API returns.

Look up one name

curl -sS "https://api.interweb.co.mz/v1/whois/mybusiness.co.mz"

With a key, add -H "Authorization: Bearer $INTERWEB_API_KEY" (higher limit and the account currency).

  • status: available, registered, unknown (could not be confirmed now) or not_allowed.
  • Registered: registration has the dates, status, nameservers, age, days until expiry, DNSSEC and, when the registry publishes them, the contacts. transfer_url opens the transfer on the Interweb Mozambique website.
  • Free: register_url opens the registration on the website. alternatives suggests up to 4 free names.
  • price has the 1-year register, renew and transfer price; prices has the price per number of years.
  • premium: true names have their own price; quote_required: true means the price comes from a quote.
  • Extensions we do not sell answer 422 extension_not_supported.

Several names

curl -sS "https://api.interweb.co.mz/v1/whois?domains=mybusiness.co.mz,mybusiness.com"

Up to 10 names per request, in the order asked. A name with a problem comes with status error and the others still answer.

Currency and language

?currency=USD (any currency of the brand; otherwise 422 with the accepted list in details.allowed) and ?language=pt or en for the website links.

Limits

  • Without a key: 60 lookups per hour per IP. With a key: 1,000 per hour per account.
  • 429 comes with retry_after in seconds. Do not loop over long lists: ask the user which names matter.

Presenting the answer

Give a short answer first ("free, and costs a year to register" or "registered until "), then the details the user asked for. Personal contact data from WHOIS is only shown when the user asks for it.

Errors

Errors look like {"error": {"code", "message", "correlation_id", "details"}}. Act on code, never on the text of message.

HTTP code What to do
401 unauthorized The key is missing, wrong or revoked. Ask the user to check INTERWEB_API_KEY.
402 insufficient_credit Not enough account credit, and nothing was charged. Give the user details.add_funds_url.
403 insufficient_scope The key lacks a permission. Name it and ask for a key that has it.
403 spending_limit_exceeded The purchase goes over the key spending limit. Nothing was charged.
404 not_found Wrong id, or it is not in this account.
409 conflict and others Read details.reason and explain it in plain words.
422 validation_failed Fix the field named in details and try again.
429 rate_limited Wait for the Retry-After seconds, then try once more.
5xx internal_error, upstream_error Try again later. If the user contacts support, give them the correlation_id.

More