
Trip.com API
Attractions
/attractions/details/byidTrip.com /attractions/details/byid API
Our /attractions/details/byid endpoint delivers comprehensive Trip.com data for developers and businesses at every stage of growth. The documentation is thorough, the response format is predictable, and the onboarding takes minutes instead of weeks. You won't need to reverse-engineer website structures, rotate IP addresses, or deal with CAPTCHAs — RealtyAPI abstracts all of that complexity into a single, clean API call. Thousands of developers already use this endpoint to power property search tools, market dashboards, investment platforms, and lead generation systems across the real estate industry.
import requests
url = "https://trip.realtyapi.io/attractions/details/byid"
headers = {
"x-realtyapi-key": "YOUR_API_KEY"
}
params = {
"poiId": "78693"
}
response = requests.get(url, headers=headers, params=params)
data = response.json()
print(data)What You Can Do With
the /attractions/details/byid Endpoint.
Here's what this endpoint provides and how you can use the data it returns.
Endpoint Parameters
2 params| Parameter | Type | Required |
|---|---|---|
poiId | NUMBER | Required |
location | STRING | Optional |
Required Parameters
This endpoint requires poiId to fetch data. Pass these as query parameters in your request.
JSON Response
Receive structured JSON containing /attractions/details/byid data from Trip.com. Parse it directly into your application models.
Real-Time Results
Every request fetches live Trip.com data. No stale caches — you always get the most current information available.
Error Handling
Clear HTTP status codes and error messages help you handle edge cases gracefully. See our documentation for the full error reference.