# EVE Frontier Map & Routing API

> Solar systems, spatial lookups, nearby systems and route planning (fuel, time or balanced) for the EVE Frontier star map. 10 endpoints with CU costs.

The EVE Frontier star map: solar system names and details, nearby systems, systems near a point in space, and fuel, time and balanced routes between systems.

Part of the Voidwire API. Voidwire is a metered REST API for EVE Frontier data: markets, characters, tribes, hauling and the star map.

- Base URL: `https://api.voidwire.xyz`
- Authentication: `x-api-key` header (create keys at https://voidwire.xyz)
- HTML version: https://voidwire.xyz/docs/map
- Full API overview: https://voidwire.xyz/docs.md

## Endpoints

### GET /map/v1/routing/compare

Compare the fuel, time, and balanced routes at once.

Cost: 300 CU per call.

Runs the same search three times — once per optimization — and returns all
three routes, so a client can show the trade-off (fewer jumps versus less
fuel) without issuing three requests and without the results drifting apart
if the map reloads between calls.

This is three route calculations in one call and is priced accordingly;
prefer `/v1/routing/route` when only one optimization is needed. A 404 means
*no* optimization could connect the two systems under these parameters.

| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
| `origin` | query | yes | `string` | Solar system name to depart from (case-insensitive). |
| `destination` | query | yes | `string` | Solar system name to arrive at (case-insensitive). |
| `mass` | query | no | `number (double)` | Ship mass, in the game's mass units (default 1.0). |
| `gate_weight` | query | no | `number (double)` | How much to favour stargates over jump drives, 0.0–1.0, applied to the `balanced` result (default 0.5). |
| `max_jump_range_ly` | query | no | `number (double)` | Ship's maximum jump-drive range in light years (default 50.0). |

Response `200`: `RouteComparison`

- `balanced`: `Route` — Route interpolating between the two, weighted by `gate_weight`.
- `fastest`: `Route` — Route minimising travel time (prefers jump drives).
- `fuel_efficient`: `Route` — Route minimising fuel burn (prefers stargates).

```sh
curl "https://api.voidwire.xyz/map/v1/routing/compare?origin=<origin>&destination=<destination>" \
  -H "x-api-key: $VOIDWIRE_KEY"
```

### GET /map/v1/routing/route

Calculate a route between two solar systems.

Cost: 100 CU per call.

Runs an A* search over the stargate network plus every jump-drive hop within
`max_jump_range_ly`, and returns the ordered waypoints together with the
route's jump counts and travel distance.

**Choosing an optimization.** `time` minimises travel time and will take long
jump-drive hops to skip gate chains. `fuel` minimises fuel burn and prefers
stargates, which are free but slower. `balanced` interpolates between them
using `gate_weight`.

**Ship parameters matter.** `mass` scales fuel burn per light year, so a
heavier ship shifts `fuel` and `balanced` results toward gates;
`max_jump_range_ly` bounds which drive hops exist at all, so a short-range
ship may be routed entirely over gates — or get a 404 when no gate path
exists.

**Reading the result.** `total_cost.total_jumps` is the hop count a player
sees; `gate_jumps` and `drive_jumps` split it by hop type;
`total_distance_ly` is the whole path and `drive_distance_ly` only the
jump-drive portion. A 404 means either that a name has not been reported
by any player yet (the message says which), or that the systems are known
but unreachable under these parameters — retrying with a larger
`max_jump_range_ly` may succeed. Waypoints through systems whose name has
not been reported carry a `null` `solar_system_name`.

| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
| `origin` | query | yes | `string` | Solar system name to depart from (case-insensitive). |
| `destination` | query | yes | `string` | Solar system name to arrive at (case-insensitive). |
| `optimization` | query | no | `string` | Which cost to minimise: `fuel`, `time`, or `balanced` (default `time`). |
| `mass` | query | no | `number (double)` | Ship mass, in the game's mass units. Heavier ships burn more fuel per light year, so raising this pushes `fuel` and `balanced` routes toward stargates (default 1.0). |
| `gate_weight` | query | no | `number (double)` | How much to favour stargates over jump drives, 0.0–1.0, used only by `balanced` (default 0.5). 0.0 behaves like `time`, 1.0 like `fuel`. |
| `max_jump_range_ly` | query | no | `number (double)` | Ship's maximum jump-drive range in light years (default 50.0). Jumps longer than this are excluded from the graph before the search runs. |

Response `200`: `Route`

- `optimization`: `RouteOptimization` — Optimization the search actually used.
- `total_cost`: `RouteCost` — Jump counts and travel distance for the whole route.
- `waypoints`: `Waypoint[]` — Ordered waypoints, starting at the origin and ending at the destination.

```sh
curl "https://api.voidwire.xyz/map/v1/routing/route?origin=<origin>&destination=<destination>" \
  -H "x-api-key: $VOIDWIRE_KEY"
```

### GET /map/v1/routing/stats

Get routing graph coverage.

Cost: 20 CU per call.

Reports the size of the stargate and jump-drive graphs the router searches.
Use it to sanity-check which map revision a client is routing against, and
to see the default `max_jump_range_ly` the jump-drive edges were built with.

Response `200`: `RoutingStats`

- `connected_systems`: `integer` — Solar systems reachable over the stargate network. Lower than the total system count — not every system has a stargate.
- `jump_drive_edges`: `integer` — Jump-drive edges within the service's default maximum range.
- `max_jump_range_ly`: `number (double)` — Maximum jump-drive range used to build the default graph, in light years.
- `stargate_edges`: `integer` — Stargate edges in the graph (counted once per bidirectional link).

```sh
curl "https://api.voidwire.xyz/map/v1/routing/stats" \
  -H "x-api-key: $VOIDWIRE_KEY"
```

### GET /map/v1/solar-systems/names

Resolve solar system IDs to human-readable names.

Cost: 50 CU per call.

Batch-resolve numeric solar system IDs to their display names. Results are cached for 30 minutes. Pass a comma-separated list of IDs (max 200).

| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
| `ids` | query | yes | `string[]` | Comma-separated Sui object IDs (max 200) |

Response `200`: `SolarSystemName[]`

- `solar_system_id`: `integer` — Numeric solar system ID.
- `solar_system_name`: `string` — Human-readable solar system name, or null if unknown.

```sh
curl "https://api.voidwire.xyz/map/v1/solar-systems/names?ids=<ids>" \
  -H "x-api-key: $VOIDWIRE_KEY"
```

### GET /map/v1/spatial/coordinates/nearby

Find solar systems near a point in space.

Cost: 50 CU per call.

Returns every solar system whose center lies within `radius_ly` light years
of the given coordinates, nearest first.

Use this when the origin is not itself a solar system — a ship, structure, or
smart assembly position read from the chain. `x`, `y` and `z` are decimal
strings in meters (see `Coordinates`), the same representation the market-data
API uses for hub locations, so a hub's `x`/`y`/`z` can be passed straight
through as query parameters.

| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
| `x` | query | yes | `string` | X coordinate of the search origin, in meters (decimal string) |
| `y` | query | yes | `string` | Y coordinate of the search origin, in meters (decimal string) |
| `z` | query | yes | `string` | Z coordinate of the search origin, in meters (decimal string) |
| `radius_ly` | query | yes | `number (double)` | Search radius in light years (positive, max 10,000) |
| `limit` | query | no | `integer` | Maximum systems to return, nearest first (default 100, max 1,000) |

Response `200`: `CoordinateSearchResponse`

- `count`: `integer` — Number of systems returned (after `limit` is applied).
- `location`: `Coordinates` — The point the search ran from, echoed back in meters.
- `radius_ly`: `string` — Radius the search used, in light years (decimal string).
- `systems`: `NearbySystem[]` — Systems within the radius, nearest first.

```sh
curl "https://api.voidwire.xyz/map/v1/spatial/coordinates/nearby?x=<x>&y=<y>&z=<z>&radius_ly=<radius_ly>" \
  -H "x-api-key: $VOIDWIRE_KEY"
```

### GET /map/v1/spatial/stats

Get star-map coverage.

Cost: 20 CU per call.

Reports how many solar systems the coordinate index holds. Use it to confirm
the dataset a client is querying against before caching results.

Response `200`: `SpatialStatsResponse`

- `known_solar_system_names`: `integer` — Number of solar systems whose name a player has reported and this instance has cached. Only these can be looked up by name.
- `status`: `string` — Service status. `operational` when the index is loaded and queryable.
- `total_systems`: `integer` — Number of solar systems in the coordinate index.

```sh
curl "https://api.voidwire.xyz/map/v1/spatial/stats" \
  -H "x-api-key: $VOIDWIRE_KEY"
```

### GET /map/v1/spatial/systems

Look up many solar systems at once.

Cost: 50 CU per call.

Resolves up to 100 solar systems in one call. Pass either
`solar_system_ids` or `solar_system_names` — not both.

Identifiers that match nothing are omitted from `systems` rather than
returned as nulls — including names no player has reported yet — so
compare `count` against the number you asked for to detect misses. Prefer
this over looping the single-system endpoint: it costs one call instead of N.

| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
| `solar_system_ids` | query | no | `string` | Comma-separated solar system IDs (max 100) |
| `solar_system_names` | query | no | `string` | Comma-separated solar system names (max 100, case-insensitive) |

Response `200`: `BatchSystemsResponse`

- `count`: `integer` — Number of systems resolved.
- `systems`: `SolarSystem[]` — Resolved systems. Identifiers that matched nothing are omitted rather than returned as nulls, so `count` may be lower than the number requested.

```sh
curl "https://api.voidwire.xyz/map/v1/spatial/systems" \
  -H "x-api-key: $VOIDWIRE_KEY"
```

### GET /map/v1/spatial/systems/{solar_system}

Get one solar system.

Cost: 20 CU per call.

Resolves a solar system by name or numeric ID and returns its coordinates,
constellation, and region.

The path segment is treated as a `solar_system_id` when it parses as an
integer and as a case-insensitive `solar_system_name` otherwise, so both
`/v1/spatial/systems/EHK-KH7` and `/v1/spatial/systems/30000142` resolve the
same system.

| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
| `solar_system` | path | yes | `string` | Solar system name (case-insensitive) or numeric solar system ID |

Response `200`: `SolarSystem`

- `constellation_id`: `integer,null (int64)` (optional) — Constellation containing this system, or `null` when unknown.
- `location`: `Coordinates` — Position of the system, in meters.
- `region_id`: `integer,null (int64)` (optional) — Region containing this system, or `null` when unknown. Matches `region_id` on the market-data API's hub and trade responses.
- `solar_system_id`: `integer (int64)` — Numeric solar system ID.
- `solar_system_name`: `string,null` (optional) — Human-readable solar system name, or `null` until a player has reported it. Names are player-discovered, so a system can be found by ID long before it can be found by name.

```sh
curl "https://api.voidwire.xyz/map/v1/spatial/systems/<solar_system>" \
  -H "x-api-key: $VOIDWIRE_KEY"
```

### GET /map/v1/spatial/systems/{solar_system}/nearby

Find solar systems near another solar system.

Cost: 50 CU per call.

Returns every solar system whose center lies within `radius_ly` light years
of the given system, nearest first. The origin system itself is not included.

Use this to answer "what is within jump-drive range of here" — pair it with
`max_jump_range_ly` on the routing endpoints, or with the market-data API's
`/v1/hubs/nearby-by-system` to find trade hubs in the same neighbourhood.

Results are capped by `limit` (default 100, max 1,000) *after* sorting by
distance, so a large radius with a small limit returns the nearest systems
rather than an arbitrary subset.

| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
| `solar_system` | path | yes | `string` | Solar system name (case-insensitive) or numeric solar system ID |
| `radius_ly` | query | yes | `number (double)` | Search radius in light years (positive, max 10,000) |
| `limit` | query | no | `integer` | Maximum systems to return, nearest first (default 100, max 1,000) |

Response `200`: `NearbySystemsResponse`

- `count`: `integer` — Number of systems returned (after `limit` is applied).
- `radius_ly`: `string` — Radius the search used, in light years (decimal string).
- `solar_system_id`: `integer (int64)` — Numeric ID of the system searched from.
- `solar_system_name`: `string,null` (optional) — Name of the system searched from, or `null` until a player has reported it.
- `systems`: `NearbySystem[]` — Systems within the radius, nearest first. Excludes the origin system.

```sh
curl "https://api.voidwire.xyz/map/v1/spatial/systems/<solar_system>/nearby?radius_ly=<radius_ly>" \
  -H "x-api-key: $VOIDWIRE_KEY"
```

### GET /map/v1/spatial/systems/search/autocomplete

Autocomplete solar system names.

Cost: 20 CU per call.

Returns solar systems whose name starts with `q`, matched case-insensitively
and sorted alphabetically.

Only systems whose name a player has reported are searched, so a prefix
that matches nothing today may match once more of the map is discovered.

Intended for type-ahead inputs: it is served from an in-memory prefix index
and returns only identifiers, so it is far cheaper than the full system
lookup. Resolve the chosen suggestion with `/v1/spatial/systems/{solar_system}`
when you need coordinates.

| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
| `q` | query | yes | `string` | Name prefix to search (case-insensitive, at least 1 character) |
| `limit` | query | no | `integer` | Maximum suggestions to return (default 10, max 50) |

Response `200`: `AutocompleteResponse`

- `count`: `integer` — Number of suggestions returned.
- `systems`: `SolarSystemSuggestion[]` — Matching systems, sorted alphabetically.

```sh
curl "https://api.voidwire.xyz/map/v1/spatial/systems/search/autocomplete?q=<q>" \
  -H "x-api-key: $VOIDWIRE_KEY"
```
