Airports Lookup API - Dart/Flutter Client

Airports is a simple tool for getting airport data. It returns the airport name, location, and more.

pub package License: MIT

This is the Dart/Flutter client for the Airports Lookup API.

Installation

Add this to your pubspec.yaml:

dependencies:
  apiverve_airports: ^1.1.14

Then run:

dart pub get
# or for Flutter
flutter pub get

Usage

import 'package:apiverve_airports/apiverve_airports.dart';

void main() async {
  final client = AirportsClient('YOUR_API_KEY');

  try {
    final response = await client.execute({
      'iata': 'MCI'
    });

    print('Status: ${response.status}');
    print('Data: ${response.data}');
  } catch (e) {
    print('Error: $e');
  }
}

Response

{
  "status": "ok",
  "error": null,
  "data": {
    "icao": "KMCI",
    "iata": "MCI",
    "name": "Kansas City International Airport",
    "city": "Kansas City",
    "state": "Missouri",
    "country": "US",
    "elevation": 1026,
    "lat": 39.2975997925,
    "lon": -94.7138977051,
    "tz": "America/Chicago",
    "city_info": {
      "name": "Kansas City",
      "altName": "",
      "country": "US"
    }
  }
}

API Reference

Authentication

All requests require an API key. Get yours at apiverve.com.

License

MIT License - see LICENSE for details.


Built with Dart for APIVerve

Libraries

apiverve_airports
Airports Lookup API client for Dart/Flutter