Draw a network diagram
pwhois_mapDraw a network diagram / show the BGP path for an IP address, prefix or ASN: providers on the left, the network in the middle, downstream networks and prefixes on the right, enriched by Prefix WhoIs. Use for requests like 'draw a network diagram of AS15169', 'show me the BGP path to 8.8.8.8', 'display the network path for 2001:4860::/32'. Also for 'show me a network diagram' and 'map this ASN'. Returns the chart as a PNG image block (format=svg: no image block), a summary with a hosted image link, the interactive map link and a link that reproduces this exact look, an ARTIFACT_HTML text block (a self-contained page with the chart as SVG), and the counts in structuredContent. Clients differ. claude.ai chat and Claude Cowork do not display tool images: publish the ARTIFACT_HTML block as an HTML artifact, verbatim, then give the links. Claude Code receives the PNG as a saved file ('[Image: source: ]'): show that file to the user with the client's file tool (e.g. SendUserFile) or publish the ARTIFACT_HTML as an artifact. API clients that render image blocks need nothing more. Give the user both links and the attribution. Costs 5 queries per chart. Method: see pwhois.org/maps/credits.who#methodology.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| font | No | Label font. Default Nunito Sans. | |
| query | Yes | What to draw: an IPv4/IPv6 address, a CIDR prefix, or an AS number (AS15169 or 15169). A hostname is resolved to its address first. | |
| width | No | Image width in pixels. | |
| family | No | Address family to draw for an AS. An address or prefix sets its own. | |
| format | No | Image format: PNG by default; svg on request. If the server cannot make a PNG right now, the SVG is returned with a note. | png |
| preset | No | Colours: nightwire (violet on near-black), phosphor (teal glow), ember (amber and coral), paper (light, for documents and print), mono (grayscale). | nightwire |
| collectors | No | Also draw the networks whose sessions feed pWhois's route collectors (vantage points). Off by default: they show where routes are observed from, not who the network connects to. | |
| downstream | No | For an AS: also draw the networks behind it (direct downstream customers and their prefixes, bounded). Ignored for addresses and prefixes. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cost | Yes | Queries charged for this chart. | |
| kind | Yes | ||
| note | No | ||
| bytes | No | Size of the PNG image block (0 when there is none). | |
| edges | Yes | ||
| empty | No | ||
| nodes | Yes | Nodes drawn (networks, prefixes, addresses, bundles). | |
| query | Yes | The focus in normal form: AS15169, 8.8.8.8, 8.8.8.0/24. | |
| width | No | ||
| cached | No | ||
| family | Yes | ||
| format | Yes | png: a PNG image block leads the answer; svg: no image block, the chart is the SVG inside the ARTIFACT_HTML block; none: nothing routed, nothing drawn. | |
| height | No | ||
| png_fit | No | original | quantized | scaled:<width> (how the PNG was fitted under the size limit). | |
| sampled | Yes | True when a size cap cut the routing data (large networks). | |
| networks | No | ||
| warnings | No | What the drawing left out or shrank (e.g. "drawn counts reduced to keep labels legible at 1200 px"); the full data is on the interactive map. | |
| allowance | No | Daily allowance after this call. | |
| image_url | No | Hosted PNG of this chart (https://pwhois.org/maps/<id>.png); null if the look could not be stored. | |
| permalink | Yes | Interactive map of the same focus on pwhois.org. | |
| share_url | No | Interactive map with this exact look (preset, font, layout); null if it could not be stored. | |
| svg_bytes | No | ||
| collectors | No | Whether the collector vantage points were drawn. | |
| downstream | No | For an AS with downstream=true: the networks behind it. | |
| queried_as | No | The hostname you passed, when it was resolved. | |
| rasterizer | No | What converted the drawing to PNG. | |
| attribution | No | ||
| artifact_bytes | No | ||
| collector_peers | No | How many networks feed the route collectors with this network's routes (always counted, drawn only with collectors=true). | |
| artifact_included | No | Whether the ARTIFACT_HTML text block is in the answer. |