Skip to content

🔭 A JSON API providing realtime planetary positions in your night sky.

Notifications You must be signed in to change notification settings

csymlstd/visible-planets-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Visible Planets API

Get realtime planetary positions in your sky.

A free JSON API powered by Don Cross' JS Astronomy Engine.

Usage

Get a list of planets (and Moon) above the horizon.

GET https://api.visibleplanets.dev/v3?latitude=32&longitude=-98

Get a list of planets (and Moon) with their declination and right ascension coordinates.

GET https://api.visibleplanets.dev/v3?latitude=32&longitude=-98&showCoords=true

Query Parameters

Param Default Value Description Minimum Version Compatible
latitude 28.627222 Latitude of observer v1
longitude -80.620833 Longitude of observer v1
elevation 0 Elevation of observer in meters above sea level v1
time null Time of observation in ISO 8601 format, defaults to time of request v2
showCoords false Display declination and right ascension of each body, expects true or false v2
aboveHorizon true Set to false to display all planetary bodies even if they are below the horizon. v2

Changelog

2022-11-28

  • Moved the public api to fly.io with heroku sunsetting their hobby plans as of today. Please note the new permanent domain in usage.
  • Fixed an crash caused by new celestial bodies added to latest Astronomy Engine.
  • Updated default coordinates to Launchpad 39-B at NASA's Kennedy Space Center.

2022-10-08

v2

  • Added the aboveHorizon param to filter bodies that are above the horizon only, or show all bodies. Default value is true for backwards compatibility.

v3

  • This route now uses Don Cross' Astronomy Engine published on NPM.
  • The active Astronomy Engine version is provided in the response meta object as engineVersion
  • Added the aboveHorizon request param to filter bodies that are above the horizon only, or show all bodies. Default value is true for backwards compatibility.
  • Each body now includes the visual magnitude, the altitude and azimuth, and the constellation it can be seen in.
  • Right ascension and declination hours/degrees will no longer display negative values. Instead a new negative property will return true.

2021-05-04

v2

  • Changed declination response properties from hours to degrees, minutes to arcminutes, seconds to arcseconds,
  • Changed declination and right ascension response values from strings to numbers
  • Added query parameter to set time of observation using ISO 8601 format
  • Fixed typo in rightAscension response parameter
  • Response now follows JSON:API spec and includes parameters used to generate sky

About

🔭 A JSON API providing realtime planetary positions in your night sky.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published