api-ninjas-com Planets API

The Planets API provides key statistics for thousands of planets and exoplanets discovered in the known universe.

Operations 1

GET /v1/planets Get a list of planets #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/api-ninjas-com:api-ninjas-com-planets-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

api-ninjas-com-planets-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ninjas Planets API
  description: 'Combined OpenAPI specification for every API Ninjas endpoint. Requests go to https://api.api-ninjas.com with an `X-Api-Key` header; get a free key at https://api-ninjas.com/register. Human-readable docs: https://api-ninjas.com/api. Index for LLMs: https://api-ninjas.com/llms.txt.'
  version: 1.0.0
  contact:
    name: API Ninjas
    url: https://api-ninjas.com
  license:
    name: Proprietary
servers:
- url: https://api.api-ninjas.com
  description: API Ninjas Production
security:
- ApiKeyAuth: []
tags:
- name: Planets
  description: The Planets API provides key statistics for thousands of planets and exoplanets discovered in the known universe.
paths:
  /v1/planets:
    get:
      summary: Get a list of planets
      description: 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.
      parameters:
      - name: name
        in: query
        description: The name of the planet.
        required: false
        schema:
          type: string
      - name: min_mass
        in: query
        description: Minimum mass of the planet in Jupiters.
        required: false
        schema:
          type: number
      - name: max_mass
        in: query
        description: Maximum mass of the planet in Jupiters.
        required: false
        schema:
          type: number
      - name: min_radius
        in: query
        description: Minimum average radius of the planet in Jupiters.
        required: false
        schema:
          type: number
      - name: max_radius
        in: query
        description: Maximum average radius of the planet in Jupiters.
        required: false
        schema:
          type: number
      - name: min_period
        in: query
        description: Minimum orbital period of the planet in Earth days.
        required: false
        schema:
          type: integer
      - name: max_period
        in: query
        description: Maximum orbital period of the planet in Earth days.
        required: false
        schema:
          type: integer
      - name: min_temperature
        in: query
        description: Minimum average surface temperature of the planet in Kelvin.
        required: false
        schema:
          type: integer
      - name: max_temperature
        in: query
        description: Maximum average surface temperature of the planet in Kelvin.
        required: false
        schema:
          type: integer
      - name: min_distance_light_year
        in: query
        description: Minimum distance the planet is from Earth in light years.
        required: false
        schema:
          type: number
      - name: max_distance_light_year
        in: query
        description: Maximum distance the planet is from Earth in light years.
        required: false
        schema:
          type: number
      - name: min_semi_major_axis
        in: query
        description: Minimum semi major axis of planet in astronomical units (AU).
        required: false
        schema:
          type: number
      - name: max_semi_major_axis
        in: query
        description: Maximum semi major axis of planet in astronomical units (AU).
        required: false
        schema:
          type: number
      - name: offset
        in: query
        description: Number of results to offset for pagination.
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: A list of planets
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Planet'
        '400':
          $ref: '#/components/responses/PlanetsOpenapi_BadRequest'
        '401':
          $ref: '#/components/responses/PlanetsOpenapi_Unauthorized'
        '500':
          $ref: '#/components/responses/PlanetsOpenapi_InternalServerError'
      security:
      - ApiKeyAuth: []
      tags:
      - Planets
      operationId: getV1Planets
      x-operation-id-source: derived
components:
  responses:
    PlanetsOpenapi_InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
    PlanetsOpenapi_Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
    PlanetsOpenapi_BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
  schemas:
    Planet:
      type: object
      properties:
        name:
          type: string
          description: The name of the planet.
        mass:
          type: number
          description: Mass of the planet in Jupiters.
        radius:
          type: number
          description: Average radius of the planet in Jupiters.
        period:
          type: integer
          description: Orbital period of the planet in Earth days.
        semi_major_axis:
          type: number
          description: Semi major axis of planet in astronomical units (AU).
        temperature:
          type: integer
          description: Average surface temperature of the planet in Kelvin.
        distance_light_year:
          type: number
          description: Distance the planet is from Earth in light years.
        host_star_mass:
          type: number
          description: Mass of the host star in solar masses.
        host_star_temperature:
          type: integer
          description: Temperature of the host star in Kelvin.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
externalDocs:
  description: API Ninjas documentation
  url: https://api-ninjas.com/api