Skip to content

webunblocker/ipbot-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IPBot Examples

Code examples for integrating with the IPBot API - a fast IP intelligence service with <10ms latency.

Quick Start

curl -s https://api.ipbot.com/8.8.8.8 | jq

Features

  • 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

Examples

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

API Endpoints

Endpoint Description
GET / Auto-detect caller IP
GET /{ip} Lookup specific IP
GET /api?ip={ip} Query parameter style
GET /health Service health check

Response Example

{
  "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"
  }
}

Documentation

Full API documentation: ipbot.com/docs

Contributing

Found an issue or want to add an example? Open a PR!

License

MIT License - feel free to use these examples in your projects.

About

Code examples for IPBot API - Python, JavaScript, Go, cURL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published