# BGPKIT API > Free public REST API for BGP data at https://api.bgpkit.com. No registration > or API keys for public v3 endpoints. Machine-readable contract: > https://api.bgpkit.com/openapi.json. Backed by BGPKIT open-source tools > (https://github.com/bgpkit); for site-wide resources see > https://bgpkit.com/llms.txt. Key facts: - All examples below were verified live on 2026-09-05. - Errors: JSON `{error, message?, timestamp}`; broker endpoints fail over across backend deployments and return 500 with "All deployment instances are down" only when every backend fails. - Pagination: `page` + `page_size` on list endpoints (broker search is 1-based, ROA search is 0-based; check each endpoint docs). ## Broker: find MRT files - [Search MRT files](https://api.bgpkit.com/v3/broker/search?collector_id=rrc00&page_size=1): GET /v3/broker/search. Filters: `ts_start`, `ts_end` (ISO 8601/Unix), `project` (routeviews|riperis), `collector_id` (comma-separated), `data_type` (rib|updates). Always pass at least one filter; unfiltered queries time out. Example: `curl 'https://api.bgpkit.com/v3/broker/search?project=riperis&collector_id=rrc00&data_type=rib&ts_start=2024-01-01T00:00:00Z&ts_end=2024-01-02T00:00:00Z'` - [Latest crawled files](https://api.bgpkit.com/v3/broker/latest): GET /v3/broker/latest. Most recent MRT files per collector. - [Broker health](https://api.bgpkit.com/v3/broker/health): GET /v3/broker/health. Backend freshness. - [Collectors list](https://api.bgpkit.com/v3/broker/collectors): GET /v3/broker/collectors. All collectors with project and data URL. - [Peers list](https://api.bgpkit.com/v3/broker/peers): GET /v3/broker/peers. Peer ASNs seen per collector. - [RouteViews Kafka streams](https://api.bgpkit.com/v3/broker/streams): GET /v3/broker/streams. Live BMP stream endpoints per collector. - [Real-time SSE events](https://api.bgpkit.com/v3/broker/events): GET /v3/broker/events. 302-redirects to the live Railway backend; SSE clients follow automatically. ## RPKI ROAs - [ROA search](https://api.bgpkit.com/v3/roas/search): GET /v3/roas/search. Historical ROAs; filters: `prefix`, `asn`, `max_len`, `date` (YYYY-MM-DD), `current` (only currently valid), `exact` (default true; false includes super/subnets). 0-based paging. Example: `curl 'https://api.bgpkit.com/v3/roas/search?asn=13335'` - [ROA validation](https://api.bgpkit.com/v3/roas/validate?asn=13335&prefix=1.1.1.0/24): GET /v3/roas/validate. RPKI validity for `prefix`+`asn` (+optional `date`). Example: `curl 'https://api.bgpkit.com/v3/roas/validate?asn=13335&prefix=1.1.1.0/24'` → `{"result":"valid"}` - [ROAS health](https://api.bgpkit.com/v3/roas/health): GET /v3/roas/health. ## Utils - [IP lookup](https://api.bgpkit.com/v3/utils/ip): GET /v3/utils/ip. `ip` optional (defaults to client IP); returns country, ASN, BGP prefix, RPKI status. Example: `curl 'https://api.bgpkit.com/v3/utils/ip?ip=1.1.1.1'` - [ASN lookup](https://api.bgpkit.com/v3/utils/asn?asn=13335): GET /v3/utils/asn. AS name/country/etc. for one ASN. Example: `curl 'https://api.bgpkit.com/v3/utils/asn?asn=13335'` ## BGP communities - [Communities search](https://api.bgpkit.com/v3/communities): GET /v3/communities. Paginated community definitions; filters: `asn`, `value`, `description`, `as_name`, `country`. Example: `curl 'https://api.bgpkit.com/v3/communities?asn=13335'` - [Communities sources](https://api.bgpkit.com/v3/communities/sources): GET /v3/communities/sources. Registry sources and freshness. ## Ops - [Health of metrics endpoint](https://api.bgpkit.com/v3/metrics): GET /v3/metrics. Prometheus text format; requires `Authorization: Bearer bgpkit_public`. - [Interactive docs](https://api.bgpkit.com/docs): Scalar UI rendering the OpenAPI spec. - [OpenAPI spec](https://api.bgpkit.com/openapi.json): full machine-readable contract. ## Optional - [MCP server](https://mcp.bgpkit.com/mcp): MCP tools proxying this API (streamable HTTP transport; POST tool calls). - [Legacy aliases](https://api.bgpkit.com/roas): /roas → /v3/roas/search, /broker/search → /v3/broker/search, /v3/peers/list → /v3/broker/peers (301s). - [Site llms.txt](https://bgpkit.com/llms.txt): BGPKIT tools, blog, case studies.