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.
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
The name of the planet.
Minimum mass of the planet in Jupiters.
Maximum mass of the planet in Jupiters.
Minimum average radius of the planet in Jupiters.
Maximum average radius of the planet in Jupiters.
Minimum orbital period of the planet in Earth days.
Maximum orbital period of the planet in Earth days.
Minimum average surface temperature of the planet in Kelvin.
Maximum average surface temperature of the planet in Kelvin.
Minimum distance the planet is from Earth in light years.
Maximum distance the planet is from Earth in light years.
Minimum semi major axis of planet in astronomical units (AU).
Maximum semi major axis of planet in astronomical units (AU).
Number of results to offset for pagination.