ipapi.co
查找 IP 地址的位置信息
- 认证方式
- No auth
- HTTPS
- Yes
- CORS
- Yes
- 分类
- 地理编码
简介
ipapi.co 把 IP 解析为地理定位数据——城市、国家、时区和货币。免费层免密钥但限流严格(我们从数据中心 IP 测试遇到 HTTP 429 RateLimited——已实测)。
快速开始
你的 IP:
curl "https://ipapi.co/json/"
{
"ip": "210.61.187.110",
"city": "Kaohsiung",
"region": "Kaohsiung",
"country": "TW",
"country_name": "Taiwan",
"latitude": 22.6148,
"longitude": 120.3139,
"timezone": "Asia/Taipei",
"currency": "TWD"
}
特定 IP / 格式:
curl "https://ipapi.co/8.8.8.8/json/"
curl "https://ipapi.co/8.8.8.8/country/"
curl "https://ipapi.co/8.8.8.8/csv/"
认证方式
- 匿名:可用但有限流(负载下 429,已实测)。
- 免费密钥:在 ipapi.co 注册 → 密钥(10 万次/月)→
https://ipapi.co/{ip}/json/?key=YOUR_KEY。
速率限制与注意事项
- 匿名:非常有限(共享池);免费密钥:100,000 次请求/月。
- 输出格式:
json、csv、xml、yaml和单字段端点(/country/、/city/……)。 - 支持 CORS——浏览器可用(受相同限流约束)。
常见问题
ipapi.co 免费吗? 匿名有限流;免费密钥给 10 万次/月。
为什么 429? 匿名池限流很严(已实测)——请用密钥。
有什么格式? JSON、CSV、XML、YAML 或单字段。
地理编码 分类更多
| API | Auth | HTTPS | CORS | |
|---|---|---|---|---|
| Actinia Grass GIS Actinia is an open source REST API for geographical data that uses GRASS GIS | API Key | Yes | Unknown | ↗ |
| administrative-divisons-db Get all administrative divisions of a country | No auth | Yes | Yes | ↗ |
| adresse.data.gouv.fr Address database of France, geocoding and reverse | No auth | Yes | Unknown | ↗ |
| Airtel IP IP Geolocation API. Collecting data from multiple sources | No auth | Yes | Unknown | ↗ |
| Apiip Get location information by IP address | API Key | Yes | Yes | ↗ |