Overall Series Grouped Compare
Searches Overall Series Grouped Compare API returns two, search time-based overall grouped data series at once: one defined by the specified {SearchesTimeframes} and {SearchesItinerary} and another defined by {Comparison...} and compare_ prefixed query parameters (or auto-calculated with default values where specified).
Additional comparative time-based data series between the two grouped data series are returned as well.
Request
Endpoint
GET
/v4/{billing_plan}/account/{account_id}/flights/searches/overall/series/grouped/compare
Path Parameters
| Name | Description | Type | Examples |
|---|---|---|---|
| *{billing_plan} | Billing plan to be applied to the call. | string | ondemand |
| *{account_id} | Provided identifier of the account. | string |
Header Parameters
| Name | Description | Type | Examples |
|---|---|---|---|
| *x-api-key | Provided API key {x_api_key} that allows authentication. |
string | |
| *Authorization | Provided token {jwt_bearer} that allows authorization. |
string | Bearer {jwt_bearer} |
Query Parameters
| Name | Description | Type | Examples | Default |
|---|---|---|---|---|
| *{SearchesTimeframes} | Flights Searches timeframes filter. | SearchesTimeframes | ||
| *{SearchesItinerary} | Flights Searches itinerary filter. | SearchesItinerary | ||
| *period | Time unit of the series. | string | dayweekmonth | |
| ⓝ *group_type | Field(s) for which perform grouping. | string | origin_countrydestination_citytrip_type | |
| {Comparison SearchesTimeframes} |
Comparison Flights Searches timeframes filter. | Comparison |
One year before correspondent and valued {SearchesTimeframes}. | |
| {Comparison SearchesItinerary} |
Comparison Flights Searches itinerary filter. | Comparison |
Same as correspondent and valued {SearchesItinerary}. | |
| flight_typecompare_flight_type | Filter by flight type. | string | domesticinternational | |
| trip_typecompare_trip_type | Filter by trip type. | string | onewayround_trip |
SearchesTimeframes
| Name | Description | Type |
|---|---|---|
| {SearchTimeframe} | Filter by search timeframe. | SearchTimeframe |
| {DepartureTimeframe} | Filter by departure timeframe. | DepartureTimeframe |
SearchTimeframe
Timeframe that filters flight searches by search date.
| Field | Description | Type | Examples |
|---|---|---|---|
| *search_from | Start date of search timeframe. | date | 2022-01-01 |
| *search_to | End date of search timeframe. | date | 2022-03-31 |
DepartureTimeframe
Timeframe that filters flight searches by departure date.
| Field | Description | Type | Examples |
|---|---|---|---|
| *departure_from | Start date of departure timeframe. | date | 2022-01-01 |
| *departure_to | End date of departure timeframe. | date | 2022-03-31 |
SearchesItinerary
| Field | Description | Type | Examples |
|---|---|---|---|
| ⓝ origin_country | Filter by country of origin in ISO 3166-1 alpha-2 standard format (in lower case). | string | it |
| ⓝ destination_country | Filter by country of destination in ISO 3166-1 alpha-2 standard format (in lower case). | string | fr |
| ⓝ origin_city | Filter by city of origin in IATA code standard format (in lower case). | string | mil |
| ⓝ destination_city | Filter by city of destination in IATA code standard format (in lower case). | string | rom |
ComparisonSearchesTimeframes
| Name | Description | Type | Default |
|---|---|---|---|
| {Comparison SearchTimeframe} |
Filter by comparison search timeframe. | Comparison |
One year before correspondent and valued {SearchTimeframe}. |
| {Comparison DepartureTimeframe} |
Filter by comparison departure timeframe. | Comparison |
One year before correspondent and valued {DepartureTimeframe}. |
ComparisonSearchTimeframe
| Field | Description | Type | Examples |
|---|---|---|---|
| *compare_search_from | Start date of comparison search timeframe. | date | 2022-01-01 |
| *compare_search_to | End date of comparison search timeframe. | date | 2022-03-31 |
ComparisonDepartureTimeframe
| Field | Description | Type | Examples |
|---|---|---|---|
| *comparison_departure_from | Start date of departure timeframe. | date | 2022-01-01 |
| *comparison_departure_to | End date of departure timeframe. | date | 2022-03-31 |
ComparisonSearchesItinerary
| Field | Description | Type | Examples | Default |
|---|---|---|---|---|
| ⓝ compare_origin_country | Filter by comparison country of origin in ISO 3166-1 alpha-2 standard format (in lower case). | string | it | Same as origin_country. |
| ⓝ compare_destination_country | Filter by comparison country of destination in ISO 3166-1 alpha-2 standard format (in lower case). | string | fr | Same as destination_country. |
| ⓝ compare_origin_city | Filter by comparison city of origin in IATA code standard format (in lower case). | string | mil | Same as origin_city. |
| ⓝ compare_destination_city | Filter by comparison city of destination in IATA code standard format (in lower case). | string | rom | Same as destination_city. |
Supported values for period
- day
- week
- month
Supported values for group_type
- origin_country
- destination_country
- origin_city
- destination_city
- flight_type
- trip_type
- length_of_stay
Supported values for flight_type
- domestic
- international
Supported values for trip_type
- oneway
- round_trip
Example
curl -X GET 'https://api.datappeal.io/v4/{billing_plan}/account/{account_id}/flights/searches/overall/series/grouped/compare?search_from=2022-10-15&search_to=2023-10-15&departure_from=2024-10-15&departure_to=2025-10-15&group_type=origin_country&period=month' \
-H 'x-api-key: {x_api_key}' \
-H 'Authorization: Bearer {jwt_bearer}' \
Response
Status
| Status | Description |
|---|---|
| 200 | Overall Series Grouped Compare data has been successfully returned. |
Body
FlightsSearchesGroupedComparedSeriesOverall
| Field | Description | Type |
|---|---|---|
| *results | Paginated grouped compared overall data series. | FlightsSearchesGroupedComparedSeriesOverallResults |
| paging | Response pagination. | Paging |
FlightsSearchesGroupedComparedSeriesOverallResults
| Field | Description | Type |
|---|---|---|
| actual | Overall grouped data series for the actual timeframe. | FlightsSearchesGroupedComparableSeriesOverall |
| comparison | Overall grouped data series for the comparison timeframe. | FlightsSearchesGroupedComparableSeriesOverall |
| variation | Calculated difference between actual and comparison. |
array[FlightsSearchesSeriesGroupedOverallVariation] |
LocationGroupedComparableSeriesOverall
| Field | Description | Type |
|---|---|---|
| timeframe | Reference date ranges. | FlightsSearchesComparableTimeframe |
| value | Overall grouped data series for the corresponding timeframe. |
array[FlightsSearchesGroupedSeriesOverallElement] |
FlightsSearchesComparableTimeframe
| Field | Description | Type |
|---|---|---|
| search | Reference search date range. | Timeframe |
| departure | Reference departure date range. | Timeframe |
Timeframe
| Field | Description | Type |
|---|---|---|
| *from | Start date of timeframe. | date |
| *to | End date of timeframe. | date |
FlightsSearchesGroupedSeriesOverallElement
| Field | Description | Type |
|---|---|---|
| *group | Group fields values combination for the requested grouping. | array[FlightsGroupElement] |
| *series | Searches overall series data of corresponding group. |
array[FlightsSearchesSeriesOverallElement] |
FlightsGroupElement
| Field | Description | Type | Examples |
|---|---|---|---|
| *name | Name that identifies the element in the group. | string | trip_typeflight_type |
| *value | Value of the corresponding element. | string | onewayactive |
FlightsSearchesSeriesOverallElement
| Field | Description | Type |
|---|---|---|
| *period | Date representing the requested period, corresponding to the first day of the period.day: the day itself.week: first day of the corresponding week.month: first day of the corresponding month. |
date |
| *value | Searches overall data of corresponding period. |
FlightsSearchesOverall |
FlightsSearchesOverall
| Field | Description | Type |
|---|---|---|
| searches | Count of searches performed. | int |
| days_in_advance | Average number of days elapsed between search date and departure date. | decimal |
| length_of_stay | Average number of days elapsed between outbound and inbound departure dates for round trip flights. | decimal |
| partition | Incidence percentage of the group's searches over total searches. | decimal |
LocationSeriesGroupedOverallVariation
| Field | Description | Type |
|---|---|---|
| *group | Group fields values combination for the requested grouping. | array[FlightsGroupElement] |
| *series | Overall data variation series for the requested timeframe and period. | array[FlightsSearchesSeriesOverallVariationElement] |
FlightsGroupElement
| Field | Description | Type | Examples |
|---|---|---|---|
| *name | Name that identifies the element in the group. | string | trip_typeflight_type |
| *value | Value of the corresponding element. | string | onewayactive |
FlightsSearchesSeriesOverallVariationElement
| Field | Description | Type |
|---|---|---|
| *actual_period | Date representing the actual period, corresponding to the first day of the period.day: the day itself.week: first day of the corresponding week.month: first day of the corresponding month. |
date |
| *comparison_period | Date representing the comparison period, corresponding to the first day of the period.day: the day itself.week: first day of the corresponding week.month: first day of the corresponding month. |
date |
| *value | Overall variation data between actual_period and comparison_period. |
FlightsSearchesOverallVariation |
FlightsSearchesOverallVariation
| Field | Description | Type |
|---|---|---|
| searches | Searches count variation. | Variation |
| days_in_advance | Average days in advance variation. | Variation |
| length_of_stay | Average length of stay variation. | Variation |
| partition | Group passengers count variation. | Variation |
Variation
| Field | Description | Type | Examples |
|---|---|---|---|
| value | Difference between actual value and comparison value. |
decimal | 1.12 |
| variation | The explicit variation polarity. It is null when values are not available in both timeframes. |
string | POSITIVE NEUTRAL NEGATIVE |
Paging
| Field | Description | Type |
|---|---|---|
| last | A relative URI to the last page. | string |
| first | A relative URI to the first page. | string |
| prev | A relative URI to the previous page. | string |
| next | A relative URI to the next page. | string |
| current | A relative URI to the current page. | string |
| pages | A set of relative URIs calculated around the current page. | Page |
| elements | All indexes shown on the current page. | array[int] |
| total | The number of all elements that API can retrieve. | int |
| size | The selected page size. | int |
Page
| Field | Description | Type |
|---|---|---|
| number | Number of the page. | int |
| uri | URI of the page. | string |
Example
{
"results": {
"actual": {
"timeframe": {
"search": {
"from": "2022-10-15",
"to": "2023-10-15"
},
"departure": {
"from": "2024-10-15",
"to": "2025-10-15"
}
},
"value": [
{
"group": [
{
"name": "origin_country",
"value": "fr"
}
],
"series": [
{
"period": "2022-10-01",
"value": {
"searches": 103757,
"days_in_advance": 40.3,
"length_of_stay": 5,
"partition": 100
}
},
{
"period": "2022-11-01",
"value": {
"searches": 103757,
"days_in_advance": 40.3,
"length_of_stay": 5,
"partition": 100
}
}
]
},
{
"group": [
{
"name": "origin_country",
"value": "es"
}
],
"series": [
{
"period": "2022-10-01",
"value": {
"searches": 103757,
"days_in_advance": 40.3,
"length_of_stay": 5,
"partition": 100
}
},
{
"period": "2022-11-01",
"value": {
"searches": 103757,
"days_in_advance": 40.3,
"length_of_stay": 5,
"partition": 100
}
}
]
}
]
},
"comparison": {
"timeframe": {
"search": {
"from": "2022-10-15",
"to": "2023-10-15"
},
"departure": {
"from": "2024-10-15",
"to": "2025-10-15"
}
},
"value": [
{
"group": [
{
"name": "origin_country",
"value": "fr"
}
],
"series": [
{
"period": "2022-10-01",
"value": {
"searches": 103757,
"days_in_advance": 40.3,
"length_of_stay": 5,
"partition": 100
}
},
{
"period": "2022-11-01",
"value": {
"searches": 103757,
"days_in_advance": 40.3,
"length_of_stay": 5,
"partition": 100
}
}
]
},
{
"group": [
{
"name": "origin_country",
"value": "es"
}
],
"series": [
{
"period": "2022-10-01",
"value": {
"searches": 103757,
"days_in_advance": 40.3,
"length_of_stay": 5,
"partition": 100
}
},
{
"period": "2022-11-01",
"value": {
"searches": 103757,
"days_in_advance": 40.3,
"length_of_stay": 5,
"partition": 100
}
}
]
}
]
},
"variation": [
{
"group": [
{
"name": "origin_country",
"value": "fr"
}
],
"series": [
{
"actual_period": "2021-01-01",
"comparison_period": "2020-11-01",
"value": {
"searches": {
"variation": "POSITIVE",
"value": 3
},
"days_in_advance": {
"variation": "POSITIVE",
"value": 0.2
},
"length_of_stay": {
"variation": "POSITIVE",
"value": 0.1
},
"partition": {
"variation": "NEUTRAL",
"value": 0
}
}
},
{
"actual_period": "2021-02-01",
"comparison_period": "2020-12-01",
"value": {
"searches": {
"variation": "POSITIVE",
"value": 3
},
"days_in_advance": {
"variation": "POSITIVE",
"value": 0.2
},
"length_of_stay": {
"variation": "POSITIVE",
"value": 0.1
},
"partition": {
"variation": "NEUTRAL",
"value": 0
}
}
}
]
},
{
"group": [
{
"name": "origin_country",
"value": "es"
}
],
"series": [
{
"actual_period": "2021-01-01",
"comparison_period": "2020-11-01",
"value": {
"searches": {
"variation": "POSITIVE",
"value": 3
},
"days_in_advance": {
"variation": "POSITIVE",
"value": 0.2
},
"length_of_stay": {
"variation": "POSITIVE",
"value": 0.1
},
"partition": {
"variation": "NEUTRAL",
"value": 0
}
}
},
{
"actual_period": "2021-02-01",
"comparison_period": "2020-12-01",
"value": {
"searches": {
"variation": "POSITIVE",
"value": 3
},
"days_in_advance": {
"variation": "POSITIVE",
"value": 0.2
},
"length_of_stay": {
"variation": "POSITIVE",
"value": 0.1
},
"partition": {
"variation": "NEUTRAL",
"value": 0
}
}
}
]
}
]
},
"paging": {
"last": "/overall/series/grouped/compare?page=9&page_size=2&period=month&geometry_id=379c730942e570d586a5520770c0a65d&compare_from=2020-11-01&from=2021-01-01&group_type=network&to=2021-02-28&compare_to=2020-12-31",
"first": "/overall/series/grouped/compare?page=1&page_size=2&period=month&geometry_id=379c730942e570d586a5520770c0a65d&compare_from=2020-11-01&from=2021-01-01&group_type=network&to=2021-02-28&compare_to=2020-12-31",
"prev": null,
"next": "/overall/series/grouped/compare?page=2&page_size=2&period=month&geometry_id=379c730942e570d586a5520770c0a65d&compare_from=2020-11-01&from=2021-01-01&group_type=network&to=2021-02-28&compare_to=2020-12-31",
"current": "/overall/series/grouped/compare?page=1&page_size=2&period=month&geometry_id=379c730942e570d586a5520770c0a65d&compare_from=2020-11-01&from=2021-01-01&group_type=network&to=2021-02-28&compare_to=2020-12-31",
"pages": [
{
"number": 1,
"uri": "/overall/series/grouped/compare?page=1&page_size=2&period=month&geometry_id=379c730942e570d586a5520770c0a65d&compare_from=2020-11-01&from=2021-01-01&group_type=network&to=2021-02-28&compare_to=2020-12-31"
},
{
"number": 2,
"uri": "/overall/series/grouped/compare?page=2&page_size=2&period=month&geometry_id=379c730942e570d586a5520770c0a65d&compare_from=2020-11-01&from=2021-01-01&group_type=network&to=2021-02-28&compare_to=2020-12-31"
},
{
"number": 3,
"uri": "/overall/series/grouped/compare?page=3&page_size=2&period=month&geometry_id=379c730942e570d586a5520770c0a65d&compare_from=2020-11-01&from=2021-01-01&group_type=network&to=2021-02-28&compare_to=2020-12-31"
},
{
"number": 4,
"uri": "/overall/series/grouped/compare?page=4&page_size=2&period=month&geometry_id=379c730942e570d586a5520770c0a65d&compare_from=2020-11-01&from=2021-01-01&group_type=network&to=2021-02-28&compare_to=2020-12-31"
},
{
"number": 5,
"uri": "/overall/series/grouped/compare?page=5&page_size=2&period=month&geometry_id=379c730942e570d586a5520770c0a65d&compare_from=2020-11-01&from=2021-01-01&group_type=network&to=2021-02-28&compare_to=2020-12-31"
}
],
"elements": [
1,
2
],
"total": 17,
"size": 2
}
}