4 resources
Stars, Planets, Moons, Spacecraft
REST + JSON
Predictable endpoints under /api/v1
OpenAPI 3.x
Fully specified, try it live
Bearer auth
Separate read & write tokens
What is SpaceDB?
A structured REST API for celestial objects and human spaceflight. Build space-themed apps, power dashboards, or seed your own astronomy datasets.
- 🔭 Reference data for stars, planets, moons, and spacecraft
- 🔗 Relational — planets link to stars, moons link to planets
- 📄 JSON responses with built-in pagination (
page,per_page) - 🔐 Bearer tokens — read tokens for
GET, write tokens for full CRUD
Explore the data
⭐ Stars
Main-sequence, red giants, white dwarfs, neutron stars, supergiants. Mass, luminosity, temperature, distance.
🪐 Planets
Terrestrial, gas giants, ice giants, dwarf planets. Linked to host stars with orbital data.
🌙 Moons
Natural satellites with mass, radius, and orbital period — linked to their parent planet.
🚀 Spacecraft
Probes, stations, and rockets. Operators, launch dates, mission status, crew capacity.
Try it in 30 seconds
GET /api/v1/stars?page=1&per_page=25
Authorization: Bearer <your-read-token>
{
"data": [
{
"id": 1,
"name": "Sol",
"type": "main_sequence",
"mass_solar": 1,
"temperature_k": 5778,
"planet_count": 9
}
],
"links": { "first": "...", "last": "...", "prev": null, "next": null },
"meta": { "current_page": 1, "per_page": 25, "total": 8 }
}
Ready to launch?
🛠 Get started
Register, grab a bearer token, and make your first authenticated request.
📚 Browse the API
Full reference, live Try It, and OpenAPI spec download.