Skip to content
OSINTtools.io

PeeringDB API

User-maintained database of networks, internet exchange points, data centres and carriers, with a public API.

Base URL
https://www.peeringdb.com/api
Sign-in
No key
Format
REST
Endpoints
4

Compiled by OSINTtools.io editors from docs.peeringdb.com · updated Nov 29, 2026Work on this API? Claim it to keep these docs currentReport a mistake

Introduction

PeeringDB's REST API returns the same objects as the website: networks, internet exchanges and the connections between them. Investigators use it to look up who operates an autonomous system and where it peers.

Prepend api/ to a web object URL to get JSON, for example /net/1 becomes /api/net/1. Listings take limit, skip, depth, fields and since, exact matches as field=value, and modifiers such as __contains, __startswith, __in, __lt and __gt. Guests can read without authentication; writes need an API key. The full list of object types is at peeringdb.com/apidocs. Rate limits are not stated in the docs read.

Quick start

  1. No key needed

    The PeeringDB API answers without an account or key.

  2. Make your first request

    List networks, filtered by field values and modifiers.. Replace the example values and run it in a terminal, or use Try it on the endpoint.

    curl 'https://www.peeringdb.com/api/net'
  3. Read the response

    A 200 response looks like this.

    {
      "data": [
        {
          "id": 1,
          "name": "Example Network"
        }
      ]
    }

Authentication

No key or account: every endpoint answers without one.

Guests can read. An API key (`Authorization: Api-Key <KEY>`) is needed for writes.

Rate limits and pricing

Not stated in the docs

Networks

Returns networks in a data array. Filter with name=... or modifiers such as name__contains.

Query parameters

name__containsstringtakes your name

Substring match on a string field (here the network name)

Example: example
limitinteger

Maximum rows returned

Example: 10
skipinteger

Rows to skip

Example: 0
depthinteger

Expands nested sets: 0 (default), 1 (set IDs) or 2 (set objects)

Example: 0One of: 0, 1, 2
fieldsstring

Comma-separated fields to return

Example: id,name
sinceinteger

Unix timestamp in seconds; objects updated since then

Example: 1700000000
Response fields · 4Show

data[]object

Matching objects

idinteger

Object ID

namestring

Network name

metaobject

Optional status and message

curl 'https://www.peeringdb.com/api/net'
No key needed
Response
{
  "data": [
    {
      "id": 1,
      "name": "Example Network"
    }
  ]
}
  • Passive: the target is not contacted

A single-object GET defaults to depth=2 and accepts depth 0 to 4; it also expands single relationships such as net_id into objects.

Path parameters

idintegerrequired

Network ID

Example: 1

Query parameters

depthinteger

Expansion depth, 0 to 4

Example: 2One of: 0, 1, 2, 3, 4
Response fields · 3Show

data[]object

One object in an array

idinteger

Object ID

namestring

Network name

curl 'https://www.peeringdb.com/api/net/1'
No key needed
Response
{
  "data": [
    {
      "id": 1,
      "name": "Example Network"
    }
  ]
}

Exchanges

Returns exchanges in a data array; same query parameters and modifiers as the network list.

Query parameters

name__containsstringtakes your name

Substring match on the name

Example: example
limitinteger

Maximum rows returned

Example: 10
Response fields · 3Show

data[]object

Matching objects

idinteger

Object ID

namestring

Exchange name

curl 'https://www.peeringdb.com/api/ix'
No key needed
Response
{
  "data": [
    {
      "id": 10,
      "name": "Example IX"
    }
  ]
}

Connections

  • Passive: the target is not contacted

Filter by net_id, ix_id or the __in modifiers, as in the docs' example query.

Query parameters

net_idinteger

Network ID

Example: 694
ix_idinteger

Exchange ID

Example: 10
limitinteger

Maximum rows returned

Example: 10
Response fields · 6Show

idinteger

Object ID

net_idinteger

Network ID

ix_idinteger

Exchange ID

ipaddr4string

IPv4 address

ipaddr6string

IPv6 address

speedinteger

Port speed

curl 'https://www.peeringdb.com/api/netixlan'
No key needed
Response
{
  "data": [
    {
      "id": 1,
      "net_id": 694,
      "ix_id": 10,
      "ipaddr4": "192.0.2.10",
      "ipaddr6": "2001:db8::10",
      "speed": 10000
    }
  ]
}