LocationIQ
提供正向/反向地理编码和批量地理编码
- 认证方式
- API Key
- HTTPS
- Yes
- CORS
- Yes
- 分类
- 地理编码
- 文档 / URL
- https://locationiq.org/docs/
简介
LocationIQ 提供基于 OpenStreetMap 的地理编码和地图——正向/反向地理编码、自动补全和静态地图——带免费层。认证是 API 密钥(无效密钥返回 401,已实测)。
快速开始
正向地理编码(替换 YOUR_KEY):
curl "https://us1.locationiq.com/v1/search?key=YOUR_KEY&q=paris&format=json&limit=1"
[
{
"place_id": "12345",
"display_name": "Paris, Île-de-France, France",
"lat": "48.8566",
"lon": "2.3522",
"class": "place",
"type": "city"
}
]
反向地理编码:
curl "https://us1.locationiq.com/v1/reverse?key=YOUR_KEY&lat=48.8566&lon=2.3522&format=json"
自动补全:
curl "https://us1.locationiq.com/v1/autocomplete?key=YOUR_KEY&q=par&limit=5"
认证方式
- 在 locationiq.org 注册 → 免费 API 密钥(在控制台)。
- 通过
key查询参数携带(无效密钥 → 401,已实测)。
速率限制与注意事项
- 免费层:5,000 次请求/天(以当前文档为准);付费档可扩展。
- 数据基于 OpenStreetMap(数据免费,API 付费档)。
- 美国区主机是
us1.locationiq.com(欧盟:eu1)。 - 付费档还提供静态地图瓦片和路由。
常见问题
LocationIQ 免费吗? 免费层:5,000 次/天;更多需要付费。
如何获取密钥? 在 locationiq.org 注册——密钥在控制台。
基于什么数据? OpenStreetMap。
地理编码 分类更多
| 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 | ↗ |