Flight search is a live SteadyAPI product, and the public how-tos never walk through it. Hotel search is already drafted. This guide covers the flight side: turn a city or airport name into a location code, then pull offers, times, and prices.
👉 To access these endpoints, you must obtain an API key: https://steadyapi.com/register
Authentication
Every call uses a Bearer token from your SteadyAPI dashboard.
Documentation:
https://docs.steadyapi.com/#authenticating-requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY'
}
1. Resolve an airport
Search accepts locations in CODE.TYPE form, such as CVG.AIRPORT. Autocomplete returns that id for you.
Endpoint: GET /v1/booking/flights/autocomplete
Documentation:
https://docs.steadyapi.com/#bookingcom-GETapi-v1-booking-flights-autocomplete
Parameters
search— required search term (example:cvg)language— optional language code (defaulten)
Python
import requests
url = "https://api.steadyapi.com/v1/booking/flights/autocomplete"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
params = {"search": "cvg", "language": "en"}
response = requests.get(url, headers=headers, params=params)
response.raise_for_status()
matches = response.json().get("body", [])
place = matches[0]
print(place["name"], place["code"], place["id"], place["city"])
Response fields
Each item in body includes:
id— location id to pass asfromorto(code plus type, such asCVG.AIRPORT)type— location type, such asAIRPORTname— airport or place namecode— airport codecity,region, andcountry
2. Search flight offers
Pass the autocomplete ids as from and to. Departure must be today or later. A round trip also needs return.
Endpoint: GET /v1/booking/flights/search
Documentation:
https://docs.steadyapi.com/#bookingcom-GETapi-v1-booking-flights-search
Parameters
from— required origin, such asCVG.AIRPORTto— required destination, such asOKC.AIRPORTdepart— required departure date,YYYY-MM-DD, today or latertype— required trip type:ROUNDTRIP,ONEWAY, orMULTICITYadults— required, 1 to 9return— required whentypeisROUNDTRIP, on or afterdepartcabinClass— optional:ECONOMY,PREMIUM_ECONOMY,BUSINESS, orFIRST(defaultECONOMY)children— optional comma-separated agessort— optional:BEST,PRICE, orDURATIONcurrency— optional currency codelanguage— optional language codepage— optional page number (default 1)pageSize— optional results per page (default 10, max 100)
Python
from datetime import date, timedelta
depart = (date.today() + timedelta(days=21)).isoformat()
ret = (date.today() + timedelta(days=24)).isoformat()
search_url = "https://api.steadyapi.com/v1/booking/flights/search"
search_params = {
"from": "CVG.AIRPORT",
"to": "OKC.AIRPORT",
"depart": depart,
"return": ret,
"type": "ROUNDTRIP",
"adults": 1,
"cabinClass": "ECONOMY",
"sort": "PRICE",
}
search = requests.get(search_url, headers=headers, params=search_params)
search.raise_for_status()
payload = search.json()
offers = payload.get("body", {}).get("flightOffers", [])
for offer in offers[:5]:
segment = offer["segments"][0]
total = offer.get("priceBreakdown", {}).get("total", {}).get("amount")
print(segment["departureAirport"]["code"], segment["arrivalAirport"]["code"], segment["departureTime"], total)
Response fields
meta includes total_results, total_pages, current_page, and page_size. Each item in body.flightOffers includes:
token— offer token for a later details callsegments[].departureAirport.codeandsegments[].arrivalAirport.codesegments[].departureTimeandsegments[].arrivalTimesegments[].legs[].flightInfo.flightNumbersegments[].legs[].flightInfo.carrierInfo.marketingCarriersegments[].legs[].carriersData— airlinename,code, andlogopriceBreakdown.total.amount,priceBreakdown.baseFare.amount, andpriceBreakdown.tax.amount
Practical use
Resolve both ends with autocomplete, then page through offers with page and pageSize. Sort with PRICE when you want the cheapest fare first. Offer details are a separate call, GET /v1/booking/flights/details, using the token from search.
Documentation:
https://docs.steadyapi.com/#bookingcom-GETapi-v1-booking-flights-details
👉 Get your API key and search flights: https://steadyapi.com/register