Explore mission design possibilities for reaching asteroids and comets.
Operation Axis is a free, no-auth, user-friendly API library that provides access to NASA JPL small-body mission design data. This project makes it easy to explore potential spacecraft routes to asteroids and comets. It’s designed for everyone from space enthusiasts and students to educators and mission planners who want to explore mission possibilities and timelines without complex software or specialized expertise.
Each release provides two configuations of the project.
- The bundled, minified format known as "production".
- The unbundled, unminified format known as "development".
https://github.com/LewisRandles/Operation-Axis/releases
// Using the unbundled version needs to be kept with the internal files.
import operationAxis from './scripts/operationAxis_bundled.js';
// Using the bundled version is standalone and has no internal files.
import operationAxis from './operationAxis_unbundled.js';Providing no parameters will result in the default information being set.
await operationAxis();The first parameter is providing the desired amount within the supported range.
| First Parameter | Type | Description |
|---|---|---|
amount |
string |
Supports a valid amount from 1 to 200. |
| Usage | Type | Description |
|---|---|---|
amount |
string |
amount decides the number of records to be retrieved form the SBDB. |
// Argument object.
await operationAxis({"amount": "2"});// External object.
const apiConfig = {
"amount": "2"
}
await operationAxis(apiConfig);The second parameter is providing the desired optimality within the supported range.
| Second Parameter | Type | Description |
|---|---|---|
optimality |
string |
Supports a valid optimality from 1 to 6. |
| Usage | Type | Description |
|---|---|---|
optimality |
string |
optimality decides the missiom profile. |
// Argument object.
await operationAxis({"amount": "2", "optimality": "4"});// External object.
const apiConfig = {
"amount": "2",
"optimality": "4"
}
await operationAxis(apiConfig);The third parameter is providing the desired timespan within the supported range.
| Third Parameter | Type | Description |
|---|---|---|
timespan |
string |
Supports a valid timeapan from 1 to 20. |
| Usage | Type | Description |
|---|---|---|
timespan |
string |
timespan decides the launch year or list of launch years. |
// Argument object.
await operationAxis({"amount": "2", "optimality": "4", "timespan": "2"});// External object.
const apiConfig = {
"amount": "2",
"optimality": "4",
"timespan": "2"
}
await operationAxis(apiConfig);During normalization, raw API fields such as ["(2025 UV7)", "2025-10-29", 60977] are combined with the corresponding fields array to produce structured objects such as "object0": { "name": "(2025 UV7)", "date0": "2025-10-29", "MJD0": 60977 };. Objects provide more reliable and consistent access than arrays while enabling easier manipulation and processing of nested data structures. Nested objects are flattened, redundant metadata and overlapping identifiers are removed, empty or missing fields are normalized, boolean and encoded values are standardized, and all data is organized into a uniform, consistent key-value JSON structure to produce a clean and predictable final result.
During sanitization, instead of leaving object values as null or undefined, missing or empty fields are filled with a placeholder such as "no value" to ensure that every key in the final result has a valid string; this prevents errors in downstream processing, makes the dataset fully predictable, and allows client applications to safely read and display all values without additional null checks.
This JSON serves as a configuration layer that lets you enable or disable individual parent and child fields and rename them through altName, giving you full control over which properties appear in the final output. Some values from the raw API return are intentionally omitted because they are considered unnecessary or not useful.
The parents group defines the top-level fields that can be enabled, disabled, or renamed, allowing you to control which main object properties appear in the output.
"parents": {
"item1": {
"name": {
"original": "defaultName",
"altName": "customName"
},
"used": true
},
...
}The children group manages the nested fields within those parent objects, giving similar control over which sub-properties are included and how they are labeled.
"children": {
"item1": {
"name": {
"original": "defaultName",
"altName": "customName"
},
"used": true,
"validate": "checkName"
},
...
}Try the hosted demo via GitHub Pages Demo
- For NASA's API information, the Small Bodies API
- For CorsProxy's information, the CorsProxy API
