Skip to content
Scrappa Get API key
Trip.com API 1 credit / request

Trip.com Flight Price Calendar API Documentation

GET https://scrappa.co/api/tripcom/flights/calendar

Trip.com Flight Price Calendar API Documentation Get the cheapest price for each departure day of a route, from the given date on, one-way, or round trip with return_date. Use IATA city codes such as LON or NYC. Airport codes such as JFK return no rows and the call fails without a charge. Each day has the date in ISO 8601, the price as a number in the requested currency and whether the cheapest option is direct. The answer has about 200 days. Cost: 1 credit. Failed or empty calls cost 0.

Trip.com Flight Price Calendar API Documentation 1 credit / request

Endpoint

Request preview
GET
https://scrappa.co/api/tripcom/flights/calendar
Auth header
x-api-key
Cost
1 credit / request
from = example to = example date = 2026-06-15
Response preview
200 OK
{
    "data": {
        "to": "PAR",
        "date": "2027-03-14",
        "days": [
            {
                "date": "2027-03-14",
                "price": 41,
                "direct": true
            },
            {
                "date": "2027-03-15",
                "price": 29,
                "direct": false
...

Parameters

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

Runnable path

3 required parameters needed before sending a request.

2 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
date string Required

First departure date, YYYY-MM-DD, today or later. Example: 2027-03-14.

Example value 2026-06-15
return_date string Optional

Return date for a round-trip calendar, YYYY-MM-DD, on or after date. Without it the calendar is one way.

Example value 2026-06-15
currency string Optional

Price currency: USD, EUR, GBP, JPY or KRW. 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",
        "days": [
            {
                "date": "2027-03-14",
                "price": 41,
                "direct": true
            },
            {
                "date": "2027-03-15",
                "price": 29,
                "direct": false
            }
        ],
        "from": "LON",
        "total": 2,
        "adults": 1,
        "currency": "EUR",
        "trip_type": "one_way",
        "cabin_class": "economy",
        "return_date": null,
        "lowest_price": 29
    },
    "meta": {
        "credits": 1,
        "billable": true,
        "endpoint_family": "flight_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": {
        "from": [
            "A departure city code is required, e.g. LON. Use the city code, not the airport code."
        ]
    },
    "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.