Recommendations

Returns AI-powered Location recommendations for a natural-language query.

Accepts a free-text query plus optional geographic context, category filters, and a result limit, and returns a ranked set of recommended Locations (and Experiences), each with supporting review citations. Built on Tripadvisor's user-generated content and metadata for use in agentic workflows.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Overview

This endpoint processes free-text queries and returns contextually relevant location recommendations with supporting review citations. It combines Tripadvisor's vast database of locations with AI-powered search to understand user intent and deliver personalized results.

Key Features

  • Natural Language Processing: Understands complex, conversational queries
  • Review-Based Citations: Provides specific review snippets that justify each recommendation
  • Flexible Geography: Supports destination names, geo IDs, or precise coordinate-based searches
  • Category Filtering: Focus results on specific types of locations (restaurants, hotels, attractions, etc.)
  • Agentic-Friendly: Optimized response format for AI agent consumption and decision-making

Use Cases

robot
AI Travel Assistants

Build conversational travel bots that can understand queries like "romantic dinner spots in Paris" and provide specific restaurant recommendations with review-backed justifications.

route
Personalized Itinerary Builders

Create dynamic itinerary systems that adapt recommendations based on user preferences, travel style, and specific requirements mentioned in natural language.

building
Enterprise Travel Tools

Integrate into business travel platforms to provide curated recommendations for corporate travelers based on expense policies and preferences.

Request Examples

Simple Query by City Name

{
  "query": "best pizza places for a casual date night",
  "geo": {
    "name": "New York City"
  },
  "limit": 5
}

Advanced Query with Coordinates

{
  "query": "family-friendly attractions that are good for kids under 10",
  "geo": {
    "search_area": {
      "centroid_latitude": 40.7589,
      "centroid_longitude": -73.9851,
      "search_radius_meters": 5000
    }
  },
  "top_level_categories": ["Attraction"],
  "limit": 8,
  "response_preference": "quality"
}

Category-Filtered Search

{
  "query": "upscale restaurants with great wine selection",
  "geo": {
    "geo_id": 187147
  },
  "top_level_categories": ["Eat & Drink"],
  "limit": 3,
  "exclude_location_ids": [123456, 789012]
}

Error Handling

The API returns structured error responses with specific codes and messages:

Typical Error Responses

{
  "message": "Invalid request parameters",
  "type": "validation_error", 
  "code": "INVALID_PARAMETERS"
}

Best Practices for Agentic Workflows

Query Optimization

searchCrafting Effective Queries

Do:

  • Use natural, conversational language
  • Include context about the user's intent or preferences
  • Specify constraints like "family-friendly" or "budget-conscious"
  • Mention specific requirements or accessibility needs

Examples:

  • ✅ "romantic restaurants with outdoor seating for anniversary dinner"
  • ✅ "kid-friendly museums that are interactive and educational"
  • ❌ "restaurants" (too vague)
  • ❌ "food places" (lacks context)

Response Processing

quote-rightLeveraging Review Citations

The review_sources array provides valuable context for AI agents:

  1. Quality Assessment: Use review snippets to understand why a location was recommended
  2. User Matching: Match review content to user preferences mentioned in the query
  3. Confidence Scoring: Locations with more relevant review citations may be better matches
  4. Explanation Generation: Use snippets to explain recommendations to end users

Example Usage:

def explain_recommendation(result):
    location_name = result['location']['names'][0]['value']
    citations = result['review_sources']
    
    explanation = f"I recommend {location_name} because:"
    for citation in citations[:2]:  # Use top 2 citations
        explanation += f"\n- {citation['snippet']}"
    
    return explanation

Performance Optimization

Response Preference Settings:

  • Use "speed" for real-time chat applications
  • Use "quality" for detailed recommendation engines
  • Default "quality" provides best results for most use cases

Pagination Strategy:

  • Start with limit: 5 for initial results
  • Use exclude_location_ids to get additional results
  • Cache results to avoid duplicate API calls

Rate Limits

  • Standard Plans: 10 requests per second
  • Enterprise Plans: Custom rate limits available

Getting Started

  1. Obtain API Key: Currently, the Agentic Search service is available as a per-request basis until a self-service sign-up is released in 2026 Q1. Contact your Tripadvisor representative for access.
  2. Test with Simple Queries: Start with basic location searches to understand response format
  3. Integrate Review Citations: Build logic to process and present review-based justifications
  4. Optimize for Your Use Case: Adjust response_preference and filtering based on your application needs

Support

For technical support or questions about implementation:

  • Contact your Tripadvisor technical account manager
  • Use our developer support portal for API-specific questions
Query Params
locale
array of strings

preferred locales for localized fields in the recommended results, in priority order;
falls back to the default locale when omitted

locale
Body Params
exclude_location_ids
array of int32s

List of location ids to filter from the response set. Can be used to simulate pagination.

Exclude Location Ids
geo
object
required
int32
Defaults to 5

Maximum number of locations to return.

string
required

Free-text search query from the user. If no destination name, geo_id, or search area is provided,
Tripadvisor will attempt to infer the destination context from the free-text query.

string
enum
Defaults to quality
Allowed:
top_level_categories
array of objects, unique

A set of top level categories (aka PlaceTypes) to filter or focus the search
(e.g., ['Eat & Drink', 'Accommodation'], ['Attraction']).

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/problem+json