首页 > 解决方案 > 如何从 algolia 地方搜索中获取 JSON?

问题描述

我正在关注 Algoias 的 Places 文档,我的输入是使用 Algolia API 引擎搜索城市,但我想从我的查询中获得 JSON 格式的响应(就像我在这个演示中看到的那样:https://community.algolia。 com/places/),我正在关注文档,但我真的很难坚持:(。

可能吗?

//This is my JS code, it just converts my input into a places search, I remove the AppId and the ApiKey just for show here!

var placesAutocomplete = places({
    appId: 'Here goes my AppId, I remove it for show here',
    apiKey: 'Here goes my ApiKey, I remove it for show here',
    container: document.querySelector('#address-input')
  });

标签: javascripthtmljsonapialgolia

解决方案


推荐阅读