Restaurants

免费增值
通过 VidLab | 已更新 2달 전 | Search
人气

9.4 / 10

延迟

1,725ms

服务等级

97%

Health Check

N/A

返回所有讨论

Getting location_id from address / name

Rapid account: Nickmischke
nickmischke
6달 전

Hello,

I need assistance in retrieving the location_id for a specific restaurant. I have the following details available:

python
Copy code
starting_details = {
“name”: “Olive Garden Italian Restaurant”,
“formatted_address”: “538 W Main St, American Fork, UT 84003, United States”,
“geometry”: {
“location”: {“lat”: 40.377269, “lng”: -111.81243},
“viewport”: {
“northeast”: {“lat”: 40.37856612989272, “lng”: -111.8112685201073},
“southwest”: {“lat”: 40.37586647010728, “lng”: -111.8139681798927},
},
}
}
Could you please guide me on how to use these details to obtain the location_id for this restaurant using your API? Is there a specific endpoint or method I should use?

Thank you for your assistance.

Rapid account: Nickmischke
nickmischke Commented 6달 전

Thank you for your prompt response. I have a few follow-up questions regarding the use of the Typeahead endpoint:

Does the Typeahead endpoint support retrieving a specific restaurant using the details in my starting_details dictionary, or does it return a set of restaurants?

What are the available keys for the payload in the Typeahead endpoint? For example, can I use keys like ‘name’ and ‘address’ directly from my starting_details?

Is there more detailed documentation available for these endpoints, particularly for the keys that can/should be included in the payload of the endpoints?

I found the API playground on RapidAPI but haven’t come across detailed documentation. Any further assistance, link to detailed documentation or a code snippet illustrating the correct usage would be greatly appreciated.

Thank you

Rapid account: Ptwebsolution
ptwebsolution Commented 6달 전

Hi, this is the flow:

  1. call the Typeahead endpoint (to get the location id that will be used in the search endpoint)
  2. call the search endpoint (using the location id from the Typeahead endpoint result)
  3. Now, in the search results, you have the location_id of each restaurant.
  4. call the detail endpoint (using the location_id of each restaurant in the search result)

加入讨论 - 在下面添加评论:

登录/注册以发布新的评论