第三方接口对接
  1. 百度地图api
第三方接口对接
  • 免费api调用
    • 百度地图api
      • 百度地图api调用
      • 根据关键字查找坐标
        GET
      • 根据经纬度反查地点
        GET
    • 查询ip归属地
      GET
  1. 百度地图api

根据经纬度反查地点

GET
http://api.map.baidu.com/geocoder/v2/

百度坐标拾取系统#

可以在该网站验证

请求参数

Query 参数
ak
string 
调用凭据
可选
示例值:
5xg2kqlDtrMlhuMjuhVA5tYZe4OQ68dY
location
string 
纬度,经度
可选
示例值:
39.980427,116.206498
output
string 
输出格式
可选
示例值:
json
pois
string 
固定值
可选
示例值:
0

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'http://api.map.baidu.com/geocoder/v2/?ak=5xg2kqlDtrMlhuMjuhVA5tYZe4OQ68dY&location=39.980427,116.206498&output=json&pois=0'

返回响应

🟢200成功
application/json
Body
status
integer 
必需
result
object 
必需
location
object 
坐标
必需
formatted_address
string 
所在区
必需
edz
object 
必需
business
string 
必需
addressComponent
object 
必需
pois
array[string]
必需
roads
array[string]
必需
poiRegions
array[string]
必需
sematic_description
string 
详细地址
必需
formatted_address_poi
string 
必需
cityCode
integer 
城市编码
必需
示例
{
  "status": 0,
  "result": {
    "location": {
      "lng": 116.20649799999993,
      "lat": 39.98042707165911
    },
    "formatted_address": "北京市海淀区",
    "edz": {
      "name": ""
    },
    "business": "香山",
    "addressComponent": {
      "country": "中国",
      "country_code": 0,
      "country_code_iso": "CHN",
      "country_code_iso2": "CN",
      "province": "北京市",
      "city": "北京市",
      "city_level": 2,
      "district": "海淀区",
      "town": "四季青(地区)镇",
      "town_code": "110108102",
      "distance": "",
      "direction": "",
      "adcode": "110108",
      "street": "",
      "street_number": ""
    },
    "pois": [],
    "roads": [],
    "poiRegions": [],
    "sematic_description": "56西山小院西南62米",
    "formatted_address_poi": "",
    "cityCode": 131
  }
}
上一页
根据关键字查找坐标
下一页
查询ip归属地
Built with