JustFly APIjustfly.com ↗
Search JustFly flights, autocomplete airports, retrieve fare details, and fetch trending destination deals via a structured REST API.
What is the JustFly 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.
curl -X GET 'https://api.parse.bot/scraper/4b07d4ca-2aa3-49ed-9243-0201d6e696ad/autocomplete_airport?query=New+York' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace justfly-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
from parse_apis.justfly_flight_search_api import JustFly, TripType, SeatClass, Airport, TrendingDeal, FlightSearch
client = JustFly()
# Search for airports matching "London"
for airport in client.airports.search(query="London"):
print(airport.code, airport.name, airport.country_name)
# Search for flights JFK → LAX
search_result = client.flightsearches.search(
origin="JFK",
destination="LAX",
departure_date="2026-08-01",
return_date="2026-08-08",
trip_type=TripType.ROUNDTRIP,
seat_class=SeatClass.ECONOMY,
)
print(search_result.search_id, search_result.all_package_count)
# Get details for the first package using the package_ids list
pkg_id = search_result.package_ids[0]
detail = client.flightpackages.get(search_id=search_result.search_id, package_id=pkg_id)
print(detail.validating_carrier, detail.price.total, detail.price.currency)
# Browse trending deals from NYC
for deal in client.trendingdeals.list(origin="NYC"):
print(deal.from_city, deal.to_city, deal.price, deal.currency)
Search for airports and cities by query string. Returns matching airports with IATA codes, city names, countries, and coordinates. Results include both city-level matches (with child airports) and individual airport matches.
| Param | Type | Description |
|---|---|---|
| queryrequired | string | Search query for airport or city name (e.g. 'New York', 'LAX', 'London') |
{
"type": "object",
"fields": {
"items": "array of matching airports/cities with Code, Name, Text, Type, CityName, CountryName, Airports"
},
"sample": {
"data": {
"items": [
{
"Code": "NYC",
"Name": "New York",
"Text": "NYC - New York All Airports, United States",
"Type": "City",
"Region": "New York",
"Airports": [
{
"Code": "LGA",
"Name": "La Guardia",
"Type": "Airport",
"CityName": "New York",
"CountryName": "United States"
}
],
"CityCode": null,
"CityName": "New York",
"IATACode": "NYC",
"Latitude": 40.71,
"Longitude": -74.01,
"CountryCode": "US",
"CountryName": "United States"
}
]
},
"status": "success"
}
}About the JustFly API
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.
The JustFly API is a managed, monitored endpoint for justfly.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when justfly.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official justfly.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- 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 | 100 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.