{
  "service": "tripadvisor",
  "displayName": "Tripadvisor",
  "categories": [
    "Location",
    "Data"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "API Key",
      "placeholder": "TRIPADVISOR_API_KEY",
      "description": "Tripadvisor Content API key passed as the key query parameter. Sign in and get or manage your key at https://www.tripadvisor.com/business/solutions/hotels/content-api.",
      "extraFields": []
    }
  ],
  "homepageUrl": "https://www.tripadvisor.com/developers",
  "actions": [
    {
      "id": "tripadvisor.get_location_details",
      "service": "tripadvisor",
      "name": "get_location_details",
      "description": "Get detailed Tripadvisor information for one location.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "locationId": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "description": "Positive Tripadvisor location identifier."
              },
              {
                "type": "string",
                "minLength": 1,
                "description": "Tripadvisor location identifier returned by a previous action."
              }
            ],
            "description": "Tripadvisor location identifier."
          },
          "language": {
            "type": "string",
            "minLength": 1,
            "description": "Supported Tripadvisor language code."
          },
          "currency": {
            "type": "string",
            "minLength": 1,
            "description": "ISO 4217 currency code used for localized fields."
          }
        },
        "additionalProperties": false,
        "required": [
          "locationId"
        ],
        "description": "Input parameters for retrieving Tripadvisor location details."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "location": {
            "type": "object",
            "properties": {
              "locationId": {
                "type": "string",
                "description": "Normalized Tripadvisor location identifier."
              },
              "name": {
                "type": "string",
                "description": "Location display name."
              },
              "description": {
                "type": "string",
                "description": "Location description returned by Tripadvisor."
              },
              "webUrl": {
                "type": "string",
                "description": "Tripadvisor listing URL for the location."
              },
              "website": {
                "type": "string",
                "description": "Official website URL for the location."
              },
              "phone": {
                "type": "string",
                "description": "Location phone number."
              },
              "email": {
                "type": "string",
                "description": "Location email address."
              },
              "rating": {
                "type": "number",
                "description": "Average Tripadvisor rating."
              },
              "numReviews": {
                "type": "integer",
                "description": "Total number of Tripadvisor reviews."
              },
              "latitude": {
                "type": "number",
                "description": "Latitude coordinate of the location."
              },
              "longitude": {
                "type": "number",
                "description": "Longitude coordinate of the location."
              },
              "timezone": {
                "type": "string",
                "description": "Timezone of the location."
              },
              "addressObj": {
                "type": "object",
                "properties": {
                  "street1": {
                    "type": "string",
                    "description": "Primary street address line."
                  },
                  "street2": {
                    "type": "string",
                    "description": "Secondary street address line."
                  },
                  "city": {
                    "type": "string",
                    "description": "City name."
                  },
                  "state": {
                    "type": "string",
                    "description": "State or region name."
                  },
                  "country": {
                    "type": "string",
                    "description": "Country name."
                  },
                  "postalCode": {
                    "type": "string",
                    "description": "Postal code."
                  },
                  "addressString": {
                    "type": "string",
                    "description": "Formatted address string."
                  }
                },
                "additionalProperties": false,
                "description": "Normalized Tripadvisor address object."
              }
            },
            "additionalProperties": false,
            "required": [
              "locationId"
            ],
            "description": "Normalized Tripadvisor location details."
          }
        },
        "additionalProperties": false,
        "description": "Normalized Tripadvisor location details response."
      }
    },
    {
      "id": "tripadvisor.get_location_photos",
      "service": "tripadvisor",
      "name": "get_location_photos",
      "description": "Get Tripadvisor photos for one location with optional paging and source filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "locationId": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "description": "Positive Tripadvisor location identifier."
              },
              {
                "type": "string",
                "minLength": 1,
                "description": "Tripadvisor location identifier returned by a previous action."
              }
            ],
            "description": "Tripadvisor location identifier."
          },
          "language": {
            "type": "string",
            "minLength": 1,
            "description": "Supported Tripadvisor language code."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 5,
            "description": "Maximum number of photos to return, up to 5."
          },
          "offset": {
            "type": "integer",
            "minimum": 0,
            "description": "Zero-based pagination offset for photo results."
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Expert",
                "Management",
                "Traveler"
              ],
              "description": "Allowed Tripadvisor photo source filter."
            },
            "description": "Allowed Tripadvisor photo sources to include in the response.",
            "minItems": 1
          }
        },
        "additionalProperties": false,
        "required": [
          "locationId"
        ],
        "description": "Input parameters for retrieving Tripadvisor location photos."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "photos": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "Tripadvisor photo identifier."
                },
                "album": {
                  "type": "string",
                  "description": "Photo album label."
                },
                "caption": {
                  "type": "string",
                  "description": "Photo caption text."
                },
                "isBlessed": {
                  "type": "boolean",
                  "description": "Whether Tripadvisor marks the photo as blessed."
                },
                "publishedDate": {
                  "type": "string",
                  "description": "Photo published date returned by Tripadvisor."
                },
                "images": {
                  "type": "object",
                  "properties": {
                    "thumbnail": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string",
                          "description": "Direct image URL for this size variant."
                        },
                        "width": {
                          "type": "integer",
                          "description": "Image width in pixels."
                        },
                        "height": {
                          "type": "integer",
                          "description": "Image height in pixels."
                        }
                      },
                      "additionalProperties": false,
                      "description": "One Tripadvisor image size variant."
                    },
                    "small": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string",
                          "description": "Direct image URL for this size variant."
                        },
                        "width": {
                          "type": "integer",
                          "description": "Image width in pixels."
                        },
                        "height": {
                          "type": "integer",
                          "description": "Image height in pixels."
                        }
                      },
                      "additionalProperties": false,
                      "description": "One Tripadvisor image size variant."
                    },
                    "medium": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string",
                          "description": "Direct image URL for this size variant."
                        },
                        "width": {
                          "type": "integer",
                          "description": "Image width in pixels."
                        },
                        "height": {
                          "type": "integer",
                          "description": "Image height in pixels."
                        }
                      },
                      "additionalProperties": false,
                      "description": "One Tripadvisor image size variant."
                    },
                    "large": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string",
                          "description": "Direct image URL for this size variant."
                        },
                        "width": {
                          "type": "integer",
                          "description": "Image width in pixels."
                        },
                        "height": {
                          "type": "integer",
                          "description": "Image height in pixels."
                        }
                      },
                      "additionalProperties": false,
                      "description": "One Tripadvisor image size variant."
                    },
                    "original": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string",
                          "description": "Direct image URL for this size variant."
                        },
                        "width": {
                          "type": "integer",
                          "description": "Image width in pixels."
                        },
                        "height": {
                          "type": "integer",
                          "description": "Image height in pixels."
                        }
                      },
                      "additionalProperties": false,
                      "description": "One Tripadvisor image size variant."
                    }
                  },
                  "additionalProperties": true,
                  "description": "Normalized Tripadvisor photo image variants."
                },
                "source": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "Photo source name."
                    },
                    "localizedName": {
                      "type": "string",
                      "description": "Localized photo source name."
                    }
                  },
                  "additionalProperties": false,
                  "description": "Photo source metadata returned by Tripadvisor."
                },
                "user": {
                  "type": "object",
                  "properties": {
                    "username": {
                      "type": "string",
                      "description": "Photo uploader display name."
                    },
                    "reviewCount": {
                      "type": "integer",
                      "description": "Number of reviews written by the uploader."
                    },
                    "reviewerBadge": {
                      "type": "string",
                      "description": "Reviewer badge label returned by Tripadvisor."
                    },
                    "userLocation": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Reviewer location identifier."
                        },
                        "name": {
                          "type": "string",
                          "description": "Reviewer location name."
                        }
                      },
                      "additionalProperties": false,
                      "description": "Reviewer location metadata returned by Tripadvisor."
                    },
                    "avatar": {
                      "type": "object",
                      "properties": {
                        "small": {
                          "type": "string",
                          "description": "Small avatar URL."
                        },
                        "medium": {
                          "type": "string",
                          "description": "Medium avatar URL."
                        },
                        "large": {
                          "type": "string",
                          "description": "Large avatar URL."
                        },
                        "thumbnail": {
                          "type": "string",
                          "description": "Thumbnail avatar URL."
                        },
                        "original": {
                          "type": "string",
                          "description": "Original avatar URL."
                        }
                      },
                      "additionalProperties": true,
                      "description": "Reviewer avatar URLs returned by Tripadvisor."
                    }
                  },
                  "additionalProperties": false,
                  "description": "Normalized Tripadvisor photo uploader metadata."
                }
              },
              "additionalProperties": false,
              "required": [
                "id",
                "images"
              ],
              "description": "Normalized Tripadvisor photo."
            },
            "description": "Photos returned by Tripadvisor."
          },
          "paging": {
            "type": "object",
            "properties": {
              "next": {
                "type": "string",
                "description": "Next page URL returned by Tripadvisor."
              },
              "previous": {
                "type": "string",
                "description": "Previous page URL returned by Tripadvisor."
              },
              "results": {
                "type": "integer",
                "description": "Number of items in the current page."
              },
              "skipped": {
                "type": "integer",
                "description": "Number of skipped items for this page."
              },
              "totalResults": {
                "type": "integer",
                "description": "Total number of available items."
              }
            },
            "additionalProperties": false,
            "description": "Normalized Tripadvisor paging metadata."
          }
        },
        "additionalProperties": false,
        "required": [
          "photos"
        ],
        "description": "Normalized Tripadvisor location photos response."
      }
    },
    {
      "id": "tripadvisor.search_locations",
      "service": "tripadvisor",
      "name": "search_locations",
      "description": "Search Tripadvisor locations by text with optional geographic and category filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "searchQuery": {
            "type": "string",
            "minLength": 1,
            "description": "Text used to search Tripadvisor locations by name."
          },
          "category": {
            "type": "string",
            "enum": [
              "hotels",
              "attractions",
              "restaurants",
              "geos"
            ],
            "description": "Tripadvisor location category filter."
          },
          "phone": {
            "type": "string",
            "minLength": 1,
            "description": "Phone number used to filter search results."
          },
          "address": {
            "type": "string",
            "minLength": 1,
            "description": "Address text used to filter search results."
          },
          "latitude": {
            "type": "number",
            "minimum": -90,
            "maximum": 90,
            "description": "Latitude in decimal degrees."
          },
          "longitude": {
            "type": "number",
            "minimum": -180,
            "maximum": 180,
            "description": "Longitude in decimal degrees."
          },
          "radius": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Radius length used when latitude and longitude are provided."
          },
          "radiusUnit": {
            "type": "string",
            "enum": [
              "km",
              "mi",
              "m"
            ],
            "description": "Distance unit used for radius filtering."
          },
          "language": {
            "type": "string",
            "minLength": 1,
            "description": "Supported Tripadvisor language code."
          }
        },
        "additionalProperties": false,
        "required": [
          "searchQuery"
        ],
        "description": "Input parameters for Tripadvisor location search."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "locations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "locationId": {
                  "type": "string",
                  "description": "Normalized Tripadvisor location identifier."
                },
                "name": {
                  "type": "string",
                  "description": "Location display name."
                },
                "distance": {
                  "type": "string",
                  "description": "Distance text returned by Tripadvisor."
                },
                "bearing": {
                  "type": "string",
                  "description": "Bearing text returned by Tripadvisor."
                },
                "addressObj": {
                  "type": "object",
                  "properties": {
                    "street1": {
                      "type": "string",
                      "description": "Primary street address line."
                    },
                    "street2": {
                      "type": "string",
                      "description": "Secondary street address line."
                    },
                    "city": {
                      "type": "string",
                      "description": "City name."
                    },
                    "state": {
                      "type": "string",
                      "description": "State or region name."
                    },
                    "country": {
                      "type": "string",
                      "description": "Country name."
                    },
                    "postalCode": {
                      "type": "string",
                      "description": "Postal code."
                    },
                    "addressString": {
                      "type": "string",
                      "description": "Formatted address string."
                    }
                  },
                  "additionalProperties": false,
                  "description": "Normalized Tripadvisor address object."
                }
              },
              "additionalProperties": false,
              "required": [
                "locationId",
                "name"
              ],
              "description": "Normalized Tripadvisor location summary."
            },
            "description": "Location summaries returned by Tripadvisor location search."
          }
        },
        "additionalProperties": false,
        "description": "Normalized Tripadvisor location search response."
      }
    },
    {
      "id": "tripadvisor.search_nearby_locations",
      "service": "tripadvisor",
      "name": "search_nearby_locations",
      "description": "Search Tripadvisor locations near a latitude and longitude coordinate pair.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "latitude": {
            "type": "number",
            "minimum": -90,
            "maximum": 90,
            "description": "Latitude in decimal degrees."
          },
          "longitude": {
            "type": "number",
            "minimum": -180,
            "maximum": 180,
            "description": "Longitude in decimal degrees."
          },
          "category": {
            "type": "string",
            "enum": [
              "hotels",
              "attractions",
              "restaurants",
              "geos"
            ],
            "description": "Tripadvisor location category filter."
          },
          "phone": {
            "type": "string",
            "minLength": 1,
            "description": "Phone number used to filter nearby results."
          },
          "address": {
            "type": "string",
            "minLength": 1,
            "description": "Address text used to filter nearby results."
          },
          "radius": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Radius length used to constrain the nearby search."
          },
          "radiusUnit": {
            "type": "string",
            "enum": [
              "km",
              "mi",
              "m"
            ],
            "description": "Distance unit used for radius filtering."
          },
          "language": {
            "type": "string",
            "minLength": 1,
            "description": "Supported Tripadvisor language code."
          }
        },
        "additionalProperties": false,
        "required": [
          "latitude",
          "longitude"
        ],
        "description": "Input parameters for Tripadvisor nearby location search."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "locations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "locationId": {
                  "type": "string",
                  "description": "Normalized Tripadvisor location identifier."
                },
                "name": {
                  "type": "string",
                  "description": "Location display name."
                },
                "distance": {
                  "type": "string",
                  "description": "Distance text returned by Tripadvisor."
                },
                "bearing": {
                  "type": "string",
                  "description": "Bearing text returned by Tripadvisor."
                },
                "addressObj": {
                  "type": "object",
                  "properties": {
                    "street1": {
                      "type": "string",
                      "description": "Primary street address line."
                    },
                    "street2": {
                      "type": "string",
                      "description": "Secondary street address line."
                    },
                    "city": {
                      "type": "string",
                      "description": "City name."
                    },
                    "state": {
                      "type": "string",
                      "description": "State or region name."
                    },
                    "country": {
                      "type": "string",
                      "description": "Country name."
                    },
                    "postalCode": {
                      "type": "string",
                      "description": "Postal code."
                    },
                    "addressString": {
                      "type": "string",
                      "description": "Formatted address string."
                    }
                  },
                  "additionalProperties": false,
                  "description": "Normalized Tripadvisor address object."
                }
              },
              "additionalProperties": false,
              "required": [
                "locationId",
                "name"
              ],
              "description": "Normalized Tripadvisor location summary."
            },
            "description": "Location summaries returned by Tripadvisor nearby search."
          }
        },
        "additionalProperties": false,
        "description": "Normalized Tripadvisor nearby location response."
      }
    }
  ]
}
