地点搜索-输入提示
<h3>接口描述</h3>
<ul>
<li>根据关键词返回提示地点列表。</li>
</ul>
<h3>请求地址</h3>
<p><code>https://api.jumdata.com/place/input-tips</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>查询关键词</td>
</tr>
<tr>
<td>type</td>
<td>String</td>
<td>否</td>
<td>分类,服务可支持传入多个分类,多个类型用 &#124; 分割</td>
</tr>
<tr>
<td>location</td>
<td>String</td>
<td>否</td>
<td>坐标,格式:“X,Y”(经度,纬度),不可以包含空格,建议使用location参数,可在此location附近优先返回搜索关键词信息,在请求参数city不为空时生效</td>
</tr>
<tr>
<td>city</td>
<td>String</td>
<td>否</td>
<td>搜索城市,可选值:citycode、adcode,不支持县级市。如:010/110000,填入此参数后,会尽量优先返回此城市数据,但是不一定仅局限此城市结果,若仅需要某个城市数据请调用citylimit参数</td>
</tr>
<tr>
<td>cityLimit</td>
<td>String</td>
<td>否</td>
<td>仅返回指定城市数据,可选值:true/false,默认false</td>
</tr>
<tr>
<td>dataType</td>
<td>String</td>
<td>否</td>
<td>返回的数据类型,多种数据类型用段落标记符号分隔,可选值:all-返回所有数据类型、poi-返回POI数据类型、bus-返回公交站点数据类型、busline-返回公交线路数据类型</td>
</tr>
</tbody>
</table>
<p>> type传参示例: “050301|050302”
> dataType传参示例: “bus|busline”
> type值详见:<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;天目山路518号&quot;,//详细地址
&quot;adcode&quot;: &quot;330106&quot;,//区域编码
&quot;district&quot;: &quot;浙江省杭州市西湖区&quot;,//所属区域
&quot;name&quot;: &quot;西溪国家湿地公园&quot;,//tip名称
&quot;location&quot;: &quot;120.061159,30.255079&quot;,//tip中心点坐标,当搜索数据为busline类型时,此字段不返回
&quot;id&quot;: &quot;B023B06P06&quot; //返回数据ID
}
]
}
}
</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>