Note that API URLs, parameters and returned data sets may change without advance notice. The supplied data is intended for hobby astronomers and is not verified for scientific applications. The API is restricted to personal and educational use.
Here is a simple API for programmers who wish to query the HIP stars database in an easy fashion, say, for software applications. Currently, only the Hipparcos Star stars (down to mag 6.5) and Nearby Stars (140 stars) tables are connected to this API.
Syntax: https://www.astropical.space/api.php?table=xxxx&which=xxxx&limit=xxxx&format=csv|xml|json
The data output sequence is:
ID, name, designation, HIP, HD, SAO, constellation, magnitude, distance (ly), radial velocity (km/s), spectrum, color index (bvc), Teff(°K), mass (solar), radius (solar), right ascension (hours decimal), declination (degrees decimal).
Results for nearby stars return empty attributes for HIP, HD and SAO as well as rad (radial velocity), unavailable parameters are either '0' or '-999'.
Recent browsers prohibit loading of local sources. If the returned result shows meaninglessly unformatted text, please open the source (right click: "View page source").
The base URL is https://www.astropical.space/
Get all stars in Ursa Minor in CSV
api.php?table=stars&which=constellation&limit=umi&format=csv
Try
Get all stars down to magnitude 2 in XML
api.php?table=stars&which=magnitude&limit=2&format=xml
Try
Get all stars up to 32 light-years in JSON
api.php?table=stars&which=distance&limit=32&format=json
Try
Get all stars of spectral class 'G' in XML
api.php?table=stars&which=spectrum&limit=g&format=xml
Try
Get all stars with radial velocity above ±100km/s in XML
api.php?table=stars&which=radial&limit=100&format=xml
Try
Get all stars with mass above 10 solar in CSV
api.php?table=stars&which=mass&limit=10&format=csv
Try
Get all stars with radius above 10 solar in XML
api.php?table=stars&which=radius&limit=10&format=xml
Try
Get by star common name in CSV
api.php?table=stars&which=name&limit=alde&format=csv
Try
Get by star designation (Bayer or Flamsted) in CSV
api.php?table=stars&which=designation&limit=zet&format=csv
Try
Get HIP 36850 (Castor) in CSV
api.php?table=stars&which=hip&limit=36850&format=csv
Try
Get Nearby stars up to 10 light-years in CSV
api.php?table=nearby&which=distance&limit=10&format=csv
Try
This simple API queries the database of NASA's Exoplanet Archive.
Syntax: https://www.astropical.space/api-exo.php?which=xxx&limit=xxx&format=csv|xml|json
Returned exoplanet data sequence is:
id, name, constellation, zone*, class*, mass [J], mass (xE), radius [xJ], radius (xE), semi-major axis [AU], period [days], eccentricity, distance [parsec], right ascension [decimal deg], declination [decimal deg], spectral*, discovery [year], update
* which=spectral expects limit=m (red dwarfs) or limit=g (sun-like), etc.
Value = '0' are unknown parameters (ambiguous though with eccentricity). Exoplanets with unknown mass are excluded, currently leaving only 2728 planets out of 5787 in the catalog available for result returns.
Recent browsers prohibit loading of local sources. If the returned result shows meaninglessly unformatted text, please open the source (right click: "View page source").
The base URL is https://www.astropical.space/
Get all exoplanets with up to 0.1 Jovian masses in CSV
api-exo.php?which=mass&limit=0.05&format=csv
Try
Get GJ 625 b in XML
api-exo.php?which=name&limit=gj 625 b&format=xml
Try
Get all exoplanets up to 0.2 Jovian radii in JSON
api-exo.php?which=radius&limit=0.2&format=json
Try
Get all TRAPPIST planets in XML
api-exo.php?which=name&limit=trappist&format=xml
Try
Get all planets up to 10 parsec in CSV
api-exo.php?which=distance&limit=10&format=csv
Try
Get all planets around an M-type star in CSV
api-exo.php?which=spectral&limit=m&format=csv
Try
This call returns the current ephemerides of the solar system planets including Pluto. Parameters required are local latitude and longitude in decimal degrees, unless hour angle, azimuth and altitude are not used. If omitted, the coordinates of Tokyo will be used by default.
api-ephem.php?lat=35&lon=139
Try
JSON Data Structure
{"info": { "timestamp": 1524405148, UNIX time "latitude": 35, "longitude": 139, "eclinc":23.4368968874, Ecliptic inclination in degrees "jd": 2458231.0781019, Julian date "epoch": 0.18305487338404, Julian centuries "lst": 12.379553451742 Local sidereal time in hours }, "response": [ { "id":1, Index number "name":"Mercury", Planet name "const":"Pisces", Constellation "au_earth":0.6491, Distance to Earth in AU "au_sun":0.4580, Distance to Sun in AU "phase":129.18, Phase angle in degrees "mag":1.61, Visual magnitude "size":10.35, Angular diameter in arc sec "vel":39.78, Orbital velocity in km/s "lt":0.1020, Light time in hours decimal "lt_hms":"00h06m17.9s", Light time in formatted hours "ra":7.110312, Right ascension in degrees "de":0.893185, Declination in degrees "ra_hms":"00h32m20s", Right ascension in sexagesimal "de_dms":"01°03'52"", Declination in sexagesimal "glat":112.41, Galactic latitude in degrees "glon":-61.50, Galactic longitude in degrees "elat":-2.23, Ecliptic latitude in degrees "elon":7.85, Ecliptic longitude in degrees "ha":-11.2097, Hour angle in hours "el":20.72, Elongation in degrees "azm":333.12, Azimuth in degrees "alt":-50.43, Altitude in degrees "ele":56.34, Max elevation in degrees "cm":114.08, Central meridian in degrees "rot":331.58, Rotation axis angle in degrees "pde":-4.25, Sub-Earth declination in degrees "angs":69.88, Sun diameter in arc min "ange":27.10 Earth diameter in arc sec }, { .... Venus } ] }
The base URL is https://www.astropical.space/
starchart.php?width=1280&height=720&fov=60&rc=217.429&dc=-62.6794
Try
width: chart width in pixels height: chart height in pixels fov: field of view in degrees rc: right ascension in degrees decimal dc: declination in degrees decimal
starchart.php?planis=1&lat=35&lon=139&width=1280
Try
planis: 1 for planisphere lat: geographic latitude in degrees decimal lat: geographic longitude in degrees decimal width: diameter in pixels
starchart.php?width=1280&height=720&fov=60&rc=90&dc=0&cld=1&ngc=1&mes=1
Try
&mes=1: adds 110 Messier objects (1 by default) &cld=1: adds 109 Caldwell objects (0 by default) &ngc=1: adds about 100 bright NGC/IC objects (0 by default) &solsys=1: adds solar system planets (1 by default) &print=1: inversed chart for printing (0 by default)