Skip to content

anycast ​

8 endpoints at a glance
MethodPathSummary
GET/anycast/changes/List Changes
GET/anycast/imports/List Imports
POST/anycast/imports/runRun Import
GET/anycast/intel/Get Intel
GET/anycast/lookup/{ip}Lookup Ip
GET/anycast/prefixes/List Prefixes
GET/anycast/prefixes/{prefix}Get Prefix
GET/anycast/stats/Get Stats

anycast​


Get Stats​

GET
/anycast/stats/

High-level tiles: total v4 / v6 counts + latest import summary.

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Samples​


List Prefixes​

GET
/anycast/prefixes/

Paginated prefix browser. Filters compose with $and —
pick any subset.

  • af — 4 or 6 (only these two values are accepted;
    anything else is treated as "no filter").
  • asn — exact match on the origin ASN (integer).
  • country — prefix observed in this country at any of its
    catchments. ISO 3166-1 alpha-2.
  • q — substring match on the CIDR string (e.g. 1.0.).

Parameters​

Query Parameters

af
asn
country
q
limit
Type
integer
Default
100
skip
Type
integer
Default
0

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Variables
Key
Value

Samples​


Get Prefix​

GET
/anycast/prefixes/{prefix}

Single-prefix detail. Returns the full doc (incl. catchment
list) for the map view. 404 when the prefix isn't in the current
anycast set — operators use that to confirm a prefix dropped out
of the upstream feed.

Parameters​

Path Parameters

prefix*
Type
string
Required

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Variables
Key
Value

Samples​


Lookup Ip​

GET
/anycast/lookup/{ip}

Longest-prefix-match for one IP. Returns the full anycast doc
(prefix + ASN + catchments) or 404 when no anycast prefix covers
it. Drives the "is this IP anycast?" check from monitoring and
the IP-detail page.

Parameters​

Path Parameters

ip*
Type
string
Required

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Variables
Key
Value

Samples​


Get Intel​

GET
/anycast/intel/

One-call Anycast Intelligence payload: headline stats, top origin
ASes (name-enriched), top countries, and the per-import growth/churn
series. Public read like the rest of this router.

Parameters​

Query Parameters

asn_limit
Type
integer
Maximum
200
Minimum
1
Default
20
country_limit
Type
integer
Maximum
500
Minimum
1
Default
50
growth_limit
Type
integer
Maximum
200
Minimum
1
Default
52

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Variables
Key
Value

Samples​


List Changes​

GET
/anycast/changes/

Newest-first per-prefix change log. Each row is one add/remove
event from one import. since_ts filters to events at or after
a unix-second timestamp — pair with the dashboard's date range
for "what's changed since N days ago".

Parameters​

Query Parameters

action

Filter to "added" or "removed". Omit for both.

since_ts
limit
Type
integer
Default
200
skip
Type
integer
Default
0

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Variables
Key
Value

Samples​


List Imports​

GET
/anycast/imports/

Newest-first audit rows for the import job — drives the admin
panel's recent-runs table.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

limit
Type
integer
Default
50

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Run Import​

POST
/anycast/imports/run

Enqueue a full v4+v6 import on the background worker. Returns
immediately with the queue snapshot — the admin panel polls
GET /imports/ for completion. The full pass is ~30s of
upserts + diff + db.ips stamping, well past the 15s HTTP
gateway timeout, so running it inline is not an option. The
worker serialises with the scheduled cron path so the mark-and-
sweep is race-free.

Parameters​

Header Parameters

authorization
x-api-key

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers

Samples​


Atlas — built on RIPE Atlas data.