Code examples for integrating with the IPBot API - a fast IP intelligence service with <10ms latency.
curl -s https://api.ipbot.com/8.8.8.8 | jq- IP Geolocation - Country, region, city, postal code, coordinates
- ASN Lookup - Network operator, organization, usage type
- Risk Scoring - Explainable risk assessment with reasons
- Proxy Detection - Datacenter, VPN, Tor exit identification
- Threat Intelligence - Real-time threat list matching
| Language | File | Description |
|---|---|---|
| Python | python/ipbot_example.py | Basic lookup + error handling |
| JavaScript | javascript/ipbot_example.js | Node.js + browser (fetch) |
| Go | go/ipbot_example.go | Typed response structs |
| cURL | curl/examples.sh | Shell one-liners |
| Endpoint | Description |
|---|---|
GET / |
Auto-detect caller IP |
GET /{ip} |
Lookup specific IP |
GET /api?ip={ip} |
Query parameter style |
GET /health |
Service health check |
{
"ip": "8.8.8.8",
"location": {
"country": "United States",
"country_code": "US",
"region": "California",
"city": "Mountain View",
"latitude": 37.4056,
"longitude": -122.0775
},
"network": {
"asn": "AS15169",
"org": "Google LLC",
"radar": "isp"
},
"security": {
"risk_score": 15,
"risk_reasons": ["public_dns"],
"is_datacenter": true,
"is_proxy": false,
"threat_level": "Low"
}
}Full API documentation: ipbot.com/docs
- API Reference - Endpoints, parameters, error codes
- Rate Limits - Fair-use guidelines
- Risk Scoring - How risk is calculated
Found an issue or want to add an example? Open a PR!
MIT License - feel free to use these examples in your projects.