Skip to main content

A simple API wrapper for the Tripadvisor Content API

Project description

Tripadvisor Content API

This is a simple python wrapper for the Tripadvisor Content API.

Content API

  • Location Details
    • A Location Details request returns comprehensive information about a location (hotel, restaurant, or an attraction) such as name, address, rating, and URLs for the listing on Tripadvisor.
  • Location Photos
    • The Location Photos request returns up to 5 high-quality photos for a specific location. The photos are ordered by recency.
  • Location Reviews
    • The Location Reviews request returns up to 5 of the most recent reviews for a specific location.
  • Location Search
    • The Location Search request returns up to 10 locations found by the given search query. You can use category ("hotels", "attractions", "restaurants", "geos"), phone number, address, and latitude/longtitude to search with more accuracy.
  • Nearby Location Search
    • The Nearby Location Search request returns up to 10 locations found near the given latitude/longtitude.

Example Code

Creating new API

from tripadvisorapi import TripadvisorApi

# Initialize API with your API key

key = "YOUR_KEY"

api = TripadvisorApi(key)

Location Search

api = TripadvisorApi(key)

res = api.location_search("Los Angeles")

res_json = json.loads(res.text)

print(res_json)

MIT License

Copyright (c) 2023 Alexander Schnabl

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tripadvisorapi-1.0.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tripadvisorapi-1.0.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file tripadvisorapi-1.0.0.tar.gz.

File metadata

  • Download URL: tripadvisorapi-1.0.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for tripadvisorapi-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1fe11de44e02129a04c12d2abbe54202af66a28a0c6cf411785c8cc13c61c614
MD5 8114e2d798ca49151fbd0e7ccb57ff4f
BLAKE2b-256 ab697444177b8a19ca00686311cb687f564d2f6f472fcf97442b3c4101ccca9b

See more details on using hashes here.

File details

Details for the file tripadvisorapi-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: tripadvisorapi-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for tripadvisorapi-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 943f1070809364081c1b65971f7c7e00481fc42e0657e947246c68c0126d3bae
MD5 689138c460c93a8652212696d1442e45
BLAKE2b-256 10f5f77c5d439d8795c4a0639a66de934d8f9e9e9d302b432e2a768d4f29a8eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page