justfly.com APIjustfly.com ↗
Search JustFly flights, autocomplete airports, retrieve fare details, and fetch trending destination deals via a structured REST API.
curl -X GET 'https://api.parse.bot/scraper/4b07d4ca-2aa3-49ed-9243-0201d6e696ad/autocomplete_airport?query=Chicago' \ -H 'X-API-Key: $PARSE_API_KEY'
Search for airports and cities by query string. Returns matching airports with IATA codes, city names, countries, and coordinates.
| Param | Type | Description |
|---|---|---|
| queryrequired | string | Search query for airport or city name (e.g. 'New York', 'LAX', 'London') |
{
"type": "object",
"fields": {
"data": "array of matching airports/cities with Code, Name, Text, Type, CityName, CountryName, Airports (child airports for city results)",
"status": "string, always 'success'"
},
"sample": {
"data": [
{
"Code": "CHI",
"Name": "Chicago FSS",
"Text": "CHI - Chicago All Airports, United States",
"Type": "City",
"Region": "IL",
"Airports": [
{
"Code": "ORD",
"Name": "Chicago O'hare International",
"Text": "ORD - Chicago O'hare International, Chicago, United States",
"Type": "Airport",
"CityCode": "CHI",
"CityName": "Chicago",
"IATACode": "ORD",
"CountryCode": "US",
"CountryName": "United States"
}
],
"CityCode": "CHI",
"CityName": "Chicago",
"IATACode": "CHI",
"Latitude": 41.878,
"Longitude": -87.63,
"CountryCode": "US",
"CountryName": "United States"
}
],
"status": "success"
}
}About the justfly.com API
The JustFly API covers 4 endpoints for querying live flight inventory, resolving airport IATA codes, and surfacing trending fare deals. The search_flights endpoint returns a search_id alongside paginated flight packages that include per-segment pricing, baggage info, and cabin class — everything you need to build a flight search or price-monitoring tool against JustFly's inventory.
Airport Lookup and Flight Search
The autocomplete_airport endpoint accepts a free-text query (city name, airport name, or IATA code) and returns an array of matching results. Each result includes Code, Name, CityName, CountryName, Type, and a nested Airports array for city-level results that expand into individual airport codes. This makes it straightforward to resolve user input into the IATA codes required by search_flights.
search_flights takes origin and destination IATA codes, a departure_date, and optional parameters including trip_type (roundtrip or oneway), return_date, seat_class (Economy, PremiumEconomy, Business, First), and adults. The response object includes a search_id, pagination metadata (total_pages, all_package_count, filtered_package_count), and a packages map keyed by package_id.
Flight Detail Retrieval
get_flight_details takes a search_id and package_id from a prior search_flights call and returns the full fare breakdown for that package. Response fields include tags, city_pairs (with individual segments and layovers), price, validating_carrier, baggage_info, and fare family options. Note that search_id references a cached search session — if the cache has expired, the detail call will not resolve, so detail lookups should follow search calls promptly.
Trending Deals
get_trending_destinations accepts an optional origin IATA code and an optional limit. It returns an array of deal objects each containing from, to, from_code, to_code, price, currency, from_date, to_date, and country. This endpoint is useful for building destination-discovery features or monitoring the cheapest roundtrip fares departing a specific airport.
- Build a flight price tracker that monitors fare changes for specific routes using
search_flightspackage pricing. - Power an airport autocomplete input field using
Code,CityName, andCountryNamefromautocomplete_airport. - Display a 'cheapest destinations' widget on a travel site using
get_trending_destinationsdeal objects. - Compare cabin class pricing across
Economy,Business, andFirstfor a given route and date. - Retrieve full fare family options and baggage allowances for a selected itinerary via
get_flight_details. - Build a one-way vs. roundtrip price comparison tool using the
trip_typeparameter insearch_flights. - Aggregate trending deals by
countryfield to identify the cheapest international destinations from a given origin.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does JustFly have an official public developer API?+
What does `search_flights` return and how do I get more detail on a result?+
search_flights returns a search_id and a packages map. Each package entry contains pricing, segment summaries, and baggage info. To get fare family options, layover breakdown, and the full city_pairs detail, pass the search_id and a package_id from that map into get_flight_details.Is there a time limit on using a `search_id` with `get_flight_details`?+
search_id references a cached search session on JustFly's backend. If too much time passes between the search_flights call and the get_flight_details call, the cache may expire and the detail request will fail. Run detail lookups shortly after the initial search.Does the API support multi-city itineraries?+
search_flights endpoint supports roundtrip and oneway trip types. Multi-city itinerary search is not exposed. You can fork this API on Parse and revise it to add a multi-city search endpoint.Does `get_trending_destinations` return one-way deals or only roundtrip fares?+
from_date and to_date fields, indicating roundtrip fare windows. One-way trending deals are not currently exposed by this endpoint. You can fork the API on Parse and revise it to surface one-way trending fares if the underlying data supports it.