openapi: 3.0.0
info:
  title: Tripadvisor Place API
  description: |
    Retrieve detailed information about a specific place on Tripadvisor by its place ID.

    The response varies based on the place type:
    - **Attraction**: Activities, tours, and things to do with listings and questions
    - **AttractionProduct**: Bookable tours and experiences with pricing, itinerary, and operator details
    - **Destination**: Cities, regions, and countries with travel advice, itineraries, and tips
    - **Hotel**: Accommodations with booking options, amenities, and room details
    - **Restaurant**: Dining establishments with menus, cuisines, and reservation status
    - **Airline**: Airlines with alliance info and subratings
  version: 1.0.0
servers:
  - url: https://www.searchapi.io/api/v1
paths:
  /search:
    get:
      summary: Tripadvisor Place
      security:
        - ApiKeyAuth: []
        - ApiKeyQuery: []
      parameters:
        - name: engine
          in: query
          required: true
          description: Search engine identifier
          schema:
            type: string
            enum: ["tripadvisor_place"]
            default: "tripadvisor_place"
        - name: place_id
          in: query
          required: true
          description: Tripadvisor place ID. Can be found from tripadvisor search API response.
          schema:
            type: string
        - name: tripadvisor_domain
          in: query
          required: false
          description: Tripadvisor domain for localized results
          schema:
            type: string
            enum: ["tripadvisor.com", "ar.tripadvisor.com", "tripadvisor.com.ar", "tripadvisor.com.au", "tripadvisor.at", "tripadvisor.be", "fr.tripadvisor.be", "tripadvisor.com.br", "tripadvisor.ca", "fr.tripadvisor.ca", "tripadvisor.cl", "cn.tripadvisor.com", "tripadvisor.co", "tripadvisor.dk", "tripadvisor.com.eg", "tripadvisor.fr", "tripadvisor.de", "tripadvisor.com.gr", "tripadvisor.com.hk", "en.tripadvisor.com.hk", "tripadvisor.in", "tripadvisor.co.id", "tripadvisor.ie", "tripadvisor.co.il", "tripadvisor.it", "tripadvisor.jp", "tripadvisor.com.my", "tripadvisor.com.mx", "tripadvisor.nl", "tripadvisor.co.nz", "no.tripadvisor.com", "tripadvisor.com.pe", "tripadvisor.com.ph", "tripadvisor.pt", "tripadvisor.ru", "tripadvisor.com.sg", "tripadvisor.co.za", "tripadvisor.co.kr", "tripadvisor.es", "tripadvisor.se", "tripadvisor.ch", "fr.tripadvisor.ch", "it.tripadvisor.ch", "tripadvisor.com.tw", "th.tripadvisor.com", "tripadvisor.com.tr", "tripadvisor.co.uk", "tripadvisor.com.ve", "tripadvisor.com.vn"]
            default: "tripadvisor.com"
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlaceResponse'
        '400':
          description: Validation Error. There is an issue with query parameters, such as missing required parameters or invalid values.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication Error. The API key is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate Limit Exceeded. The number of allowed requests has been exceeded. Consider upgrading your plan or waiting for the limit to reset.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error. Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Timeout. We could not retrieve results in 90 seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Use Bearer authentication. Format: "Bearer YOUR_API_KEY"'
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api_key
      description: Pass API key as query parameter
  schemas:
    PlaceResponse:
      type: object
      properties:
        search_metadata:
          $ref: '#/components/schemas/SearchMetadata'
        search_parameters:
          $ref: '#/components/schemas/SearchParameters'
        search_information:
          $ref: '#/components/schemas/SearchInformation'
        place:
          $ref: '#/components/schemas/Place'
        related_links:
          type: array
          description: Related navigation links
          items:
            $ref: '#/components/schemas/RelatedLink'
        error:
          type: string
          description: Error message when no results are found

    SearchMetadata:
      type: object
      required: [id, status, created_at]
      properties:
        id:
          type: string
          description: Unique identifier for the search request
        status:
          type: string
          description: Status of the search request
        created_at:
          type: string
          format: date-time
          description: Timestamp when the search was created
        request_time_taken:
          type: number
          description: Time taken to make the request in seconds
        parsing_time_taken:
          type: number
          description: Time taken to parse the results in seconds
        total_time_taken:
          type: number
          description: Total time taken for the search in seconds
        request_url:
          type: string
          description: Tripadvisor URL for this place
        html_url:
          type: string
          description: URL to view HTML results
        json_url:
          type: string
          description: URL to view JSON results

    SearchParameters:
      type: object
      properties:
        engine:
          type: string
          description: Search engine used
        place_id:
          type: string
          description: Tripadvisor place ID
        tripadvisor_domain:
          type: string
          description: Tripadvisor domain searched

    SearchInformation:
      type: object
      properties:
        language:
          type: string
          description: Language code of the response
        language_name:
          type: string
          description: Full language name of the response
        currency:
          type: string
          description: Currency used in the response
        region:
          type: string
          description: Region of the response

    RelatedLink:
      type: object
      properties:
        position:
          type: integer
          description: Position in the list
        title:
          type: string
          description: Link title
        link:
          type: string
          description: URL of the related link

    Place:
      type: object
      description: |
        Place details object. Fields vary by type (Attraction, Destination, Hotel, Restaurant, Airline).
        All fields are optional since they depend on the place type and data availability.
      properties:
        # Shared fields
        place_id:
          type: integer
          description: Unique Tripadvisor place identifier
        type:
          type: string
          description: Type of place
          enum: ["Attraction", "Destination", "Hotel", "Restaurant", "Airline"]
        title:
          type: string
          description: Name of the place
        link:
          type: string
          description: URL to the place on Tripadvisor
        description:
          type: string
          description: Description of the place
        ranking:
          $ref: '#/components/schemas/Ranking'
        award:
          $ref: '#/components/schemas/Award'
        thumbnail:
          type: string
          description: URL of the place thumbnail image
        price_range:
          type: string
          description: Price range indicator
        phone:
          type: string
          description: Phone number
        email:
          type: string
          description: Email address
        website:
          type: string
          description: Official website URL
        is_open:
          type: boolean
          description: Whether the place is currently open
        is_closed:
          type: boolean
          description: Whether the place is currently closed
        open_hours:
          type: array
          description: Operating hours by day
          items:
            $ref: '#/components/schemas/OpenHours'
        address:
          $ref: '#/components/schemas/Address'
        neighbourhood:
          $ref: '#/components/schemas/Neighbourhood'
        neighbourhoods:
          type: array
          description: List of neighbourhood names
          items:
            type: string
        gps_coordinates:
          $ref: '#/components/schemas/GpsCoordinates'
        walk_score:
          type: integer
          description: Walk score rating
        getting_there:
          type: array
          description: Transportation options to reach the place
          items:
            $ref: '#/components/schemas/GettingThere'
        rating:
          type: number
          description: Average rating score
        reviews:
          type: integer
          description: Total number of reviews
        reviews_histogram:
          $ref: '#/components/schemas/ReviewsHistogram'
        ai_review_summary:
          $ref: '#/components/schemas/AiReviewSummary'
        all_reviews:
          type: array
          description: List of reviews
          items:
            $ref: '#/components/schemas/Review'
        nearby:
          $ref: '#/components/schemas/Nearby'
        suggestions:
          $ref: '#/components/schemas/Suggestions'
        articles:
          type: array
          description: Related articles
          items:
            $ref: '#/components/schemas/Article'
        photo_count:
          type: integer
          description: Total number of photos
        photos:
          type: array
          description: Place photos
          items:
            $ref: '#/components/schemas/Photo'
        videos:
          type: array
          description: Place videos
          items:
            $ref: '#/components/schemas/Video'

        # Attraction fields
        duration:
          type: string
          description: Suggested visit duration. Applies to Attraction and AttractionProduct types.
        price:
          type: string
          description: Price string (e.g. "$64", "from $116.75"). Applies to Attraction type.
        extracted_price:
          type: number
          description: Extracted price as a number. Applies to Attraction type.
        attraction_listings:
          type: array
          description: Sections of attraction listings. Applies to Attraction type.
          items:
            $ref: '#/components/schemas/AttractionListingSection'
        questions:
          type: array
          description: Questions and answers. Applies to Attraction and AttractionProduct types.
          items:
            $ref: '#/components/schemas/Question'

        # AttractionProduct fields
        status:
          type: string
          description: Product availability status. Applies to AttractionProduct type.
        total_bookings:
          type: integer
          description: Total number of bookings. Applies to AttractionProduct type.
        booking_options:
          description: Booking options and pricing. Structure differs by place type.
          oneOf:
            - $ref: '#/components/schemas/AttractionProductBookingOptions'
            - $ref: '#/components/schemas/HotelBookingOptions'
        traveler_requirements:
          type: string
          description: Requirements for travelers. Applies to AttractionProduct type.
        extracted_duration_minutes:
          type: integer
          description: Duration in minutes. Applies to AttractionProduct type.
        start_time:
          type: string
          description: Tour start time. Applies to AttractionProduct type.
        tour_guide_languages:
          type: array
          description: Languages spoken by tour guides. Applies to AttractionProduct type.
          items:
            type: string
        written_guide_languages:
          type: array
          description: Languages available for written guides. Applies to AttractionProduct type.
          items:
            type: string
        highlights:
          type: array
          description: Tour highlights. Applies to AttractionProduct type.
          items:
            type: string
        inclusions:
          type: array
          description: What is included. Applies to AttractionProduct type.
          items:
            type: string
        exclusions:
          type: array
          description: What is not included. Applies to AttractionProduct type.
          items:
            type: string
        what_to_expect:
          type: array
          description: What to expect stops or description. Applies to AttractionProduct type.
          items:
            $ref: '#/components/schemas/WhatToExpectStop'
        pickup:
          $ref: '#/components/schemas/Pickup'
        meeting_point:
          $ref: '#/components/schemas/MeetingPoint'
        accessibility:
          type: array
          description: Accessibility information. Applies to AttractionProduct type.
          items:
            type: string
        additional_info:
          type: array
          description: Additional information items. Applies to AttractionProduct type.
          items:
            type: string
        cancellation_policy:
          $ref: '#/components/schemas/CancellationPolicy'
        itinerary:
          type: array
          description: Tour itinerary stops. Applies to AttractionProduct type.
          items:
            $ref: '#/components/schemas/ItineraryStop'
        is_skip_the_line:
          type: boolean
          description: Whether skip-the-line access is included. Applies to AttractionProduct type.
        is_private_tour:
          type: boolean
          description: Whether this is a private tour. Applies to AttractionProduct type.
        operator:
          $ref: '#/components/schemas/Operator'

        # Destination fields
        travel_advice:
          type: array
          description: Travel advice links. Applies to Destination type.
          items:
            $ref: '#/components/schemas/TravelAdvice'
        itineraries:
          type: array
          description: Suggested itineraries. Applies to Destination type.
          items:
            $ref: '#/components/schemas/Itinerary'
        tour_recommendation:
          $ref: '#/components/schemas/TourRecommendation'
        trip_recommendations:
          type: array
          description: Trip recommendations from other travelers. Applies to Destination type.
          items:
            $ref: '#/components/schemas/TripRecommendation'
        collections:
          type: array
          description: Curated collections. Applies to Destination type.
          items:
            $ref: '#/components/schemas/Collection'
        travelers_tips:
          type: array
          description: Tips from travelers. Applies to Destination type.
          items:
            $ref: '#/components/schemas/TravelerTip'
        useful_information:
          type: array
          description: Useful information Q&A. Applies to Destination type.
          items:
            $ref: '#/components/schemas/UsefulInformation'
        faq:
          type: array
          description: Frequently asked questions. Applies to Destination type.
          items:
            $ref: '#/components/schemas/Faq'

        # Hotel fields
        rooms:
          type: integer
          description: Number of rooms. Applies to Hotel type.
        min_price:
          type: integer
          description: Minimum price. Applies to Hotel type.
        max_price:
          type: integer
          description: Maximum price. Applies to Hotel type.
        subratings:
          type: array
          description: Category-specific ratings. Applies to Hotel, Restaurant, and Airline types.
          items:
            $ref: '#/components/schemas/Subrating'
        amenities:
          type: array
          description: Hotel amenities. Applies to Hotel type.
          items:
            $ref: '#/components/schemas/Amenity'
        room_features:
          type: array
          description: Room features. Applies to Hotel type.
          items:
            type: string
        room_types:
          type: array
          description: Available room types. Applies to Hotel type.
          items:
            type: string
        hotel_class:
          type: string
          description: Hotel classification text. Applies to Hotel type.
        extracted_hotel_class:
          type: integer
          description: Numeric hotel class. Applies to Hotel type.
        hotel_style:
          type: array
          description: Hotel style rankings. Applies to Hotel type.
          items:
            $ref: '#/components/schemas/HotelStyle'
        languages_spoken:
          type: array
          description: Languages spoken at the hotel. Applies to Hotel type.
          items:
            type: string

        # Restaurant fields
        is_owner_verified:
          type: boolean
          description: Whether the owner has verified the listing. Applies to Restaurant type.
        is_accepting_reservations:
          type: boolean
          description: Whether reservations are accepted. Applies to Restaurant type.
        offers:
          type: array
          description: Special offers. Applies to Restaurant type.
          items:
            $ref: '#/components/schemas/RestaurantOffer'
        menu:
          $ref: '#/components/schemas/Menu'
        categories:
          type: array
          description: Restaurant categories. Applies to Restaurant type.
          items:
            $ref: '#/components/schemas/Category'
        cuisines:
          type: array
          description: Cuisine types. Applies to Restaurant type.
          items:
            type: string
        diets:
          type: array
          description: Dietary options available. Applies to Restaurant type.
          items:
            type: string
        meal_types:
          type: array
          description: Types of meals served. Applies to Restaurant type.
          items:
            type: string
        dining_options:
          type: array
          description: Dining options available. Applies to Restaurant type.
          items:
            type: string
        open_status:
          type: string
          description: Current open status text. Applies to Restaurant type.
        is_permanently_closed:
          type: boolean
          description: Whether the restaurant is permanently closed. Applies to Restaurant type.
        minutes_to_until_open:
          type: integer
          description: Minutes until the restaurant opens. Applies to Restaurant type.
        minutes_to_until_close:
          type: integer
          description: Minutes until the restaurant closes. Applies to Restaurant type.

        review_snippets:
          type: array
          description: Highlighted review quotes. Applies to Restaurant type.
          items:
            $ref: '#/components/schemas/ReviewSnippet'

        # Airline fields
        tips:
          type: integer
          description: Number of tips. Applies to Airline type.
        headquarters_address:
          type: string
          description: Headquarters address. Applies to Airline type.
        favicon:
          type: string
          description: URL of the airline favicon. Applies to Airline type.
        alliance:
          $ref: '#/components/schemas/Alliance'

    # Reusable schemas

    Author:
      type: object
      properties:
        name:
          type: string
          description: Author's display name
        username:
          type: string
          description: Author's username
        contributions:
          type: integer
          description: Number of contributions
        hometown:
          type: string
          description: Author's hometown
        link:
          type: string
          description: URL to author's profile
        avatar:
          type: string
          description: URL of author's avatar

    GpsCoordinates:
      type: object
      properties:
        latitude:
          type: number
          description: Latitude coordinate
        longitude:
          type: number
          description: Longitude coordinate

    Ranking:
      type: object
      properties:
        text:
          type: string
          description: Ranking text
        position:
          type: integer
          description: Ranking position
        total:
          type: integer
          description: Total number of ranked items
        link:
          type: string
          description: URL to ranking page

    Award:
      type: object
      properties:
        title:
          type: string
          description: Award title
        description:
          type: string
          description: Award description
        year:
          type: integer
          description: Award year

    Address:
      type: object
      properties:
        street:
          type: string
          description: Street address
        locality:
          type: string
          description: City or locality
        region:
          type: string
          description: State or region
        postal_code:
          type: string
          description: Postal or ZIP code
        country_code:
          type: string
          description: Country code

    Neighbourhood:
      type: object
      properties:
        name:
          type: string
          description: Neighbourhood name
        description:
          type: string
          description: Neighbourhood description
        getting_there:
          type: array
          description: Getting-there travel info for this neighbourhood (when available on attraction responses)
          items:
            $ref: '#/components/schemas/GettingThere'

    OpenHours:
      type: object
      properties:
        day:
          type: string
          description: Day of the week
        intervals:
          type: array
          description: Open/close time intervals
          items:
            type: object
            properties:
              hours:
                type: string
                description: Raw hours string (e.g. "9:00 AM - 10:00 PM")
              extracted_open_time:
                type: string
                description: Opening time
              extracted_close_time:
                type: string
                description: Closing time

    GettingThere:
      type: object
      properties:
        from:
          type: string
          description: Starting point
        time_distance:
          type: string
          description: Time or distance text
        extracted_time_distance:
          type: number
          description: Extracted time distance in minutes

    ReviewsHistogram:
      type: object
      description: Review count distribution by star rating
      properties:
        1:
          type: integer
          description: Number of 1-star reviews
        2:
          type: integer
          description: Number of 2-star reviews
        3:
          type: integer
          description: Number of 3-star reviews
        4:
          type: integer
          description: Number of 4-star reviews
        5:
          type: integer
          description: Number of 5-star reviews

    AiReviewSummary:
      type: object
      properties:
        summary:
          type: string
          description: AI-generated review summary
        review_count:
          type: integer
          description: Number of reviews analyzed
        attributes:
          type: array
          description: Review attributes identified by AI
          items:
            type: object
            properties:
              attribute:
                type: string
                description: Attribute name
              opinion:
                type: string
                description: Overall opinion
              summary:
                type: string
                description: Summary of opinions

    Review:
      type: object
      properties:
        id:
          type: integer
          description: Review identifier
        title:
          type: string
          description: Review title
        text:
          type: string
          description: Review text content
        language:
          type: string
          description: Language of the review
        original_language:
          type: string
          description: Original language if translated
        rating:
          type: integer
          description: Rating given by reviewer
        votes:
          type: integer
          description: Number of helpful votes
        date:
          type: string
          description: Review date
        travel_date:
          type: string
          description: Date of travel
        travel_type:
          type: string
          description: Type of travel
        author:
          $ref: '#/components/schemas/Author'
        photos:
          type: array
          description: Photos attached to the review
          items:
            type: object
            properties:
              original:
                type: string
                description: URL of the original photo
              thumbnail:
                type: string
                description: URL of the thumbnail

    Nearby:
      type: object
      properties:
        airports:
          type: array
          description: Nearby airports
          items:
            $ref: '#/components/schemas/NearbyAirport'
        transit:
          type: array
          description: Nearby transit options
          items:
            $ref: '#/components/schemas/NearbyTransit'
        restaurants:
          type: array
          description: Nearby restaurants
          items:
            $ref: '#/components/schemas/NearbyItem'
        attractions:
          type: array
          description: Nearby attractions
          items:
            $ref: '#/components/schemas/NearbyItem'
        hotels:
          type: array
          description: Nearby hotels
          items:
            $ref: '#/components/schemas/NearbyItem'

    NearbyAirport:
      type: object
      properties:
        from:
          type: string
          description: Airport name
        place_id:
          type: integer
          description: Tripadvisor place ID of the airport
        distance:
          type: string
          description: Distance text
        extracted_distance:
          type: number
          description: Extracted numeric distance
        distance_unit:
          type: string
          description: Distance unit

    NearbyTransit:
      type: object
      properties:
        from:
          type: string
          description: Transit station name
        description:
          type: string
          description: Transit description
        distance:
          type: string
          description: Distance text
        extracted_distance:
          type: number
          description: Extracted numeric distance
        distance_unit:
          type: string
          description: Distance unit

    NearbyItem:
      type: object
      properties:
        place_id:
          type: integer
          description: Tripadvisor place ID
        title:
          type: string
          description: Place name
        link:
          type: string
          description: URL to the place
        rating:
          type: number
          description: Average rating
        reviews:
          type: integer
          description: Number of reviews
        distance:
          type: string
          description: Distance text
        extracted_distance:
          type: number
          description: Extracted numeric distance
        distance_unit:
          type: string
          description: Distance unit
        thumbnail:
          type: string
          description: URL of the thumbnail image
        extensions:
          type: array
          description: Additional details
          items:
            type: string

    Suggestions:
      type: object
      description: Suggested places nearby
      properties:
        attractions:
          type: array
          description: Suggested attractions
          items:
            $ref: '#/components/schemas/SuggestedAttraction'
        restaurants:
          type: array
          description: Suggested restaurants
          items:
            $ref: '#/components/schemas/SuggestedRestaurant'
        hotels:
          type: array
          description: Suggested hotels
          items:
            $ref: '#/components/schemas/SuggestedHotel'
        destinations:
          $ref: '#/components/schemas/SuggestedDestinations'
        attractions_link:
          type: string
          description: URL to view all suggested attractions
        restaurants_link:
          type: string
          description: URL to view all suggested restaurants
        hotels_link:
          type: string
          description: URL to view all suggested hotels

    SuggestedAttraction:
      type: object
      properties:
        place_id:
          type: integer
          description: Tripadvisor place ID
        title:
          type: string
          description: Attraction name
        link:
          type: string
          description: URL to the attraction
        full_address:
          type: string
          description: Full street address
        rating:
          type: number
          description: Average rating
        reviews:
          type: integer
          description: Number of reviews
        category:
          type: string
          description: Attraction category
        tags:
          type: array
          description: Attraction type and category tags
          items:
            type: string
        price:
          type: string
          description: Price text
        extracted_price:
          type: number
          description: Extracted numeric price
        thumbnail:
          oneOf:
            - type: string
              description: URL of the thumbnail image
            - $ref: '#/components/schemas/ThumbnailObject'

    SuggestedRestaurant:
      type: object
      properties:
        place_id:
          type: integer
          description: Tripadvisor place ID
        title:
          type: string
          description: Restaurant name
        link:
          type: string
          description: URL to the restaurant
        full_address:
          type: string
          description: Full street address
        rating:
          type: number
          description: Average rating
        reviews:
          type: integer
          description: Number of reviews
        cuisines:
          type: array
          description: Cuisine types
          items:
            type: string
        price_range:
          type: string
          description: Price range indicator
        price_range_description:
          type: string
          description: Localized price level description
        diets:
          type: array
          description: Dietary options available
          items:
            type: string
        thumbnail:
          oneOf:
            - type: string
              description: URL of the thumbnail image
            - $ref: '#/components/schemas/ThumbnailObject'

    SuggestedHotel:
      type: object
      properties:
        place_id:
          type: integer
          description: Tripadvisor place ID
        title:
          type: string
          description: Hotel name
        link:
          type: string
          description: URL to the hotel
        full_address:
          type: string
          description: Full street address
        rating:
          type: number
          description: Average rating
        reviews:
          type: integer
          description: Number of reviews
        price_by_night:
          type: integer
          description: Median price per night
        thumbnail:
          $ref: '#/components/schemas/ThumbnailObject'

    SuggestedDestinations:
      type: object
      properties:
        title:
          type: string
          description: Section title
        items:
          type: array
          description: Suggested destination items
          items:
            $ref: '#/components/schemas/SuggestedDestinationItem'

    SuggestedDestinationItem:
      type: object
      properties:
        place_id:
          type: integer
          description: Tripadvisor place ID
        title:
          type: string
          description: Destination name
        link:
          type: string
          description: URL to the destination
        thumbnail:
          $ref: '#/components/schemas/ThumbnailObject'

    ThumbnailObject:
      type: object
      description: Thumbnail image with dimensions
      properties:
        link:
          type: string
          description: URL of the thumbnail image
        width:
          type: integer
          description: Image width in pixels
        height:
          type: integer
          description: Image height in pixels

    Article:
      type: object
      properties:
        title:
          type: string
          description: Article title
        link:
          type: string
          description: URL to the article
        description:
          type: string
          description: Article description
        thumbnail:
          type: string
          description: URL of the article thumbnail

    Photo:
      type: object
      properties:
        title:
          type: string
          description: Photo caption
        author:
          $ref: '#/components/schemas/Author'
        original:
          type: string
          description: URL of the original photo
        thumbnail:
          type: string
          description: URL of the thumbnail

    Video:
      type: object
      properties:
        title:
          type: string
          description: Video title
        description:
          type: string
          description: Video description
        link:
          type: string
          description: URL to the video
        duration:
          type: string
          description: Video duration
        upload_date:
          type: string
          description: Upload date
        thumbnail:
          type: string
          description: URL of the video thumbnail

    # Attraction-specific schemas

    AttractionListingSection:
      type: object
      properties:
        title:
          type: string
          description: Section title
        items:
          type: array
          description: Listing items in this section
          items:
            $ref: '#/components/schemas/AttractionListingItem'

    AttractionListingItem:
      type: object
      properties:
        place_id:
          type: integer
          description: Tripadvisor place ID
        title:
          type: string
          description: Listing title
        link:
          type: string
          description: URL to the listing
        rating:
          type: number
          description: Average rating
        reviews:
          type: integer
          description: Number of reviews
        price:
          type: string
          description: Price text (e.g. "$64", "from $116.75")
        extracted_price:
          type: number
          description: Extracted numeric price value
        duration:
          type: string
          description: Duration text
        category:
          type: string
          description: Listing category
        subcategory:
          type: string
          description: Listing subcategory
        labels:
          type: array
          description: Labels and badges
          items:
            type: string
        thumbnail:
          type: string
          description: URL of the thumbnail image

    Question:
      type: object
      properties:
        question:
          type: string
          description: Question text
        date:
          type: string
          description: Date the question was asked
        author:
          $ref: '#/components/schemas/Author'
        top_answer:
          type: object
          description: Top answer to the question
          properties:
            text:
              type: string
              description: Answer text
            date:
              type: string
              description: Date the answer was given
            author:
              $ref: '#/components/schemas/Author'

    # AttractionProduct-specific schemas

    AttractionProductBookingOptions:
      type: object
      description: Booking options for an attraction product
      properties:
        ticket_type:
          type: string
          description: Type of ticket
        from_price:
          type: string
          description: Starting price text
        extracted_from_price:
          type: number
          description: Extracted starting price value
        original_price:
          type: string
          description: Original price text before discount
        extracted_original_price:
          type: number
          description: Extracted original price value
        is_per_group_pricing:
          type: boolean
          description: Whether pricing is per group
        special_offer_end_date:
          type: string
          description: End date of special offer
        max_travelers:
          type: integer
          description: Maximum number of travelers
        requires_adult:
          type: boolean
          description: Whether an adult is required
        age_bands:
          type: array
          description: Age band definitions
          items:
            $ref: '#/components/schemas/AgeBand'
        is_tiered_pricing:
          type: boolean
          description: Whether tiered pricing is used
        price_options:
          type: array
          description: Price options by grade
          items:
            $ref: '#/components/schemas/PriceOption'
        payment_options:
          type: array
          description: Available payment options
          items:
            type: string
        confirmation_type:
          type: string
          description: Booking confirmation type
        price_calendar:
          type: array
          description: Price calendar entries
          items:
            $ref: '#/components/schemas/PriceCalendar'

    AgeBand:
      type: object
      properties:
        type:
          type: string
          description: Age band type
        min_age:
          type: integer
          description: Minimum age
        max_age:
          type: integer
          description: Maximum age

    PriceOption:
      type: object
      properties:
        grade:
          type: string
          description: Price grade
        prices:
          type: array
          description: Prices for this grade
          items:
            type: object
            properties:
              type:
                type: string
                description: Price type
              price:
                type: number
                description: Price amount
              special_price:
                type: number
                description: Special discounted price

    PriceCalendar:
      type: object
      properties:
        start_date:
          type: string
          description: Start date of the period
        end_date:
          type: string
          description: End date of the period
        price:
          type: string
          description: Price for this period

    Pickup:
      type: object
      description: Pickup information. Applies to AttractionProduct type.
      properties:
        type:
          type: string
          description: Pickup type
        start:
          type: string
          description: Pickup start location
        details:
          type: array
          description: Pickup details
          items:
            type: string
        additional_information:
          type: object
          description: Additional pickup information
          properties:
            title:
              type: string
              description: Information title
            description:
              type: string
              description: Information description
        is_ends_at_start_point:
          type: boolean
          description: Whether the tour ends at the start point

    MeetingPoint:
      type: object
      description: Meeting point information. Applies to AttractionProduct type.
      properties:
        type:
          type: string
          description: Meeting point type
        place:
          type: string
          description: Meeting place name
        gps_coordinates:
          $ref: '#/components/schemas/GpsCoordinates'
        instructions:
          type: array
          description: Meeting point instructions
          items:
            type: string

    CancellationPolicy:
      type: object
      description: Cancellation policy. Applies to AttractionProduct type.
      properties:
        type:
          type: string
          description: Cancellation policy type
        has_free_cancellation:
          type: boolean
          description: Whether free cancellation is available
        free_cancellation_days_before:
          type: integer
          description: Number of days before start for free cancellation

    WhatToExpectStop:
      type: object
      properties:
        order:
          type: integer
          description: Stop order in itinerary
        title:
          type: string
          description: Stop title
        description:
          type: string
          description: Stop description
        duration_minutes:
          type: integer
          description: Duration at stop in minutes
        has_admission_included:
          type: boolean
          description: Whether admission is included at this stop
        gps_coordinates:
          $ref: '#/components/schemas/GpsCoordinates'

    ItineraryStop:
      type: object
      properties:
        order:
          type: integer
          description: Stop order in itinerary
        place_id:
          type: integer
          description: Tripadvisor place ID of the stop
        title:
          type: string
          description: Stop title
        description:
          type: string
          description: Stop description
        admission:
          type: string
          description: Admission information
        duration_minutes:
          type: integer
          description: Duration at stop in minutes
        gps_coordinates:
          $ref: '#/components/schemas/GpsCoordinates'

    Operator:
      type: object
      description: Tour operator information. Applies to AttractionProduct type.
      properties:
        title:
          type: string
          description: Operator name
        link:
          type: string
          description: URL to operator page
        location:
          type: string
          description: Operator location
        thumbnail:
          type: string
          description: URL of operator image
        ranking:
          $ref: '#/components/schemas/Ranking'
        rating:
          type: number
          description: Operator rating
        reviews:
          type: integer
          description: Number of operator reviews
        operator_reviews:
          type: array
          description: Reviews of the operator
          items:
            $ref: '#/components/schemas/OperatorReview'

    OperatorReview:
      type: object
      properties:
        title:
          type: string
          description: Review title
        text:
          type: string
          description: Review text
        rating:
          type: integer
          description: Rating given
        date:
          type: string
          description: Review date
        attraction:
          type: object
          description: Related attraction
          properties:
            name:
              type: string
              description: Attraction name
            place_id:
              type: integer
              description: Tripadvisor place ID
            link:
              type: string
              description: URL to the attraction
        author:
          type: object
          description: Review author
          properties:
            username:
              type: string
              description: Author's username

    # Destination-specific schemas

    TravelAdvice:
      type: object
      properties:
        title:
          type: string
          description: Advice title
        link:
          type: string
          description: URL to the advice page

    Itinerary:
      type: object
      properties:
        title:
          type: string
          description: Itinerary title
        description:
          type: string
          description: Itinerary description
        link:
          type: string
          description: URL to the itinerary
        is_ai_powered:
          type: boolean
          description: Whether the itinerary is AI-generated
        author:
          $ref: '#/components/schemas/Author'
        tags:
          type: array
          description: Itinerary tags
          items:
            type: string

    TourRecommendation:
      type: object
      description: Tour recommendation section. Applies to Destination type.
      properties:
        title:
          type: string
          description: Section title
        description:
          type: string
          description: Section description
        author:
          $ref: '#/components/schemas/Author'
        recommendations:
          type: array
          description: Recommended tours and places
          items:
            $ref: '#/components/schemas/TourRecommendationItem'

    TourRecommendationItem:
      type: object
      properties:
        place_id:
          type: integer
          description: Tripadvisor place ID
        title:
          type: string
          description: Recommendation title
        type:
          type: string
          description: Type of place
        link:
          type: string
          description: URL to the place
        description:
          type: string
          description: Recommendation description
        rating:
          type: number
          description: Average rating
        reviews:
          type: integer
          description: Number of reviews
        thumbnail:
          type: string
          description: URL of the thumbnail image

    TripRecommendation:
      type: object
      properties:
        trip_id:
          type: string
          description: Trip identifier
        title:
          type: string
          description: Trip title
        link:
          type: string
          description: URL to the trip
        thumbnail:
          type: string
          description: URL of the thumbnail image
        size:
          type: string
          description: Trip size or duration
        author:
          $ref: '#/components/schemas/Author'

    Collection:
      type: object
      properties:
        title:
          type: string
          description: Collection title
        description:
          type: string
          description: Collection description
        thumbnail:
          type: string
          description: URL of the collection thumbnail

    TravelerTip:
      type: object
      properties:
        text:
          type: string
          description: Tip text
        author:
          type: object
          description: Tip author
          properties:
            name:
              type: string
              description: Author's name
            username:
              type: string
              description: Author's username
            link:
              type: string
              description: URL to author's profile
            avatar:
              type: string
              description: URL of author's avatar

    UsefulInformation:
      type: object
      properties:
        question:
          type: string
          description: Information question
        answers:
          type: array
          description: Answers to the question
          items:
            type: object
            properties:
              title:
                type: string
                description: Answer title
              text:
                type: string
                description: Answer text

    Faq:
      type: object
      properties:
        is_ai_powered:
          type: boolean
          description: Whether the answer is AI-generated
        question:
          type: string
          description: FAQ question
        answers:
          type: array
          description: FAQ answers
          items:
            type: object
            properties:
              text:
                type: string
                description: Answer text
              items:
                type: array
                description: Related items in the answer
                items:
                  type: object
                  properties:
                    text:
                      type: string
                      description: Item text
                    link:
                      type: string
                      description: Item link

    # Hotel-specific schemas

    HotelBookingOptions:
      type: object
      description: Hotel booking options
      properties:
        check_in_date:
          type: string
          description: Check-in date
        check_out_date:
          type: string
          description: Check-out date
        rooms:
          type: integer
          description: Number of rooms
        guests:
          type: integer
          description: Number of guests
        adults:
          type: integer
          description: Number of adults
        children:
          type: integer
          description: Number of children
        deal:
          type: string
          description: Deal name
        deal_description:
          type: string
          description: Deal description
        offers:
          type: array
          description: Booking offers from providers
          items:
            $ref: '#/components/schemas/HotelOffer'

    HotelOffer:
      type: object
      properties:
        provider:
          type: string
          description: Booking provider name
        link:
          type: string
          description: URL to the offer
        price:
          type: string
          description: Price text
        extracted_price:
          type: number
          description: Extracted price value
        original_price:
          type: string
          description: Original price before discount
        extracted_original_price:
          type: number
          description: Extracted original price value
        is_lowest_price:
          type: boolean
          description: Whether this is the lowest price
        is_available:
          type: boolean
          description: Whether the offer is available
        is_unavailable:
          type: boolean
          description: Whether the offer is unavailable
        rooms_remaining:
          type: integer
          description: Number of rooms remaining
        description:
          type: string
          description: Offer description

    Subrating:
      type: object
      properties:
        text:
          type: string
          description: Subrating category name
        value:
          type: number
          description: Subrating value

    Amenity:
      type: object
      properties:
        text:
          type: string
          description: Amenity name
        category:
          type: string
          description: Amenity category

    HotelStyle:
      type: object
      properties:
        name:
          type: string
          description: Style name
        ranking:
          type: integer
          description: Style ranking
        score:
          type: number
          description: Style score

    # Restaurant-specific schemas

    ReviewSnippet:
      type: object
      properties:
        review_id:
          type: integer
          description: ID of the source review
        text:
          type: string
          description: Review quote text
        link:
          type: string
          description: Link to the full review

    RestaurantOffer:
      type: object
      properties:
        title:
          type: string
          description: Offer title
        provider:
          type: string
          description: Offer provider

    Menu:
      type: object
      description: Restaurant menu information. Applies to Restaurant type.
      properties:
        link:
          type: string
          description: URL to full menu
        provider:
          type: string
          description: Menu provider
        is_owner_verified:
          type: boolean
          description: Whether the menu is owner-verified
        popular_dishes:
          type: array
          description: Popular dishes
          items:
            type: object
            properties:
              name:
                type: string
                description: Dish name
        menus:
          type: array
          description: Menu sections
          items:
            $ref: '#/components/schemas/MenuSection'

    MenuSection:
      type: object
      properties:
        title:
          type: string
          description: Menu section title
        sections:
          type: array
          description: Subsections within the menu
          items:
            type: object
            properties:
              title:
                type: string
                description: Subsection title
              description:
                type: string
                description: Subsection description
              items:
                type: array
                description: Menu items
                items:
                  type: object
                  properties:
                    title:
                      type: string
                      description: Item name
                    description:
                      type: string
                      description: Item description
                    price:
                      type: number
                      description: Item price
                    currency:
                      type: string
                      description: Price currency

    Category:
      type: object
      properties:
        title:
          type: string
          description: Category name
        link:
          type: string
          description: URL to category page

    # Airline-specific schemas

    Alliance:
      type: object
      description: Airline alliance information. Applies to Airline type.
      properties:
        name:
          type: string
          description: Alliance name
        favicon:
          type: string
          description: URL of the alliance favicon

    ErrorResponse:
      type: object
      required: [error]
      properties:
        error:
          type: string
          description: Error message describing what went wrong
