freeapis

IP Geolocation

根据网站访客的 IP 对其进行地理定位

认证方式
API Key
HTTPS
Yes
CORS
Yes

简介

Abstract 的 IP 地理定位 API 把 IP 解析为位置和连接数据。认证是 API 密钥(无效密钥返回 401,已实测)。

快速开始

查询(替换 YOUR_KEY):

curl "https://ipgeolocation.abstractapi.com/v1/?api_key=YOUR_KEY&ip_address=8.8.8.8"
{
  "ip_address": "8.8.8.8",
  "city": "Mountain View",
  "city_geoname_id": 5375480,
  "region": { "iso_code": "CA", "name": "California" },
  "country": { "code": "US", "name": "United States" },
  "longitude": -122.0838,
  "latitude": 37.386,
  "timezone": { "name": "America/Los_Angeles" },
  "connection": { "autonomous_system_number": 15169, "connection_type": "Corporate" }
}

认证方式

  • 在 abstractapi.com 注册 → 免费 API 密钥(在控制台)。
  • 通过 api_key 查询参数携带(无效 → 401,已实测)。

速率限制与注意事项

  • 免费层:约 20,000 次/月(看控制台);付费档可扩展。
  • 包含地理定位、时区、货币和连接/ASN 数据。
  • 支持 CORS——浏览器可用。

常见问题

Abstract IP Geolocation 免费吗? 免费层:约 20,000 次/月;更多需要付费。

如何获取密钥? abstractapi.com → 控制台 → API 密钥。

包含什么? 位置、时区、货币和 ASN 数据。

地理编码 分类更多

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