Search API
Search API searches TripAdvisor for places: hotels, attractions, restaurants or destinations. You give it what you want to find and, optionally, coordinates and a radius, and it returns the places TripAdvisor finds.
Use it as a first step to get the places and their identifiers, then ask for their details, reviews or photos with Locations Details.
When to use it
- Suggest restaurants near a traveler’s hotel.
- Prepare a list of a city’s attractions for a guide or a newsletter.
- Compare the hotels in an area before booking for a group.
- Give a virtual travel agent a way to search for real places.
Configuration
The component needs a TripAdvisor API credential with your TripAdvisor key. See Credentials.
| Field | What it does |
|---|---|
| Credential (required) | The TripAdvisor credential. |
| Input | The search data. Each item must include the query field with what you want to find. To search around a point, also add latitude, longitude and radius_km (the radius in kilometers). A plain text, such as a chat message, is used as the query. |
| Category | The kind of place to search for: hotels, attractions, restaurants or geos (destinations). Default: attractions. |
| Default Currency | The currency prices are shown in. Default: EUR. |
| Default Language | The language of the results. |
Output
The Data output returns the same items it received, each with a new field named after the chosen category (for example restaurants) that holds the places found with their TripAdvisor identifier.
Connect it to Locations Details to expand on each place, or to an agent that picks and presents the best options.
Example
An agency wants to suggest restaurants near each client’s hotel:
- Prepare an item with
query= “tapas” and the hotel’s latitude and longitude, withradius_km= 1. - Connect it to Input on Search API and choose restaurants in Category.
- Pass the result to an agent that writes a recommendation with three restaurants.
Related components
- Locations Details: gets the details, reviews or photos of a place.