Resource
Empty Legs
Returns the available empty-leg flights: listed, not expired, and not blocked. Results are sorted by departure date, earliest first.
GET/open/v1/empty-legsempty_leg:read
Query parameters
| Param | Type | Description |
|---|---|---|
| page | integer | 1-based page number. Default 1. Values below 1 are clamped to 1; a page past the last page returns an empty records array. |
| size | integer | Items per page. Default 20, maximum 100. Out-of-range values are clamped into the 1–100 range. |
| depDate | string | Desired departure date, ISO yyyy-MM-dd (UTC). A leg matches when its flyable window [startDate, endDate] overlaps depDate ± offsetDays. A window that lies entirely in the past returns an empty page; a window that reaches today still matches normally. |
| offsetDays | integer | Flexibility around depDate, 0–15 days. Default 0 (exact-day window). A non-zero value without depDate returns INVALID_PARAMETER. |
| depCityName | string | Departure city, case-insensitive contains match on the English name (e.g. hai matches Shanghai and Zhuhai). 2–100 characters after trimming; blank values are ignored. |
| arrCityName | string | Arrival city; same rules as depCityName. |
| depAirportCode | string | Departure airport code, case-insensitive exact match: 4 letters = ICAO (ZSSS), 3 letters = IATA (SHA). Legs with no departure airport assigned never match this filter. |
| arrAirportCode | string | Arrival airport code; same rules as depAirportCode. |
Out-of-range page / size values are clamped, not rejected; an out-of-range offsetDays returns 400 INVALID_PARAMETER. A non-integer page or size (e.g. page=abc) also returns 400 INVALID_PARAMETER.
All filters are optional and combined with AND. An unknown city name or airport code is a valid query — it returns an empty page, not an error; 400 INVALID_PARAMETER is returned only for invalid parameter values (bad format, out-of-range, or a non-zero offsetDays without depDate), never for a valid query with no matches.
Response — data
| Field | Type | Description |
|---|---|---|
| records | EmptyLeg[] | Page of empty legs. |
| total | integer | Total matching legs. |
| page | integer | Current page. |
| size | integer | Page size. |
The EmptyLeg object
| Field | Type | Description |
|---|---|---|
| id | string | Unique empty-leg identifier. |
| startDate | string | Departure date, ISO 8601 yyyy-MM-dd, e.g. "2026-06-17". Local date at the departure location — the departure airport's timezone, or the departure city's timezone when the airport is unknown. |
| endDate | string | Arrival/expiry date, same format. |
| depCityName | string | Departure city. |
| depAirportName | string · null | Departure airport name. May be null. |
| depAirportIcao | string · null | Departure ICAO code, e.g. KTEB. |
| depAirportIata | string · null | Departure IATA code, e.g. TEB. |
| depCountryName | string · null | Departure country name, e.g. United States. May be null. |
| depCountryCode | string · null | Departure country ISO 3166-1 alpha-2 code, e.g. US. May be null. |
| arrCityName | string | Arrival city. |
| arrAirportName | string · null | Arrival airport name. May be null. |
| arrAirportIcao | string · null | Arrival ICAO code. |
| arrAirportIata | string · null | Arrival IATA code. |
| arrCountryName | string · null | Arrival country name. May be null. |
| arrCountryCode | string · null | Arrival country ISO 3166-1 alpha-2 code. May be null. |
| airlineName | string · null | Operating carrier. |
| aircraftModelName | string · null | Model, e.g. Challenger 850. |
| aircraftType | string · null | Category, e.g. Heavy Jet. |
| registration | string · null | Tail number. |
| aircraftImg | string · null | Aircraft photo URL. |
| makeYear | integer · null | Year of manufacture. |
| renovateYear | integer · null | Year of last refurbishment. |
| seatNum | integer · null | Number of passenger seats. |
| price | number · null | Empty-leg price, e.g. 12500.00. May be null. |
| currency | string · null | ISO 4217 currency code, e.g. USD. May be null. |
| amenities | Amenity[] | On-board amenities. |
The Amenity object
| Field | Type | Description |
|---|---|---|
| amenityType | string | Raw type code: wifi, smoking, pets, bed, toilet, medical. |
| amenityName | string | Display name, e.g. WIFI, Bed. |
| amenityDesc | string | Human-readable detail, e.g. WIFI (Extra 3,333 USD/MB), 2 beds, 1 lavatory. |
Request
curl "https://openapi.avi-go.com/open/v1/empty-legs?page=1&size=20" \
-H "X-API-Key: ag_live_8f2c9d1b…"Request — filtered
curl "https://openapi.avi-go.com/open/v1/empty-legs\
?depCityName=Shanghai&depAirportCode=SHA\
&arrCityName=Beijing&depDate=2026-10-01&offsetDays=3" \
-H "X-API-Key: ag_live_8f2c9d1b…"Response200 · OK
{
"code": "OK",
"message": "success",
"data": {
"records": [{
"id": "el_3Nf8a2",
"startDate": "2026-06-17",
"endDate": "2026-06-17",
"depCityName": "New York",
"depAirportName": "Teterboro Airport",
"depAirportIcao": "KTEB",
"depAirportIata": "TEB",
"depCountryName": "United States",
"depCountryCode": "US",
"arrCityName": "West Palm Beach",
"arrAirportName": "Palm Beach Intl",
"arrAirportIcao": "KPBI",
"arrAirportIata": "PBI",
"arrCountryName": "United States",
"arrCountryCode": "US",
"airlineName": "Vista Jet",
"aircraftModelName": "Challenger 850",
"aircraftType": "Heavy Jet",
"registration": "9H-ILI",
"makeYear": 2008,
"renovateYear": 2019,
"seatNum": 14,
"price": 12500.00,
"currency": "USD",
"amenities": [
{ "amenityType": "wifi", "amenityName": "WIFI",
"amenityDesc": "WIFI (Extra 3,333 USD/MB)" },
{ "amenityType": "bed", "amenityName": "Bed",
"amenityDesc": "2 beds" },
{ "amenityType": "toilet", "amenityName": "Toilet",
"amenityDesc": "1 lavatory" }
]
}],
"total": 176,
"page": 1,
"size": 20
},
"traceId": "05707ab9-22e9-49aa-ba12-f469c6622131"
}