Skip to main content
POST
/
api
/
trip
/
hotels
/
photos
/trip/hotels/photos
curl --request POST \
  --url https://api.anysite.io/api/trip/hotels/photos \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "hotel": "<string>",
  "count": 2,
  "timeout": 300
}
'
[
  {
    "image": "<string>",
    "@type": "@trip_hotel_photo",
    "id": "<string>",
    "category": "<string>",
    "title": "<string>",
    "thumbnail": "<string>",
    "source": "<string>"
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
hotel
string
required

Trip.com hotel id or a hotel URL containing it

Minimum string length: 1
Examples:

"1480287"

"https://us.trip.com/hotels/new-york-hotel-detail-1480287/the-plaza/"

count
integer
required

Max number of photos to return

Required range: x >= 1
timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500

Response

Successful Response

image
string
required
@type
string
default:@trip_hotel_photo
id
string | null
category
string | null
title
string | null
thumbnail
string | null
source
string | null