← Back to API Ninjas
GET/v1/planets

Get a list of planets

Get a list of planets matching specified parameters. Returns at most 30 results. To access more than 30 results, use the offset parameter to offset results in multiple API calls.

API Ninjas·$0.001 per call

Example code

// Using @orth/sdk - The simplest way to call APIs // Install: npm install @orth/sdk import Orthogonal from "@orth/sdk"; const orthogonal = new Orthogonal({ apiKey: process.env.ORTHOGONAL_API_KEY, }); const output = await orthogonal.run({ api: "api-ninjas", path: "/v1/planets" }); console.log(output);

Query parameters

name
string

The name of the planet.

min_mass
number

Minimum mass of the planet in Jupiters.

max_mass
number

Maximum mass of the planet in Jupiters.

min_radius
number

Minimum average radius of the planet in Jupiters.

max_radius
number

Maximum average radius of the planet in Jupiters.

min_period
number

Minimum orbital period of the planet in Earth days.

max_period
number

Maximum orbital period of the planet in Earth days.

min_temperature
number

Minimum average surface temperature of the planet in Kelvin.

max_temperature
number

Maximum average surface temperature of the planet in Kelvin.

min_distance_light_year
number

Minimum distance the planet is from Earth in light years.

max_distance_light_year
number

Maximum distance the planet is from Earth in light years.

min_semi_major_axis
number

Minimum semi major axis of planet in astronomical units (AU).

max_semi_major_axis
number

Maximum semi major axis of planet in astronomical units (AU).

offset
number

Number of results to offset for pagination.

    Orthogonal - Giving AI agents the tools they need.