PeeringDB API
Read the internet's peering database as JSON: networks, exchanges, facilities and peering policies. Anonymous access works, with limits. Verified live example.
Endpoint tested and returned HTTP 200 on 2026-08-21
What is the PeeringDB API?
PeeringDB exposes its whole dataset through a REST API. `GET https://www.peeringdb.com/api/net?limit=2` returns network records with ASN, peering policy, traffic profile and contact metadata. Anonymous reads work without a key, though registered users get higher limits and more visible fields.
PeeringDB is the shared address book of the internet's network operators, and every serious network engineer already has it open in a tab. The API turns it into something you can query: given an ASN you can find which exchanges a network is present at, which facilities it is in, its peering policy and how much traffic it carries, all as structured data.
The object model is the thing to learn first. `net` is a network, `ix` an exchange, `fac` a facility, `org` an organisation, and join tables such as `netixlan` and `netfac` connect them. That normalisation means a single interesting question, like 'where can I peer with this ASN', spans two or three requests. Anonymous access is deliberately reduced: contact records are hidden and rate limits are tighter, which is PeeringDB's defence against address harvesting.
Quick facts
- Base URL
https://www.peeringdb.com/api- Authentication
- Anonymous reads work for the main object types. A free registered API key raises rate limits and reveals contact records that anonymous callers cannot see.
- Rate limit
- Anonymous requests are throttled more tightly than authenticated ones. PeeringDB asks integrators to register a key and cache rather than polling.
- Pricing
- Free. PeeringDB is a non-profit funded by the networking community.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the PeeringDB API
Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.
1. List network records
GET https://www.peeringdb.com/api/net?limit=2
curl 'https://www.peeringdb.com/api/net?limit=2'const res = await fetch("https://www.peeringdb.com/api/net?limit=2");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://www.peeringdb.com/api/net?limit=2", timeout=20)
res.raise_for_status()
print(res.json()){
"data": [
{
"id": 1,
"org_id": 8897,
"name": "GTT Communications (AS4436)",
"aka": "Formerly known as nLayer Communications",
"name_long": "",
"website": "http://www.gtt.net",
"social_media": [
{
"service": "website",
"identifier": "http://www.gtt.net"
}
],
"asn": 4436,
"looking_glass": "",
"route_server": "",
"irr_as_set": "",
"info_type": "NSP",
"info_types": [
"NSP"
],
"info_prefixes4": 200000,
"info_prefixes6": 10000,
"info_traffic": "",
"info_ratio": "",
"info_scope": "Global",
"info_unicast": true,
"info_multicast": false,
"info_ipv6": true,
"info_never_via_route_servers": false,
"ix_count": 0,
"fac_count": 0,
"notes": "nLayer / AS4436 has been acquired by GTT Communications / AS3257 and is no longer directly peering. Please refer all peering related inquiries to peering [at] gtt [dot] net.",
"netixlan_updated": "2021-09-22T00:06:59Z",
"netfac_updated": "2016-09-19T05:47:27Z",
"poc_updated": "2016-03-14T21:53:18Z",
"policy_url": "http://www.gtt.net/peering/",
"policy_general": "Restrictive",
"policy_locations": "Required - International",
"policy_ratio": true,
"policy_contracts": "Required",
"allow_ixp_update": false,
"ixp_update_exclude": [],
"status_dashboard": null,
"rir_status": "ok",
"rir_status_updated": "2024-06-26T04:47:55Z",
"logo": null,
"created": "2004-07-2Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
{object} | path | Required | Object type: `net`, `ix`, `fac`, `org`, `netixlan` (network at exchange) or `netfac` (network at facility). net |
limit / skip | integer | Optional | Page size and offset. Both are honoured on list endpoints. 2 |
asn | integer | Optional | Filter networks by AS number. The most common lookup by far. 4436 |
name__contains | string | Optional | Django-style field lookup for substring matching. Most fields accept `__contains`, `__startswith` and `__in`. GTT |
depth | integer | Optional | How far to expand related objects inline, from 0 to 2. Higher values mean fewer round trips and much larger responses. 1 |
Response fields
dataarray- The records. Every response wraps results in `data`, even single-object lookups, so always index into it.
asninteger- AS number. Unlike some routing APIs this really is an integer here.
name / aka / name_longstring- Primary name plus alternatives. `aka` frequently records a former company name after an acquisition, which is genuinely useful history.
info_type / info_typesstring / array- Network category such as `NSP`, `Content` or `Cable/DSL/ISP`. Both the legacy single field and the newer array are returned.
info_prefixes4 / info_prefixes6integer- Self-declared maximum prefix counts, which peers use to set session limits. Self-reported, so treat as a hint.
policy_generalstring- Peering policy: `Open`, `Selective`, `Restrictive` or `No`. The single most consulted field in the dataset.
policy_url / policy_locations / policy_ratiostring / boolean- Where the policy is published, whether multiple locations are required, and whether a traffic ratio requirement applies.
ix_count / fac_countinteger- How many exchanges and facilities the network is present at. Zero often means a stale record rather than genuine absence.
notesstring- Free-text operator notes, often explaining mergers or where to send peering requests.
rir_statusstring- Whether the ASN is still allocated according to the RIRs, with `rir_status_updated` alongside. A useful staleness signal.
What you can build with the PeeringDB API
- Find out where you can peer with a given network before an interconnection request
- Look up a network's peering policy and contact route from an ASN in your logs
- Map which networks are present at a particular exchange or data centre
- Enrich traffic analytics with network type and traffic profile
- Audit your own PeeringDB record for stale or missing information
Common errors and how to fix them
401 or reduced fields
Contact records (`poc_set`) are hidden from anonymous callers.
Fix: Register a free API key and send it as a bearer token if you need contact data. This restriction is deliberate anti-harvesting.
429
The anonymous rate limit was hit.
Fix: Cache results, request only the object types you need, and register a key for a higher allowance.
Empty data array
The filter matched nothing, often because a field lookup suffix was mistyped.
Fix: PeeringDB uses Django-style lookups: `name__contains`, not `name_contains`. Two underscores.
PeeringDB API — frequently asked questions
Can I use the PeeringDB API without an account?
Yes for the main object types, though anonymous callers get tighter rate limits and cannot see contact records. A free key removes both restrictions.
How do I find where a network peers?
Query `netixlan` filtered by ASN. Each record links a network to an exchange with its IP addresses and port speed, which is exactly what a peering request needs.
Is the data reliable?
It is self-reported by operators, so it is authoritative for policy and contacts but can be stale for presence and prefix counts. Check `updated` timestamps before acting on a record.
What does the depth parameter do?
It expands related objects inline instead of returning only their ids. `depth=1` or `2` saves round trips at the cost of substantially larger responses.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
JSON to CSV Converter
Convert a JSON array of objects to CSV online. Automatic column headers from the union of all keys, delimiter choice and proper quoting — all in-browser.
IP Address Validator
Validate lists of IPv4, IPv6 and CIDR entries with the exact failure reason per line — compressed ::, IPv4-mapped forms and prefixes included. Free.
JSON Viewer
View JSON as a collapsible interactive tree online. Expand and collapse nodes, search keys and values, and copy the JSONPath of any node privately.
PeeringDB is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.