# Searching airports

## Searching using a query

## Search Airports using a text query

<mark style="color:blue;">`GET`</mark> `https://api.aviowiki.com/free/airports/search`

This endpoint allows you to conduct an airport search using a free-text query string.

#### Query Parameters

| Name  | Type   | Description                                                                     |
| ----- | ------ | ------------------------------------------------------------------------------- |
| page  | number | The page number for pagination, starting from \`0\` to indicate the first page. |
| size  | number | The number of results in a page, for pagination.                                |
| query | string | The query string you want to look for.                                          |

#### Headers

| Name          | Type   | Description                              |
| ------------- | ------ | ---------------------------------------- |
| Authorization | String | An API Token using Bearer authorization. |

{% tabs %}
{% tab title="200 The query succeeded and 0 or more results are returned." %}

```
{
  "page": {
    "number": 0,
    "size": 10,
    "totalPages": 1,
    "totalResults": 2
  },
  "content": [
    {
      "country": {
        "iso2": "GB",
        "iso3": "GBR",
        "isoNumeric": 826,
        "name": "United Kingdom",
        "officialName": "United Kingdom of Great Britain and Northern Ireland"
      },
      "timeZone": "Europe/London",
      "aid": "APT-FO61-WBTO",
      "coordinates": {
        "latitude": 51.4775,
        "longitude": -0.4613889
      },
      "icao": "EGLL",
      "iata": "LHR",
      "faa": null,
      "servedCity": "London",
      "servedCityGoverningDistrict": null,
      "name": "Heathrow Airport"
    },
    {
      "country": {
        "iso2": "US",
        "iso3": "USA",
        "isoNumeric": 840,
        "name": "United States",
        "officialName": "United States of America"
      },
      "timeZone": "America/Chicago",
      "aid": "APT-PEKY-N349",
      "coordinates": {
        "latitude": 44.4641394,
        "longitude": -89.3587256
      },
      "icao": null,
      "iata": null,
      "faa": "WS14",
      "servedCity": "Amherst, WI",
      "servedCityGoverningDistrict": {
        "code": "US-WI",
        "name": "Wisconsin",
        "administrativeType": "State"
      },
      "name": "Lake Ell Field"
    }
  ]
}
```

{% endtab %}
{% endtabs %}

### Format of the returned  objects

The response will be a Paged List of results. Each result object contains a limited set of information that we consider to be essential to identify a location.

For this endpoint the properties available in the response are:

<table data-header-hidden><thead><tr><th>Property</th><th width="229.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>Property</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td></tr><tr><td><code>aid</code></td><td>string</td><td>A string with the AID of the airport, with <code>APT</code> as namespace</td></tr><tr><td><code>icao</code></td><td>string, <code>null</code></td><td>A string with the 4-letters <a href="https://en.wikipedia.org/wiki/ICAO_airport_code">ICAO code</a> of the airport, or<code>null</code> if none is assigned</td></tr><tr><td><code>iata</code></td><td>string, <code>null</code></td><td>A string with the 3-letters <a href="https://en.wikipedia.org/wiki/IATA_airport_code">IATA code</a> of the airport, or <code>null</code> if none is assigned.</td></tr><tr><td><code>faa</code></td><td>string, <code>null</code></td><td>A string with the <a href="https://en.wikipedia.org/wiki/Location_identifier#FAA_identifier">FAA code</a>, or <code>null</code> if none is assigned.</td></tr><tr><td><code>coordinates</code></td><td>object, <code>null</code></td><td>A Coordinates object which represents the location of the <a href="https://en.wikipedia.org/wiki/Airport_reference_point">Aerodrome Reference Point</a>.<br>This is <code>null</code> when the information is not known.</td></tr><tr><td><code>country</code></td><td>object, <code>null</code></td><td>A Country object which represents the country at which an airport is located.<br><code>null</code> if this is not known.</td></tr><tr><td><code>timeZone</code></td><td>string, <code>null</code></td><td>The timezone of the airfield as noted in the <a href="https://en.wikipedia.org/wiki/Tz_database">IANA Time Zone Database</a>.<br><code>null</code> indicates that this information is not available.</td></tr><tr><td><code>name</code></td><td>string, <code>null</code></td><td>The name of the airport. This should be the official name of the airport written in Latin characters.</td></tr><tr><td><code>servedCity</code></td><td>string, <code>null</code></td><td>A string containing the name of the city served by the airport. In some countries, like the USA, this includes the state. For example: <code>Los Angeles, CA</code>.<br>This is <code>null</code> when the information is not known.</td></tr></tbody></table>


---

# 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.aviowiki.com/free-endpoints/free-airport-endpoints/free-airport-search.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.
