api-ninjas-com Stars API

The Stars API provides key statistics for thousands of stars discovered in the known universe.

Operations 1

GET /v1/stars Get a list of stars #

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-stars-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-stars-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ninjas Stars 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: Stars
  description: The Stars API provides key statistics for thousands of stars discovered in the known universe.
paths:
  /v1/stars:
    get:
      summary: Get a list of stars
      description: Get a list of stars 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 star.
        required: false
        schema:
          type: string
      - name: constellation
        in: query
        description: The constellation that the star belongs to.
        required: false
        schema:
          type: string
      - name: min_apparent_magnitude
        in: query
        description: Minimum apparent magnitude brightness of the star.
        required: false
        schema:
          type: number
      - name: max_apparent_magnitude
        in: query
        description: Maximum apparent magnitude brightness of the star.
        required: false
        schema:
          type: number
      - name: min_absolute_magnitude
        in: query
        description: Minimum absolute magnitude brightness of the star.
        required: false
        schema:
          type: number
      - name: max_absolute_magnitude
        in: query
        description: Maximum absolute magnitude brightness of the star.
        required: false
        schema:
          type: number
      - name: min_distance_light_year
        in: query
        description: Minimum distance the star is from Earth in light years.
        required: false
        schema:
          type: number
      - name: max_distance_light_year
        in: query
        description: Maximum distance the star is from Earth in light years.
        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 stars
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Star'
        '400':
          $ref: '#/components/responses/StarsOpenapi_BadRequest'
        '401':
          $ref: '#/components/responses/StarsOpenapi_Unauthorized'
        '500':
          $ref: '#/components/responses/StarsOpenapi_InternalServerError'
      security:
      - ApiKeyAuth: []
      tags:
      - Stars
      operationId: getV1Stars
      x-operation-id-source: derived
components:
  schemas:
    Star:
      type: object
      properties:
        name:
          type: string
          description: The name of the star.
        constellation:
          type: string
          description: The constellation that the star belongs to.
        right_ascension:
          type: string
          description: The right ascension of the star.
        declination:
          type: string
          description: The declination of the star.
        apparent_magnitude:
          type: string
          description: The apparent magnitude brightness of the star.
        absolute_magnitude:
          type: string
          description: The absolute magnitude brightness of the star.
        distance_light_year:
          type: string
          description: The distance the star is from Earth in light years.
        spectral_class:
          type: string
          description: The spectral class of the star.
  responses:
    StarsOpenapi_InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
    StarsOpenapi_Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
    StarsOpenapi_BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
externalDocs:
  description: API Ninjas documentation
  url: https://api-ninjas.com/api