聚美智数


地点搜索-输入提示

<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>&lt;div style=&quot;width:400px&quot;&gt;说明&lt;/div&gt;</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>分类,服务可支持传入多个分类,多个类型用 &amp;#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>&gt; type传参示例: “050301|050302” &gt; dataType传参示例: “bus|busline” &gt; 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> &gt; 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 = &amp;quot;xyzxy2121zxyz&amp;quot;; String timestamp = &amp;quot;1555378976238&amp;quot;; String appSecret = &amp;quot;efcefcef1121cefcefc1212121&amp;quot;; String str = appId + appSecret + timestamp; String sign = sha256(str);</code></pre> <h3>成功返回样例</h3> <pre><code class="language-json">{ &amp;quot;msg&amp;quot;: &amp;quot;成功&amp;quot;,//返回码对应描述 &amp;quot;code&amp;quot;: 200,//返回码,详见返回码说明 &amp;quot;taskNo&amp;quot;: &amp;quot;202960247220113090298671&amp;quot;,//本次请求号 &amp;quot;charge&amp;quot;: true,//计费标志 &amp;quot;data&amp;quot;: { &amp;quot;count&amp;quot;: &amp;quot;10&amp;quot;,//返回结果总数目 &amp;quot;list&amp;quot;: [//建议提示列表 { &amp;quot;address&amp;quot;: &amp;quot;天目山路518号&amp;quot;,//详细地址 &amp;quot;adcode&amp;quot;: &amp;quot;330106&amp;quot;,//区域编码 &amp;quot;district&amp;quot;: &amp;quot;浙江省杭州市西湖区&amp;quot;,//所属区域 &amp;quot;name&amp;quot;: &amp;quot;西溪国家湿地公园&amp;quot;,//tip名称 &amp;quot;location&amp;quot;: &amp;quot;120.061159,30.255079&amp;quot;,//tip中心点坐标,当搜索数据为busline类型时,此字段不返回 &amp;quot;id&amp;quot;: &amp;quot;B023B06P06&amp;quot; //返回数据ID } ] } } </code></pre> <h3>失败返回样例</h3> <pre><code class="language-json">{ &amp;quot;code&amp;quot;: 400, &amp;quot;msg&amp;quot;: &amp;quot;查询关键词不能为空&amp;quot;, }</code></pre> <h3>返回字段说明</h3> <table> <thead> <tr> <th>字段名</th> <th>&lt;div style=&quot;width:400px&quot;&gt;说明&lt;/div&gt;</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>&lt;div style=&quot;width:400px&quot;&gt;说明&lt;/div&gt;</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>

页面列表

ITEM_HTML