Skip to content
Scrappa Get API key
Trip.com API 3 credits / request

Trip.com Flight + Hotel Packages API Documentation

GET https://scrappa.co/api/tripcom/packages/search

Trip.com Flight + Hotel Packages API Documentation List hotels at a destination priced together with a round-trip flight. Each hotel has the room, breakfast and cancellation terms, the hotel total for the stay, the flight total and the package total, all as numbers in the requested currency. The answer also shows the recommended flights (outbound and return, local times in ISO 8601). Departure date and return date are the hotel check-in and check-out. city_id is the hotel city id of the destination from the suggest endpoint, e.g. 192 for Paris. 10 hotels per page, up to page 3. Only Paris and London are proven; other cities may answer 503 without charge. Package prices are not plain hotel prices. A hotel whose totals do not add up is left out. Cost: 3 credits per successful call. Failed calls cost 0.

Trip.com Flight + Hotel Packages API Documentation 3 credits / request

Endpoint

Request preview
GET
https://scrappa.co/api/tripcom/packages/search
Auth header
x-api-key
Cost
3 credits / request
from = example to = example city_id = 1234567890
Response preview
200 OK
{
    "data": {
        "to": "PAR",
        "date": "2027-03-14",
        "from": "LON",
        "page": 1,
        "count": 1,
        "adults": 2,
        "flight": {
            "return": [],
            "currency": "EUR",
            "outbound": [
                {
                    "airline": "Air France",
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

5 required parameters needed before sending a request.

3 optional filters available.

from string Required

Departure IATA city code, uppercase. Example: LON.

Example value example
to string Required

Arrival IATA city code, uppercase. Example: PAR.

Example value example
city_id string Required

Hotel city id of the destination from the suggest endpoint. Example: 192.

Example value 1234567890
date string Required

Departure date and hotel check-in, YYYY-MM-DD, today or later. Example: 2027-03-14.

Example value 2026-06-15
return_date string Required

Return date and hotel check-out, YYYY-MM-DD, 1 to 30 nights after date. Example: 2027-03-17.

Example value 2026-06-15
adults integer Optional

Number of adults, 1 to 4. Defaults to 1. One room.

Example value 10
page integer Optional

Hotel page, 1 to 3, 10 hotels per page. Defaults to 1.

Example value 1
currency string Optional

Price currency: USD, EUR or GBP. Defaults to USD.

Example value USD

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "data": {
        "to": "PAR",
        "date": "2027-03-14",
        "from": "LON",
        "page": 1,
        "count": 1,
        "adults": 2,
        "flight": {
            "return": [],
            "currency": "EUR",
            "outbound": [
                {
                    "airline": "Air France",
                    "arrival": {
                        "city": "Paris",
                        "time": "2027-03-14T17:05:00",
                        "airport": "Paris Charles de Gaulle Airport",
                        "airport_code": "CDG"
                    },
                    "departure": {
                        "city": "London",
                        "time": "2027-03-14T14:45:00",
                        "airport": "Heathrow Airport",
                        "airport_code": "LHR"
                    },
                    "flight_number": "AF1781",
                    "duration_minutes": 80
                }
            ],
            "price_total": 278.6
        },
        "hotels": [
            {
                "name": "Hotel R\u00e9gence Etoile",
                "score": 9.2,
                "stars": 4,
                "city_id": "192",
                "currency": "EUR",
                "hotel_id": "718146",
                "location": "Near Arc de Triomphe de l\u2019Etoile, Charles de Gaulle - \u00e9toile Metro Station",
                "image_url": null,
                "room_name": "Classic Room",
                "hotel_total": 732.6,
                "flight_total": 278.6,
                "package_total": 1011.2,
                "reviews_count": 562,
                "free_cancellation": true,
                "breakfast_included": true,
                "cancellation_policy": null
            }
        ],
        "nights": 3,
        "city_id": "192",
        "currency": "EUR",
        "has_more": true,
        "return_date": "2027-03-17"
    },
    "meta": {
        "credits": 3,
        "billable": true,
        "endpoint_family": "package_search"
    },
    "success": true
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

A query parameter is missing or invalid. This response is not billable.

{
    "errors": {
        "city_id": [
            "The hotel city id of the destination is required, e.g. 192 for Paris. Take it from the suggest endpoint."
        ]
    },
    "message": "The request validation failed"
}
404

Resource Not Found

The id is unknown. This response is not billable.

{
    "meta": {
        "billable": false,
        "retryable": false,
        "endpoint_family": "trip_com"
    },
    "error": {
        "code": "NOT_FOUND",
        "message": "The requested Trip.com resource was not found."
    },
    "success": false
}
502

Unexpected Upstream Answer

Trip.com answered with a page or payload Scrappa cannot read. This response is not billable. Retry later.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "trip_com"
    },
    "error": {
        "code": "PARSER_DRIFT",
        "message": "The Trip.com API is temporarily unavailable. Please retry."
    },
    "success": false
}
503

Upstream Unavailable

Trip.com did not answer after one retry. This response is not billable. Retry later.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "trip_com"
    },
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "The Trip.com API is temporarily unavailable. Please retry."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.