Exoplanets API - Dart/Flutter Client

Exoplanets returns NASA Exoplanet Archive data for about 6,000 confirmed planets outside the solar system. Look one up by name, list a star system, or filter by discovery method, year, planet type or habitable zone. Every plan gets the discovery facts, orbital period, radius, mass, planet type and distance. Paid plans add orbit shape, temperatures, density, sunlight received, the habitable-zone flag and host star physics.

pub package License: MIT

This is the Dart/Flutter client for the Exoplanets API.

Installation

Add this to your pubspec.yaml:

dependencies:
  apiverve_exoplanets: ^1.2.7

Then run:

dart pub get
# or for Flutter
flutter pub get

Usage

import 'package:apiverve_exoplanets/apiverve_exoplanets.dart';

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

  try {
    final response = await client.execute({
      'name': 'Kepler-22 b',
      'host': 'TRAPPIST-1',
      'method': 'transit',
      'year': 2016,
      'type': 'super-earth',
      'habitable': true,
      'limit': 25
    });

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

Response

{
  "status": "ok",
  "error": null,
  "data": {
    "query": "Kepler-22 b",
    "count": 1,
    "returned": 1,
    "planets": [
      {
        "name": "Kepler-22 b",
        "hostName": "Kepler-22",
        "letter": "b",
        "discoveryMethod": "Transit",
        "discoveryYear": 2011,
        "discoveryFacility": "Kepler",
        "discoveryTelescope": "0.95 m Kepler Telescope",
        "discoveredFromSpace": true,
        "controversial": false,
        "transits": true,
        "orbitalPeriodDays": 289.863876,
        "semiMajorAxisAu": 0.812,
        "eccentricity": 0.72,
        "inclinationDeg": 89.764,
        "radiusEarth": 2.1,
        "radiusJupiter": 0.1873,
        "massEarth": 9.1,
        "massJupiter": 0.02863,
        "massSource": "Mass",
        "densityGcm3": 5.2,
        "equilibriumTempK": 279,
        "insolationEarth": 1.013,
        "transitDurationHours": 7.415,
        "ra": 289.217205,
        "dec": 47.884143,
        "distanceParsecs": 194.642,
        "vMagnitude": 11.751,
        "planetType": "super-earth",
        "inHabitableZone": true,
        "distanceLightYears": 634.84,
        "star": {
          "name": "Kepler-22",
          "spectralType": "G5 V",
          "temperatureK": 5596,
          "radiusSun": 0.869,
          "massSun": 0.857,
          "metallicity": -0.255,
          "luminosityLogSun": -0.1902,
          "ageGyr": 7,
          "surfaceGravityLog": 4.443
        },
        "system": {
          "starCount": 1,
          "planetCount": 1,
          "moonCount": 0,
          "circumbinary": false
        }
      }
    ],
    "dataAsOf": "2026-11-28"
  }
}

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_exoplanets
Exoplanets API client for Dart/Flutter