Search API
Search API is a simple tool that lets you look up places on TripAdvisor.
You give it a search term (like “Eiffel Tower”) and it returns a list of matching locations.
You can also narrow the results by choosing a category (hotels, attractions, restaurants, or geos) and by setting a default currency and language for the data.
How it Works
When you run the component, it talks to TripAdvisor’s public API.
First, it uses the API key you stored in Nappai’s credentials.
Then it builds a request from the data you provide in the Input field.
If you give a query, the component sends that query to TripAdvisor, optionally adding a category, latitude/longitude, and radius if you supplied them.
The API returns a list of places that match, and the component adds that list to the output under the chosen category name.
Inputs
This component requires a TripAdvisor API credential.
- Go to Credentials in Nappai and add a new TripAdvisor API credential.
- In the component, choose that credential from the Credential dropdown.
Input Fields
-
Input: The data you want to search with.
You can paste a JSON string, use a Message, or provide a Data object.
The component looks for aquery
field inside this data and optionallylatitude
,longitude
, andradius_km
. -
Category: Select the type of places you want to find.
Options arehotels
,attractions
,restaurants
, orgeos
. -
Default Currency: Choose the currency that the API should use for prices.
The default isEUR
. -
Default Language: Pick the language for the results.
The default isen-US
.
Outputs
- Data: The component returns the original input data enriched with a new field named after the selected category.
That field contains the list of places returned by TripAdvisor.
Usage Example
- Add the component to your workflow.
- Configure the credential as described above.
- Set the inputs:
- Input:
{ "query": "Eiffel Tower", "latitude": 48.8584, "longitude": 2.2945, "radius_km": 5 }
- Category:
attractions
- Default Currency:
EUR
- Default Language:
en-US
- Input:
- Run the workflow.
The output will contain the original data plus anattractions
field with the list of nearby attractions.
Related Components
- TripAdvisor API – The base component that handles authentication and API communication.
- TripAdvisor Reviews – Retrieves reviews for a specific TripAdvisor location.
- TripAdvisor Photos – Fetches photos associated with a TripAdvisor location.
Tips and Best Practices
- Use a specific query (e.g., “Eiffel Tower”) to get more accurate results.
- If you want results near a particular place, always provide
latitude
,longitude
, andradius_km
. - Choose the currency that matches your target audience to avoid confusion.
- Keep the language consistent with the rest of your workflow for a smoother user experience.
Security Considerations
- Store your TripAdvisor API key in Nappai’s credential store; never hard‑code it in the workflow.
- The component automatically uses the credential you select, so the key is never exposed in the UI.
- If you share the workflow with others, they will need access to the same credential or you must create a new one for them.