Article
地点检索服务(又名Place API)是一类Web API接口服务;
服务提供多种场景的地点(POI)检索功能,包括城市检索、圆形区域检索、矩形区域检索。开发者可通过接口获取地点(POI)基础或详细地理信息。
http://lbsyun.baidu.com/index.php?title=webapi/guide/webservice-placeapi
接口功能介绍
行政区划区域检索
http://api.map.baidu.com/place/v2/search?query=ATM机&tag=银行®ion=北京&output=json&ak=您的ak
//GET请求
使用方法
- 申请百度账号
- 申请成为百度开发者
- 获取服务密钥(ak)
- 发送请求,使用服务
Code
import urllib.request, urllib.parse, urllib.error
import json
import hashlib
MyAK = 'your AK'
MySK = 'your SK'
#处理得到url
def get_url(name, tag, city)