# NASA Exoplanets on Onekey > 2 endpoints for NASA Exoplanets (2 stable, 0 beta), 5 credits each. Category: Maps, weather & space. One key, one JSON shape. Base URL: https://api.onekey.dev Auth: header `x-api-key: `. Call shape: `GET /v1/{platform}/{endpoint}?{params}`. Every response is `{success, data, metadata, error}`; check `success` first. Cost is in `metadata.credits_charged`. Free when served from cache (0.2 credit for a cached response over 100 KB). Failed and not-found calls are refunded. Status: stable = verified against the live source; beta = not yet verified, fields may be missing. Page: https://onekey.dev/platforms/exoplanets Reference (Markdown): https://onekey.dev/docs/api/exoplanets.md All docs: https://onekey.dev/llms.txt ## Canonical fields returned Unified-schema fields (same names on every platform), with how many of the 2 mapped NASA Exoplanets endpoints return each: - `entity.name` (string): 2 - plus 5 platform-specific fields under `ext.` ## Endpoints ### exoplanets.by_name Confirmed exoplanet by name (NASA Exoplanet Archive). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/exoplanets/by_name?name=Kepler-22%20b` with header `x-api-key: YOUR_API_KEY` - Parameters: - `name` (string, required): Planet name, e.g. Kepler-22 b - Fields returned: `entity.name`, `ext.host`, `ext.discoveryYear`, `ext.method`, `ext.orbitalPeriodDays`, `ext.radiusEarth` - Reference: https://onekey.dev/docs/api/exoplanets/by_name.md ### exoplanets.by_year Confirmed exoplanets discovered in a year (NASA Exoplanet Archive). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/exoplanets/by_year?year=2024` with header `x-api-key: YOUR_API_KEY` - Parameters: - `year` (string, required): Discovery year - Fields returned: `entity.name`, `ext.host`, `ext.discoveryYear`, `ext.method`, `ext.orbitalPeriodDays`, `ext.radiusEarth` - Reference: https://onekey.dev/docs/api/exoplanets/by_year.md ## Sample request ```bash curl "https://api.onekey.dev/v1/exoplanets/by_name?name=Kepler-22%20b" \ -H "x-api-key: YOUR_API_KEY" ```