# Getting Started!

All REST API calls will return `JSON or HTML` results.

Our API URL is: `https://api.flightapi.io/`

1. Each request should contain an API key. The API key will help us to identify your account.
2. If you exceed your plan connection limit, the API will respond with a 429 status code, this can be solved by slowing down your request rate
3. There is no overage allowed on the free plan, if you exceed 100 requests per 30 days on the free plan, you will receive a 429 error.
4. Each GET request will return a JSON response with a 200 response code.
5. 410 error occurs when there is no flight for that particular departure or arrival date.

| Error Codes | Description                                         |
| ----------- | --------------------------------------------------- |
| 200         | Request Successfull                                 |
| 404         | Either user is not found or there is no such flight |
| 410         | Request timeout error                               |

### Credit Cost of all APIs per request

| API                            | Cost |
| ------------------------------ | ---- |
| Oneway Trip API                | 2    |
| Round Trip API                 | 2    |
| Multi Trip API                 | 5    |
| Flight Tracking API            | 1    |
| Track Flights between Airports | 1    |
| Airline & Airport code API     | 1    |
| Airport Schedule API           | 2    |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flightapi.io/getting-started.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
