# NASA Mars — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Explore real-time images, weather data, and location tracking from NASA's Perseverance and Curiosity rovers on Mars, while discovering mission details, rock sample findings, and the latest news from the Mars Exploration Program. Access rover photos, scientific discoveries, and multimedia content to stay updated on current Mars exploration activities.

**Category:** Government & Public Data | **Website:** [mars.nasa.gov/](https://mars.nasa.gov/) | **Docs:** [parse.bot/marketplace/46f93778-6785-4f9e-ba9a-8e208f439d6a/mars-nasa-gov-api](https://parse.bot/marketplace/46f93778-6785-4f9e-ba9a-8e208f439d6a/mars-nasa-gov-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-mars-nasa-gov-api-46f93778/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_curiosity_location

Get the current location and full traverse path of the Curiosity rover as GeoJSON FeatureCollections. The traverse contains path segments as LineString/MultiLineString features. The waypoints contain individual drive positions with sol, coordinates, distance traveled, and drive type.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mars-nasa-gov-api-46f93778/get_curiosity_location \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_curiosity_raw_images

Retrieve raw images captured by the Curiosity rover with optional filters for sol, camera, and pagination. Returns image metadata including URL, instrument name, capture timestamps, and sol number. Ordered by sol descending by default.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `camera` | string | No | Filter by camera instrument name (e.g. 'NAV_LEFT_B', 'CHEMCAM_RMI', 'MAHLI', 'MAST_LEFT'). |
| `page` | integer | No | Zero-based page number. |
| `per_page` | integer | No | Number of results per page. |
| `sol` | integer | No | Filter by Martian sol number. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mars-nasa-gov-api-46f93778/get_curiosity_raw_images \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"camera":"<string>","page":"<integer>","per_page":"<integer>","sol":"<integer>"}'
```

### get_mars_facts

Get key planetary facts about Mars organized by topic sections. Returns structured content parsed from NASA's Mars facts page covering Introduction, Namesake, Potential for Life, Size and Distance, Orbit and Rotation, Moons, Rings, Formation, Structure, Surface, A Very Large Canyon, The Largest Volcano, Water on Mars, Atmosphere, and Magnetosphere.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mars-nasa-gov-api-46f93778/get_mars_facts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_mars_multimedia

Search and browse Mars multimedia resources (images, videos, panoramas). Returns paginated content from NASA's science resource library filtered to the Mars category. Each item includes title, excerpt, permalink, publish date, and thumbnail image data. Use the page parameter to navigate through results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum results per page. |
| `page` | integer | No | One-based page number. |
| `query` | string | No | Search query to filter multimedia results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mars-nasa-gov-api-46f93778/get_mars_multimedia \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","page":"<integer>","query":"<string>"}'
```

### get_mars_news

Retrieve latest Mars news and feature articles. Returns paginated news content from NASA filtered to the Mars category. Includes press releases, posts, and resources with title, excerpt, permalink, publish date, and thumbnail image data. Use the page parameter to navigate through results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum results per page. |
| `page` | integer | No | One-based page number. |
| `query` | string | No | Search query to filter news results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mars-nasa-gov-api-46f93778/get_mars_news \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","page":"<integer>","query":"<string>"}'
```

### get_mars_overview

Retrieve the NASA global navigation structure. Returns an array of top-level categories (Missions, Humans in Space, Earth & Climate, etc.) each with their menu items and links. Useful for discovering the overall content organization.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mars-nasa-gov-api-46f93778/get_mars_overview \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_mars_weather

Get weather and environmental data for the Perseverance or Curiosity rover, including temperature, pressure, sunrise/sunset times, and season information. Returns data for multiple recent sols. Temperature and pressure values may be '--' when sensor data is unavailable.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `rover` | string | No | Rover name: 'perseverance' or 'curiosity'. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mars-nasa-gov-api-46f93778/get_mars_weather \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rover":"<string>"}'
```

### get_mission_detail

Get detailed navigation structure for a specific mission by its slug. Returns navigation links (with submenus for each section) and post details for the mission page. Slugs correspond to mission identifiers used by NASA's science portal (e.g. 'mars-2020-perseverance', 'msl-curiosity').

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Mission slug identifier (e.g. 'mars-2020-perseverance', 'msl-curiosity'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mars-nasa-gov-api-46f93778/get_mission_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>"}'
```

### get_perseverance_location

Get the current location and full traverse path of the Perseverance rover as GeoJSON FeatureCollections. The traverse contains one LineString feature per sol-drive with distance and coordinates. The current_location contains the latest waypoint with elevation, total distance traveled, and site/drive identifiers.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mars-nasa-gov-api-46f93778/get_perseverance_location \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_perseverance_raw_images

Retrieve raw images captured by the Perseverance rover with optional filters for sol, camera, and pagination. Returns image metadata including URLs for multiple resolutions (small, medium, large, full_res), camera info, capture timestamps, and sol number. Ordered by sol descending by default.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `camera` | string | No | Filter by camera instrument name (e.g. 'NAVCAM_LEFT', 'FRONT_HAZCAM_LEFT_A', 'MCZ_RIGHT', 'MCZ_LEFT'). |
| `num` | integer | No | Number of images to return per page. |
| `page` | integer | No | Zero-based page number. |
| `sol` | integer | No | Filter by Martian sol number. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mars-nasa-gov-api-46f93778/get_perseverance_raw_images \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"camera":"<string>","num":"<integer>","page":"<integer>","sol":"<integer>"}'
```

### get_perseverance_rock_samples

Retrieve data on all rock and atmospheric samples collected by the Perseverance rover, returned as a GeoJSON FeatureCollection. Each feature includes sample name, type (Rock Core or Atmospheric), rock type, sol collected, date, outcrop name, and geographic coordinates.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mars-nasa-gov-api-46f93778/get_perseverance_rock_samples \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### list_mars_missions

List Mars missions. Returns active rover codes from the location API (e.g. 'M20', 'MSL') and mission links from the global navigation. The active_rovers array identifies rovers with operational location tracking; all_missions provides broader mission navigation links.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mars-nasa-gov-api-46f93778/list_mars_missions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
