Public
Edited
Jan 16, 2023
Insert cell
Insert cell
apiEndpointBase = new URL(
"https://partners.api.skyscanner.net/apiservices/v3/"
)

Insert cell
apiKey = "prtl6749387986743898559646983194"

Insert cell
await fetch(new URL("flights/live/search/create", apiEndpointBase), {
method: 'POST',
headers: {
"x-api-key": apiKey,
},
body: JSON.stringify({
market: "US",
locale: "en-US",
currency: "USD",
queryLegs: [
{
originPlaceId: {
iata: "LAX",
},
destinationPlaceId: {
iata: "ABQ",
},
date: {
year: "2023",
month: "03",
day: "06",
},
},
{
originPlaceId: {
iata: "ABQ",
},
destinationPlaceId: {
iata: "LAX",
},
date: {
year: "2023",
month: "03",
day: "10",
},
},
],
adults: 1,
nearbyAirports: true,
}),
})
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more