Okay. I think I've got something usable here, though it's kinda janky. The params this API takes are literally SQL queries, and my SQL is iffy, and the documentation for these tables lives in about a zillion different locations. BUT:
This gives us the planet names, masses, and distance from Earth, where the star is sun-like and the planet masses are between 0.5 and 2x Earth mass. Annoyingly, the Trappist system returns a null value for distance, but I'm just gonna fill that in manually. I'll keep trying to see if there's a way to further restrict the call to just planets in the Goldilocks Zone, but also I'm gonna call this good enough for now.
Okay. I think I've got something usable here, though it's kinda janky. The params this API takes are literally SQL queries, and my SQL is iffy, and the documentation for these tables lives in about a zillion different locations. BUT:
https://exoplanetarchive.ipac.caltech.edu/TAP/sync?query=select+pl_name,pl_masse,sy_dist+from+ps+where+upper(soltype)+like+%27%CONF%%27+and+pl_masse+between+0.5+and+2.0&format=json
This gives us the planet names, masses, and distance from Earth, where the star is sun-like and the planet masses are between 0.5 and 2x Earth mass. Annoyingly, the Trappist system returns a null value for distance, but I'm just gonna fill that in manually. I'll keep trying to see if there's a way to further restrict the call to just planets in the Goldilocks Zone, but also I'm gonna call this good enough for now.