Restaurants

GRATIS CON POSSIBILITÀ DI UPGRADE
Da VidLab | Aggiornamento hace 2 meses | Search
Popolarità

9.4 / 10

Latenza

1,725ms

Livello di servizio

97%

Health Check

N/A

Torna a tutte le discussioni

Getting location_id from address / name

Rapid account: Nickmischke
nickmischke
hace 6 meses

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 hace 6 meses

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 hace 6 meses

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)

Partecipa alla discussione - aggiungi un commento di seguito:

Accedi/Iscriviti per pubblicare nuovi commenti