# NASA Images API
> Search the NASA Image and Video Library — Apollo, Hubble, Mars rovers, the ISS and decades of mission imagery — and fetch the asset file URLs in every resolution for any item. Great for space, education, media, wallpaper and museum apps. All NASA media is public domain.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/nasa-api/..."
```

## Pricing
- **Free** (Free) — 7,500 calls/Mo, 3 req/s
- **Basic** ($6/Mo) — 120,000 calls/Mo, 8 req/s
- **Pro** ($19/Mo) — 600,000 calls/Mo, 20 req/s
- **Mega** ($54/Mo) — 2,500,000 calls/Mo, 50 req/s

## Endpoints

### NASA

#### `GET /v1/asset` — Asset file URLs by nasa_id

**Parameters:**
- `id` (query, required, string) — NASA media id Example: `jsc2007e034221`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/nasa-api/v1/asset?id=jsc2007e034221"
```

**Response:**
```json
{
    "data": {
        "files": [
            "https://images-assets.nasa.gov/image/jsc2007e034221/jsc2007e034221~orig.jpg",
            "https://images-assets.nasa.gov/image/jsc2007e034221/jsc2007e034221~large.jpg",
            "https://images-assets.nasa.gov/image/jsc2007e034221/jsc2007e034221~medium.jpg",
            "https://images-assets.nasa.gov/image/jsc2007e034221/jsc2007e034221~small.jpg",
            "https://images-assets.nasa.gov/image/jsc2007e034221/jsc2007e034221~thumb.jpg",
            "https://images-assets.nasa.gov/image/jsc2007e034221/metadata.json"
        ],
        "large": "https://images-assets.nasa.gov/image/jsc2007e034221/jsc2007e034221~large.jpg",
        "small": "https://images-assets.nasa.gov/image/jsc2007e034221/jsc2007e034221~small.jpg",
        "medium": "https://images-assets.nasa.gov/image/jsc2007e034221/jsc2007e034221~medium.jpg",
        "nasa_id": "jsc2007e034221",
        "original": "https://images-assets.nasa.gov/image/jsc2007e034221/jsc2007e034221~orig.jpg",
        "thumbnail": "https://images-assets.nasa.gov/image/jsc2007e034221/jsc2007e034221~thumb.jpg"
    },
    "meta": {
        "timestamp": "2026-05-30T05:19:44.285Z",
        "request_id": "bd6af833-61b0-4abd-8f82-93dcee00262e"
    },
    "status": "ok",
    "message": "Asset retrieved",
    "success": true
}
```

#### `GET /v1/search` — Search the media library

**Parameters:**
- `q` (query, required, string) — Search term Example: `apollo 11`
- `limit` (query, optional, string) — Max 1-50 Example: `12`
- `media_type` (query, optional, string) — image video audio Example: `image`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/nasa-api/v1/search?q=apollo+11&limit=12&media_type=image"
```

**Response:**
```json
{
    "data": {
        "count": 12,
        "query": "apollo 11",
        "total": 1510,
        "results": [
            {
                "title": "Apollo 11 spacecraft pre-launch",
                "center": "JSC",
                "nasa_id": "jsc2007e034221",
                "keywords": [
                    "Apollo",
                    "Apollo 11",
                    "Launch"
                ],
                "thumbnail": "https://images-assets.nasa.gov/image/jsc2007e034221/jsc2007e034221~medium.jpg",
                "media_type": "image",
                "description": "Personnel atop the 402-ft. Mobile Service Structure look back at the Apollo 11 spacecraft as the tower is moved away during a Countdown Demonstration Test. Photo filed 11 July 1969. ",
                "date_created": "1969-07-11T00:00:00Z",
                "photographer": null
            },
            {
                "title": "Apollo 11 50th Anniversary Celebration",
                "center": "HQ",
                "nasa_id": "NHQ201907190146",
                "keywords": [
                    "Apollo 11",
                    "Apollo 11 50th Anniversary",
                    "DC",
                    "Washington"
                ],
                "thumbnail": "https://images-assets.nasa.gov/image/NHQ201907190146/NHQ201907190146~medium.jpg",
                "media_type": "image",
                "description": "A visitor learns about circuits at the Apollo 11 50th Anniversary celebration on the Nati
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/nasa-api
OpenAPI spec: https://www.oanor.com/api/nasa-api/openapi.json
