Planets
All eight planets of the Solar System in one flat array, ordered by distance from the Sun. Each record captures the planet's classification (terrestrial, gas-giant, or ice-giant), mean volumetric radius in kilometres, mass in kilograms as a scientific-notation string, semi-major axis distance in astronomical units, known natural satellite count, and sidereal orbital period in Earth days — making it straightforward to build solar-system visualisations, educational tools, or unit-conversion references.
Quick fetch
Stable URL. CORS-enabled. No auth.
curl https://staticdata.dev/v1/planets.json
Or use as a typed import:
import { planets } from "https://staticdata.dev/v1/planets.ts"
Formats
- JSON 1.4 KB
/v1/planets.json
min: 1.0 KB · /v1/planets.min.json
- CSV 468 B
/v1/planets.csv
- TypeScript 1.6 KB
/v1/planets.ts
export const planets
type Planet = (typeof planets)[number]
Schema
Each record in the dataset has the following shape.
| Field | Type | Description | Example |
|---|---|---|---|
| name | string | IAU name of the planet | Earth |
| type | string | Planet classification: terrestrial, gas-giant, or ice-giant | terrestrial |
| massKg | string | Mass in kilograms as a scientific-notation string | 5.972e+24 |
| radiusKm | number | Mean volumetric radius in kilometres | 6371 |
| distanceAu | number | Semi-major axis distance from the Sun in astronomical units | 1 |
| moons | number | Count of confirmed natural satellites | 1 |
| orbitalPeriodDays | number | Sidereal orbital period in Earth days | 365.25 |
Preview
First 8 records.
| name | type | massKg | radiusKm | distanceAu | moons |
|---|---|---|---|---|---|
| Mercury | terrestrial | 3.301e+23 | 2439.7 | 0.387 | 0 |
| Venus | terrestrial | 4.867e+24 | 6051.8 | 0.723 | 0 |
| Earth | terrestrial | 5.972e+24 | 6371 | 1 | 1 |
| Mars | terrestrial | 6.417e+23 | 3389.5 | 1.524 | 2 |
| Jupiter | gas-giant | 1.898e+27 | 69911 | 5.203 | 115 |
| Saturn | gas-giant | 5.683e+26 | 58232 | 9.537 | 293 |
| Uranus | ice-giant | 8.682e+25 | 25362 | 19.191 | 29 |
| Neptune | ice-giant | 1.024e+26 | 24622 | 30.069 | 16 |
Fetch examples
Drop-in snippets in five languages.
curl -sSL https://staticdata.dev/v1/planets.json | jq '.[0]' import type { Planet } from "https://staticdata.dev/v1/planets.ts";
const res = await fetch("https://staticdata.dev/v1/planets.min.json");
if (!res.ok) throw new Error(`Fetch failed: ${res.status}`);
const planets: Planet[] = await res.json();
console.log(planets[0]); import urllib.request, json
with urllib.request.urlopen("https://staticdata.dev/v1/planets.min.json") as r:
planets = json.load(r)
print(planets[0]) package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
resp, err := http.Get("https://staticdata.dev/v1/planets.min.json")
if err != nil { panic(err) }
defer resp.Body.Close()
var data []map[string]any
if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
panic(err)
}
fmt.Println(data[0])
} use serde_json::Value;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let body = ureq::get("https://staticdata.dev/v1/planets.min.json").call()?.into_string()?;
let data: Vec<Value> = serde_json::from_str(&body)?;
println!("{:?}", data.first());
Ok(())
} Sources and methodology
Values are curated from the NASA Planetary Fact Sheet maintained by David R. Williams at the NASA Goddard Space Flight Center. Mass figures are given as scientific-notation strings (e.g. "5.972e+24") rather than raw floats to avoid JavaScript floating-point precision loss at these scales. Radii are mean volumetric radii in kilometres. Distance from the Sun is the semi-major axis of the orbit expressed in astronomical units (1 AU ≈ 149 597 870.7 km).
Planet type follows the IAU 2006 definition and common planetary-science usage: the four inner rocky worlds (Mercury through Mars) are terrestrial; Jupiter and Saturn, which are predominantly hydrogen and helium, are gas giants; and Uranus and Neptune, whose bulk compositions are dominated by water, methane, and ammonia ices, are ice giants. Moon counts reflect natural satellites with confirmed orbits as of October 2026 — Saturn leads with 293 and Jupiter follows with 115 after the Minor Planet Center announcements of 2025–2026; Uranus has 29 and Neptune 16. These counts change frequently as small irregular moons are confirmed.
Orbital periods are sidereal periods in Earth days. Records are ordered by increasing semi-major axis (distance from the Sun), which is the natural sort order for solar-system datasets and aligns with the conventional mnemonic ordering from Mercury to Neptune.
Versioning
URLs under /v1/ are stable: field names and types will not change in a way
that breaks consumers. Values can be corrected or records added when the upstream source
changes; schema-incompatible updates ship under a new version path. See the
planets changelog for this dataset's history.