staticdata.dev
Menu
Datasets About Contact

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.

v1.0.0 MIT 8 records Updated 2026-10-05 stable Source:  NASA Planetary Fact Sheet

Quick fetch

Stable URL. CORS-enabled. No auth.

bash
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

    Open

    min: 1.0 KB · /v1/planets.min.json

  • CSV 468 B

    /v1/planets.csv

    Open
  • TypeScript 1.6 KB

    /v1/planets.ts

    export const planets

    type Planet = (typeof planets)[number]

    Open

Schema

Each record in the dataset has the following shape.

Schema
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.

Data preview
nametypemassKgradiusKmdistanceAumoons
Mercuryterrestrial3.301e+232439.70.3870
Venusterrestrial4.867e+246051.80.7230
Earthterrestrial5.972e+24637111
Marsterrestrial6.417e+233389.51.5242
Jupitergas-giant1.898e+27699115.203115
Saturngas-giant5.683e+26582329.537293
Uranusice-giant8.682e+252536219.19129
Neptuneice-giant1.024e+262462230.06916

Showing 8 of 8. View full data:  JSON · CSV

Fetch examples

Drop-in snippets in five languages.

curl
curl -sSL https://staticdata.dev/v1/planets.json | jq '.[0]'
JavaScript
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]);
Python
import urllib.request, json

with urllib.request.urlopen("https://staticdata.dev/v1/planets.min.json") as r:
    planets = json.load(r)

print(planets[0])
Go
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])
}
Rust
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.

More Geo datasets