✈️Oneway Trip API
In this API you will get prices from multiple airlines and vendors for a oneway route. You can pass any airport IATA code, future date, currency, and pax.
API endpoint for this API is: https://api.flightapi.io/onewaytrip
Each request to this API will cost 2 credits.
Guide
Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an error.
You can generate an API key from your Dashboard at any time.
Here is the list of default parameters you have to use with this API:
API Schema
You can follow this API schema to pass parameters.
https://api.flightapi.io/onewaytrip/<api-key>/<departure_airport_code>/<arrival_airport_code>/<departure_date>/<number_of_adults>/<number_of_childrens>/<number_of_infants>/<cabin_class>/<currency>
API Example
You have to send a GET request to https://api.flightapi.io/oneway
along with all the parameters.
Take a look at how you might call this API using various different coding languages.
Response
The sample response of the API will look somewhat like this.
It is just a sample API response. Some objects will have more attributes. New arrays will also be there.
Understanding the Response
In the JSON response, you may observe that many objects include references (IDs or codes) to objects from other lists. This pattern is employed in our API to prevent redundant data and reduce the overall size by allowing multiple objects to reference the same data.
Sometimes you might have to make more than one API call to get complete data. Since we compare a lot of airlines and vendors sometimes it becomes impossible to pull this much amount of data at once
Video Tutorial
Last updated