# 2s Airport Near — Nearby Airport Lookup by Coordinates

> 2s Airport Near — Nearby Airport Lookup by Coordinates is a paid API for AI agents from 2s.io, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Returns a ranked list of airports within a specified radius of a given lat/lon coordinate, with optional filters for airport type, country, and scheduled commercial service.

## Facts

- Endpoint: GET https://2s.io/api/airport/near
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-airport-near-nearby-airport-lookup-by-coordinates-71c67189
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mX1b5khcag-MoVA3PC7qY

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 2s-airport-near-nearby-airport-lookup-by-coordinates-71c67189
```

Example prompt: Find me all large airports with scheduled commercial service within 300 km of coordinates 48.8566° N, 2.3522° E — return up to 10 results.

## When to prefer this

Use this endpoint when an agent needs to discover airports geographically near a point given as coordinates — especially useful for travel planning, logistics routing, aviation queries, or enriching location data with nearby aviation infrastructure. Prefer over flight-search APIs when the goal is airport discovery rather than flight booking or scheduling.

## Known failure modes

- Missing required lat or lon parameters returns a validation error
- lat out of range (-90 to 90) or lon out of range (-180 to 180) returns a schema validation error
- radius_km exceeding 2000 or below 1 returns an error
- Invalid country code format (not 2-letter ISO) returns an error
- No airports found within the specified radius returns an empty items array
- Payment failure via x402 returns HTTP 402 before the query is executed

## How this service works

Airports within a radius of a coordinate, sorted by distance. Query: lat (-90..90), lon (-180..180), radius_km (1-2000, default 200), limit (1-100, default 20), type (optional: large_airport|medium_airport|small_airport|heliport|seaplane_base|balloonport|closed), country (optional 2-letter ISO 3166-1), scheduled_service (optional bool, true = commercial-service airports only). Returns { query, count, airports: [{ id, ident, name, iataCode, icaoCode, type, latitude, longitude, distanceKm, ... }] }.

## Output

A JSON array of airport objects sorted by distance, each including the airport's name, IATA code, ICAO code, type, municipality, ISO country, ISO region, scheduled service flag, and great-circle distance in km from the query point. Also includes the echoed query parameters and data source/license metadata.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "lat": 40.7128,
   "lon": -74.006,
   "limit": 10,
   "radius_km": 100
  }
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "lat",
      "lon"
     ],
     "properties": {
      "lat": {
       "type": "number",
       "maximum": 90,
       "minimum": -90,
       "description": "Latitude in decimal degrees (-90 to 90)."
      },
      "lon": {
       "type": "number",
       "maximum": 180,
       "minimum": -180,
       "description": "Longitude in decimal degrees (-180 to 180)."
      },
      "type": {
       "enum": [
        "large_airport",
        "medium_airport",
        "small_airport",
        "heliport",
        "seaplane_base",
        "balloonport",
        "closed"
       ],
       "type": "string",
       "description": "Filter by airport type."
      },
      "limit": {
       "type": "integer",
       "default": 20,
       "maximum": 100,
       "minimum": 1,
       "description": "Max airports to return (1-100). Default 20."
      },
      "country": {
       "type": "string",
       "description": "Filter by ISO 3166-1 alpha-2 country code (e.g. US)."
      },
      "radius_km": {
       "type": "number",
       "default": 200,
       "maximum": 2000,
       "minimum": 1,
       "description": "Search radius in kilometers (1-2000). Default 200."
      },
      "scheduled_service": {
       "type": "boolean",
       "description": "When true, only commercial-service airports."
      }
     },
     "additionalProperties": false
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-airport-near-nearby-airport-lookup-by-coordinates-71c67189/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
