The cheapest Ryanair fare to every destination served from an airport (or to one destination) in a date range, cheapest first: destination, price, flight number, departure and arrival times, previous price. Give return_from (and optionally return_to, nights_min, nights_max) for return trips with both legs and the total. Filters: destination country, maximum price, weekdays and departure time window.
Every response includes credits_used: the credits this call cost.
Parameters
name
type
description
fromrequired
string
Departure airport code (IATA). Example: DUB
to
string
Only this destination airport.
date_from
string
Earliest outbound date (YYYY-MM-DD). Default today.
date_to
string
Latest outbound date (YYYY-MM-DD). Default 30 days after date_from.
return_from
string
Earliest return date (YYYY-MM-DD): makes it a return-trip search.
return_to
string
Latest return date (YYYY-MM-DD). Default 30 days after return_from.
nights_min
integer
Return trips: minimum nights away.
nights_max
integer
Return trips: maximum nights away.
country
string
Only destinations in this country (2-letter code, e.g. ES).
max_price
number
Only fares up to this price (total for return trips).
days
string
Comma-separated outbound weekdays, e.g. fri,sat.
time_from
string
Earliest outbound departure time (HH:MM).
time_to
string
Latest outbound departure time (HH:MM).
return_time_from
string
Return trips: earliest return departure time (HH:MM).
return_time_to
string
Return trips: latest return departure time (HH:MM).
import os, requests
res = requests.get(
"https://api.api.sh/ryanair/v1/cheapest",
params={"from": "DUB"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json()
const url = new URL("https://api.api.sh/ryanair/v1/cheapest");
url.searchParams.set("from", "DUB");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json();
Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).
The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.