API Documentation
Programmatic access to BGPSentinel BGP data.
Authentication
All API requests require authentication using an API key. Include your key in the
Authorization header
as a Bearer token.
Sign in to create API keys.
Base URL
Endpoints
/ip/lookup
Look up the origin ASN(s) for a list of IP addresses based on BGP routing data.
Request Body
{
"ips": ["1.2.3.4", "8.8.8.8", "2001:4860:4860::8888"],
"days_back": 7
}
ips
List of IPv4 or IPv6 addresses. Maximum 1000 per request.
days_back
Number of days to look back for BGP data. Valid range: 1-7.
Response
{
"data": [
{
"requested_ip": "1.2.3.4",
"asn": [1234]
},
{
"requested_ip": "8.8.8.8",
"asn": [15169]
},
{
"requested_ip": "2001:4860:4860::8888",
"asn": [15169]
}
]
}
requested_ip
The IP address from your request.
asn
Array of ASN numbers that originated routes for this IP within the specified time period. Empty array if no routes found.
Example Request
curl -X POST https://bgpsentinel.com/api/v1/ip/lookup \
-H "Authorization: Bearer bgps_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"ips": ["8.8.8.8", "1.1.1.1"], "days_back": 7}'
Error Codes
400
Bad Request - Invalid request body, too many IPs, or invalid IP format.
401
Unauthorized - Missing or invalid API key.
500
Internal Server Error - Something went wrong on our end.
More Endpoints Coming Soon
Additional API endpoints for prefix lookups, ASN information, and more will be added in future updates.