Code Examples

JavaScript

API Call: https://www.astropical.space/api-exo.php?which=radius&limit=0.07&format=json

The code below calls JSON formatted exoplanet data using JavaScript and displays it in a table. For simplicity, the code uses jQuery.

 

Exoplanets Example JavaScript

PHP

API Call: https://www.astropical.space/api-exo.php?which=mass&limit=0.002&format=json

The code below calls JSON formatted exoplanet data using PHP and displays it in a table.

 

Exoplanets PHP

Subterran Exoplanets

NameConstellationRadius [xE]Mass [xE]Update
PSR B1257+12 bVirgo0.0190680.0190682018-12-03
Kepler-138 bLyra0.0699160.0699162023-01-04
K2-266 cSextans0.2891980.2891982022-10-31
TRAPPIST-1 hAquarius0.3273340.3273342022-11-14
TRAPPIST-1 dAquarius0.3877160.3877162022-11-14
L 98-59 bVolans0.4004280.4004282021-08-23
Kepler-138 eLyra0.429030.429032023-01-04
KOI-55 bCygnus0.444920.444922014-05-14
HD 23472 dReticulum0.5497940.5497942022-10-03
GJ 367 bVela0.6324220.6324222023-08-10