freeapis

keycdn IP Location Finder

通过简单的 REST API 获取 IP 地理定位数据,所有响应均为 JSON 编码

认证方式
API Key
HTTPS
Yes
CORS
Unknown

简介

KeyCDN 的 geo API 把 IP 解析为位置、ISP 和时区——带免费层,需要密钥。

⚠️ 坑(2026-08 实测):除非 User-Agent 符合他们的格式({应用名}/{版本},如 my-app/1.0),否则请求返回 HTTP 403 “User-Agent not properly defined”。请发送规范 UA。

快速开始

查询(用规范 User-Agent!):

curl "https://tools.keycdn.com/geo.json?host=8.8.8.8" \
  -H "User-Agent: my-app/1.0"
{
  "status": "success",
  "description": "Data successfully received.",
  "data": { "geo": { "ip": "8.8.8.8", "country_name": "United States", "city": "Mountain View", "isp": "Google LLC" } }
}

认证方式

  • 低量可不用密钥;但 User-Agent 必须是 {应用}/{版本}(否则 403,已实测)。

速率限制与注意事项

  • 免费层:每小时请求有限(看文档);密钥可提高。
  • 返回位置、ISP、时区和连接类型。

常见问题

KeyCDN geo 免费吗? 免费层带小时限额;更多需要付费。

为什么 403? API 要求 {应用}/{版本} User-Agent(已实测)。

返回什么数据? 位置、ISP、时区和连接类型。

地理编码 分类更多

APIAuthHTTPSCORS
Actinia Grass GIS

Actinia is an open source REST API for geographical data that uses GRASS GIS

API KeyYesUnknown
administrative-divisons-db

Get all administrative divisions of a country

No authYesYes
adresse.data.gouv.fr

Address database of France, geocoding and reverse

No authYesUnknown
Airtel IP

IP Geolocation API. Collecting data from multiple sources

No authYesUnknown
Apiip

Get location information by IP address

API KeyYesYes