地点搜索-关键字搜索
<h3>接口描述</h3>
<ul>
<li>根据关键词返回地点信息列表。</li>
</ul>
<h3>请求地址</h3>
<p><code>https://api.jumdata.com/place/keywords</code></p>
<h3>请求方式</h3>
<ul>
<li>GET/POST</li>
</ul>
<h3>请求格式</h3>
<ul>
<li>x-www-form-urlencoded</li>
</ul>
<h3>请求参数</h3>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必须</th>
<th><div style="width:400px">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>appId</td>
<td>String</td>
<td>是</td>
<td>服务商分配的唯一标识</td>
</tr>
<tr>
<td>keywords</td>
<td>String</td>
<td>是</td>
<td>地点关键字,只支持一个关键字 ,文本总长度不可超过80字符</td>
</tr>
<tr>
<td>types</td>
<td>String</td>
<td>否</td>
<td>指定地点类型,可支持传入多个分类,多个类型用 &#124; 分割</td>
</tr>
<tr>
<td>region</td>
<td>String</td>
<td>否</td>
<td>搜索区划,增加指定区域内数据返回权重,如需严格限制返回数据在区域内,请搭配使用cityLimit参数,可输入citycode,adcode,cityname,cityname仅支持城市级别和中文,如“北京市”</td>
</tr>
<tr>
<td>cityLimit</td>
<td>String</td>
<td>否</td>
<td>指定城市数据返回限制,可选值:true/false,为true时,仅返回region对应区域内数据</td>
</tr>
<tr>
<td>showFields</td>
<td>String</td>
<td>否</td>
<td>返回结果控制,showFields用来筛选返回结果中可选字段。例:“children,indoor,business,navi,photos”,未设置时,只返回基础信息类内字段。</td>
</tr>
<tr>
<td>pageSize</td>
<td>String</td>
<td>否</td>
<td>当前分页展示的数据条数,取值1-25,默认为10</td>
</tr>
<tr>
<td>pageNo</td>
<td>String</td>
<td>否</td>
<td>分页,取值1-100,默认为1</td>
</tr>
</tbody>
</table>
<p>> types传参示例: “050301|050302”
> types值详见:<a href="https://anq-file.oss-cn-hangzhou.aliyuncs.com/support/showdoc/poi_type1.0.xlsx">https://anq-file.oss-cn-hangzhou.aliyuncs.com/support/showdoc/poi_type1.0.xlsx</a>
> citycode、adcode值详见:<a href="https://anq-file.oss-cn-hangzhou.aliyuncs.com/support/showdoc/adcode_citycode1.0.xlsx">https://anq-file.oss-cn-hangzhou.aliyuncs.com/support/showdoc/adcode_citycode1.0.xlsx</a></p>
<h3>签名算法说明</h3>
<p><code>sign = sha256(appId + appSecret + timestamp)</code></p>
<p>用服务商分配的 appId、服务商分配的 appSecret,当前时间时间戳 timestamp,按上述顺序拼接成字符串,再进行 sha256 哈希得到。如下:</p>
<pre><code class="language-java">String appId = &quot;xyzxy2121zxyz&quot;;
String timestamp = &quot;1555378976238&quot;;
String appSecret = &quot;efcefcef1121cefcefc1212121&quot;;
String str = appId + appSecret + timestamp;
String sign = sha256(str);</code></pre>
<h3>成功返回样例</h3>
<pre><code class="language-json">{
&quot;msg&quot;: &quot;成功&quot;,//返回码对应描述
&quot;code&quot;: 200,//返回码,详见返回码说明
&quot;taskNo&quot;: &quot;202960247220113090298671&quot;,//本次请求号
&quot;charge&quot;: true,//计费标志
&quot;data&quot;: {
&quot;count&quot;: &quot;10&quot;,//总数
&quot;list&quot;: [
{
&quot;address&quot;: &quot;龙井路1号&quot;,//详细地址
&quot;location&quot;: &quot;120.121282,30.222719&quot;,//经纬度
&quot;id&quot;: &quot;B023B13L9M&quot;,//唯一标识
&quot;name&quot;: &quot;杭州西湖风景名胜区&quot;,//名称
&quot;pcode&quot;: &quot;330000&quot;,//所属省份编码
&quot;adcode&quot;: &quot;330106&quot;,//所属区域编码
&quot;pname&quot;: &quot;浙江省&quot;,//所属省份
&quot;cityname&quot;: &quot;杭州市&quot;,//所属城市
&quot;typecode&quot;: &quot;110202&quot;,//分类编码
&quot;adname&quot;: &quot;西湖区&quot;,//所属区县
&quot;citycode&quot;: &quot;0571&quot;,//所属城市编码
&quot;type&quot;: &quot;风景名胜;风景名胜;国家级景点&quot;,//所属类型
&quot;business&quot;: {//商业信息
&quot;opentime_today&quot;: &quot;24小时营业&quot;,//今日营业时间
&quot;cost&quot;: &quot;0.00&quot;,//人均消费,目前仅在餐饮、酒店、景点、影院类返回
&quot;keytag&quot;: &quot;5A景区&quot;,//标签
&quot;rating&quot;: &quot;4.9&quot;,//评分,目前仅在餐饮、酒店、景点、影院类返回
&quot;business_area&quot;: &quot;西湖&quot;,//所属商圈
&quot;alias&quot;: &quot;西湖景区&quot;,//别名
&quot;tel&quot;: &quot;0571-89586930&quot;,//联系电话
&quot;tag&quot;: &quot;面面,鸽子,东坡肉,龙井虾仁,西湖醋鱼,特色小吃&quot;,//特色美食内容
&quot;opentime_week&quot;: &quot;00:00-24:00&quot;//营业时间描述
},
&quot;photos&quot;: [
{
&quot;title&quot;: &quot;&quot;,//图片介绍
&quot;url&quot;: &quot;http://store.is.autonavi.com/showpic/0fcf0bcc9827f4c28647f941472840fe&quot; //图片的下载链接
}
],
&quot;children&quot;: [//子地点信息
{
&quot;typecode&quot;: &quot;150904&quot;,//分类编码
&quot;address&quot;: &quot;南山路与广福里交叉口北80米&quot;,//详细地址
&quot;subtype&quot;: &quot;停车场&quot;,//所属类型
&quot;name&quot;: &quot;杭州西湖风景名胜区停车点&quot;,//名称
&quot;location&quot;: &quot;120.158045,30.241689&quot;,//经纬度
&quot;id&quot;: &quot;B0H2158T3K&quot; //唯一标识
}
],
&quot;navi&quot;: {//导航位置相关信息
&quot;navi_poiid&quot;: &quot;H51F022001_476398;4093&quot;,//对应的导航引导点坐标,一般为各类出入口,方便结合导航、路线规划等服务使用
&quot;entr_location&quot;: &quot;120.153345,30.224729&quot;,//入口经纬度坐标
&quot;exit_location&quot;: &quot;&quot; //出口经纬度坐标
},
&quot;indoor&quot;: {//室内相关信息
&quot;indoor_map&quot;: &quot;0&quot;,//是否有室内地图标志,1为有,0为没有
&quot;floor&quot;: &quot;&quot;,//楼层索引,一般会用数字表示,例如8;indoor_map为0时不返回
&quot;truefloor&quot;: &quot;&quot; //所在楼层,一般会带有字母,例如F8;indoor_map为0时不返回
}
}
]
}
}
</code></pre>
<h3>失败返回样例</h3>
<pre><code class="language-json">{
&quot;code&quot;: 400,
&quot;msg&quot;: &quot;查询关键词不能为空&quot;,
}</code></pre>
<h3>返回字段说明</h3>
<table>
<thead>
<tr>
<th>字段名</th>
<th><div style="width:400px">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>code</td>
<td>返回码,详见返回码说明</td>
</tr>
<tr>
<td>msg</td>
<td>code对应的描述</td>
</tr>
<tr>
<td>charge</td>
<td>计费标志</td>
</tr>
<tr>
<td>taskNo</td>
<td>本次请求号</td>
</tr>
<tr>
<td>data</td>
<td>返回具体结果,详见成功返回样例</td>
</tr>
</tbody>
</table>
<h4>code返回码说明</h4>
<table>
<thead>
<tr>
<th>code</th>
<th><div style="width:400px">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>200</td>
<td>成功(计费)</td>
</tr>
<tr>
<td>400</td>
<td>参数错误</td>
</tr>
<tr>
<td>500</td>
<td>系统维护,请稍候再试</td>
</tr>
<tr>
<td>601</td>
<td>接口未开通</td>
</tr>
<tr>
<td>602</td>
<td>账号停用</td>
</tr>
<tr>
<td>603</td>
<td>余额不足请充值</td>
</tr>
<tr>
<td>604</td>
<td>接口停用</td>
</tr>
<tr>
<td>606</td>
<td>调用超限,请稍候再试</td>
</tr>
<tr>
<td>607</td>
<td>ip不在白名单</td>
</tr>
<tr>
<td>609</td>
<td>请求过于频繁,请稍候再试</td>
</tr>
<tr>
<td>610</td>
<td>请求超时</td>
</tr>
<tr>
<td>999</td>
<td>其他,以实际返回为准</td>
</tr>
</tbody>
</table>