curl --request POST \
--url https://api.anysite.io/api/momondo/flights/search \
--header 'Content-Type: application/json' \
--header 'access-token: <api-key>' \
--data '
{
"origin": "<string>",
"destination": "<string>",
"depart_date": "2023-12-25",
"count": 2,
"timeout": 300,
"return_date": "2023-12-25",
"trip_type": "round_trip",
"cabin_class": "economy",
"adults": 1,
"max_stops": 1,
"airlines": [],
"alliances": [],
"max_price": 1,
"max_duration_hours": 1,
"carry_on_bags": 1,
"checked_bags": 1,
"sort": "best"
}
'import requests
url = "https://api.anysite.io/api/momondo/flights/search"
payload = {
"origin": "<string>",
"destination": "<string>",
"depart_date": "2023-12-25",
"count": 2,
"timeout": 300,
"return_date": "2023-12-25",
"trip_type": "round_trip",
"cabin_class": "economy",
"adults": 1,
"max_stops": 1,
"airlines": [],
"alliances": [],
"max_price": 1,
"max_duration_hours": 1,
"carry_on_bags": 1,
"checked_bags": 1,
"sort": "best"
}
headers = {
"access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
origin: '<string>',
destination: '<string>',
depart_date: '2023-12-25',
count: 2,
timeout: 300,
return_date: '2023-12-25',
trip_type: 'round_trip',
cabin_class: 'economy',
adults: 1,
max_stops: 1,
airlines: [],
alliances: [],
max_price: 1,
max_duration_hours: 1,
carry_on_bags: 1,
checked_bags: 1,
sort: 'best'
})
};
fetch('https://api.anysite.io/api/momondo/flights/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.anysite.io/api/momondo/flights/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'origin' => '<string>',
'destination' => '<string>',
'depart_date' => '2023-12-25',
'count' => 2,
'timeout' => 300,
'return_date' => '2023-12-25',
'trip_type' => 'round_trip',
'cabin_class' => 'economy',
'adults' => 1,
'max_stops' => 1,
'airlines' => [
],
'alliances' => [
],
'max_price' => 1,
'max_duration_hours' => 1,
'carry_on_bags' => 1,
'checked_bags' => 1,
'sort' => 'best'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anysite.io/api/momondo/flights/search"
payload := strings.NewReader("{\n \"origin\": \"<string>\",\n \"destination\": \"<string>\",\n \"depart_date\": \"2023-12-25\",\n \"count\": 2,\n \"timeout\": 300,\n \"return_date\": \"2023-12-25\",\n \"trip_type\": \"round_trip\",\n \"cabin_class\": \"economy\",\n \"adults\": 1,\n \"max_stops\": 1,\n \"airlines\": [],\n \"alliances\": [],\n \"max_price\": 1,\n \"max_duration_hours\": 1,\n \"carry_on_bags\": 1,\n \"checked_bags\": 1,\n \"sort\": \"best\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anysite.io/api/momondo/flights/search")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"origin\": \"<string>\",\n \"destination\": \"<string>\",\n \"depart_date\": \"2023-12-25\",\n \"count\": 2,\n \"timeout\": 300,\n \"return_date\": \"2023-12-25\",\n \"trip_type\": \"round_trip\",\n \"cabin_class\": \"economy\",\n \"adults\": 1,\n \"max_stops\": 1,\n \"airlines\": [],\n \"alliances\": [],\n \"max_price\": 1,\n \"max_duration_hours\": 1,\n \"carry_on_bags\": 1,\n \"checked_bags\": 1,\n \"sort\": \"best\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anysite.io/api/momondo/flights/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"origin\": \"<string>\",\n \"destination\": \"<string>\",\n \"depart_date\": \"2023-12-25\",\n \"count\": 2,\n \"timeout\": 300,\n \"return_date\": \"2023-12-25\",\n \"trip_type\": \"round_trip\",\n \"cabin_class\": \"economy\",\n \"adults\": 1,\n \"max_stops\": 1,\n \"airlines\": [],\n \"alliances\": [],\n \"max_price\": 1,\n \"max_duration_hours\": 1,\n \"carry_on_bags\": 1,\n \"checked_bags\": 1,\n \"sort\": \"best\"\n}"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"@type": "MomondoItinerary",
"price": 123,
"currency": "<string>",
"is_best": true,
"is_cheapest": true,
"is_cheapest_direct": true,
"provider_name": "<string>",
"booking_url": "<string>",
"booking_option_count": 123,
"provider_count": 123,
"url": "<string>",
"legs": [],
"options": []
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}/momondo/flights/search
Search momondo flights between two places for a given date, trip type, cabin class and passenger mix. Returns ranked itineraries with the cheapest price and booking deeplink, per-provider booking options, full leg and segment details (airports, departure/arrival times, duration, stop count, operating airline, flight number and aircraft), and best/cheapest flags. For round trips pass a return date. Optional filters narrow the results by max stops, airlines, alliances, max price, max leg duration and included carry-on/checked bags. Origin and destination are airport or metro codes (resolve them via the places search).
Price: 20 credits per 50 results
⚠️ Common errors: 412: No flights found for the given route, date and passenger combination
curl --request POST \
--url https://api.anysite.io/api/momondo/flights/search \
--header 'Content-Type: application/json' \
--header 'access-token: <api-key>' \
--data '
{
"origin": "<string>",
"destination": "<string>",
"depart_date": "2023-12-25",
"count": 2,
"timeout": 300,
"return_date": "2023-12-25",
"trip_type": "round_trip",
"cabin_class": "economy",
"adults": 1,
"max_stops": 1,
"airlines": [],
"alliances": [],
"max_price": 1,
"max_duration_hours": 1,
"carry_on_bags": 1,
"checked_bags": 1,
"sort": "best"
}
'import requests
url = "https://api.anysite.io/api/momondo/flights/search"
payload = {
"origin": "<string>",
"destination": "<string>",
"depart_date": "2023-12-25",
"count": 2,
"timeout": 300,
"return_date": "2023-12-25",
"trip_type": "round_trip",
"cabin_class": "economy",
"adults": 1,
"max_stops": 1,
"airlines": [],
"alliances": [],
"max_price": 1,
"max_duration_hours": 1,
"carry_on_bags": 1,
"checked_bags": 1,
"sort": "best"
}
headers = {
"access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
origin: '<string>',
destination: '<string>',
depart_date: '2023-12-25',
count: 2,
timeout: 300,
return_date: '2023-12-25',
trip_type: 'round_trip',
cabin_class: 'economy',
adults: 1,
max_stops: 1,
airlines: [],
alliances: [],
max_price: 1,
max_duration_hours: 1,
carry_on_bags: 1,
checked_bags: 1,
sort: 'best'
})
};
fetch('https://api.anysite.io/api/momondo/flights/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.anysite.io/api/momondo/flights/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'origin' => '<string>',
'destination' => '<string>',
'depart_date' => '2023-12-25',
'count' => 2,
'timeout' => 300,
'return_date' => '2023-12-25',
'trip_type' => 'round_trip',
'cabin_class' => 'economy',
'adults' => 1,
'max_stops' => 1,
'airlines' => [
],
'alliances' => [
],
'max_price' => 1,
'max_duration_hours' => 1,
'carry_on_bags' => 1,
'checked_bags' => 1,
'sort' => 'best'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anysite.io/api/momondo/flights/search"
payload := strings.NewReader("{\n \"origin\": \"<string>\",\n \"destination\": \"<string>\",\n \"depart_date\": \"2023-12-25\",\n \"count\": 2,\n \"timeout\": 300,\n \"return_date\": \"2023-12-25\",\n \"trip_type\": \"round_trip\",\n \"cabin_class\": \"economy\",\n \"adults\": 1,\n \"max_stops\": 1,\n \"airlines\": [],\n \"alliances\": [],\n \"max_price\": 1,\n \"max_duration_hours\": 1,\n \"carry_on_bags\": 1,\n \"checked_bags\": 1,\n \"sort\": \"best\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anysite.io/api/momondo/flights/search")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"origin\": \"<string>\",\n \"destination\": \"<string>\",\n \"depart_date\": \"2023-12-25\",\n \"count\": 2,\n \"timeout\": 300,\n \"return_date\": \"2023-12-25\",\n \"trip_type\": \"round_trip\",\n \"cabin_class\": \"economy\",\n \"adults\": 1,\n \"max_stops\": 1,\n \"airlines\": [],\n \"alliances\": [],\n \"max_price\": 1,\n \"max_duration_hours\": 1,\n \"carry_on_bags\": 1,\n \"checked_bags\": 1,\n \"sort\": \"best\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anysite.io/api/momondo/flights/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"origin\": \"<string>\",\n \"destination\": \"<string>\",\n \"depart_date\": \"2023-12-25\",\n \"count\": 2,\n \"timeout\": 300,\n \"return_date\": \"2023-12-25\",\n \"trip_type\": \"round_trip\",\n \"cabin_class\": \"economy\",\n \"adults\": 1,\n \"max_stops\": 1,\n \"airlines\": [],\n \"alliances\": [],\n \"max_price\": 1,\n \"max_duration_hours\": 1,\n \"carry_on_bags\": 1,\n \"checked_bags\": 1,\n \"sort\": \"best\"\n}"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"@type": "MomondoItinerary",
"price": 123,
"currency": "<string>",
"is_best": true,
"is_cheapest": true,
"is_cheapest_direct": true,
"provider_name": "<string>",
"booking_url": "<string>",
"booking_option_count": 123,
"provider_count": 123,
"url": "<string>",
"legs": [],
"options": []
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
API token from the dashboard
Headers
Body
33x >= 120 <= x <= 1500round_trip, one_way economy, premium_economy, business, first 1 <= x <= 90 <= x <= 2one_world, sky_team, star_alliance x > 0x > 00 <= x <= 30 <= x <= 3best, cheapest, quickest Response
Successful Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes