I’m building a travel app in Go and I’m having trouble with a flight search API through RapidAPI. When I make requests for round trip flights, the API response only includes outbound flight information but completely ignores the return flight details.
Here’s the API response I’m getting:
{
"FlightOffers": [
{
"OfferId": 1,
"BasePrice": 425.0,
"NonStop": true,
"DepartingFlight": {
"AirlineIds": [902],
"FromId": 71823,
"ToId": 55432,
"TakeoffDate": "2019-12-01T00:00:00"
},
"SearchDateTime": "2019-11-29T14:24:00"
}
],
"Airports": [
{
"AirportId": 55432,
"Code": "LAX",
"FullName": "Los Angeles International",
"Category": "Airport",
"City": "Los Angeles",
"Country": "United States"
},
{
"AirportId": 71823,
"Code": "ORD",
"FullName": "Chicago O'Hare International",
"Category": "Airport",
"City": "Chicago",
"Country": "United States"
}
],
"Airlines": [
{
"AirlineId": 902,
"CompanyName": "United Airlines"
}
]
}
I’m clearly specifying both departure and return dates in my request, but the response only shows the outbound leg. Has anyone dealt with this issue before or knows what might be causing this problem?