Predict the Sky


Work in Progress!

Most of these routes won't be implemented whilst you read this. But they will be, trust us.

Introduction

It all starts with the root URL, the routes below are all based around this:

http://api.predictthesky.org

You should set the Media Type; by default: application/json. But it will just return JSON regardless. It doesn't talk anything else (but this might change.)

Retrieving Space Events

Events are the core purpose of the API. It returns a list of space objects (see below) which are visible from your current location, scored by a likelyhood that it can be seen. A weather object for the start and end of the event is returned.

Method Route Arguments
GET /events/all lat, lon, elevation, limit, date
GET /event/<category> lat, lon, elevation, limit, date
Notes
  • lat & lon expect decimal latitude and longitude values. (Required)
  • elevation assumes meters. (Optional)
  • limit assumes an integer. Default is 5. (Optional)
  • date expects an ISO 8601 formatted date. (Optional)
{
    "space_events": [
        {
            "object": {
                "id": "0123456789",
                "name": "International Space Station",
                "category": "satellite"
            },
            "start": {
                "timestamp": ""
                "location": {
                    "altitude": "",
                    "azimuth": ""
                }
                "weather": {
                    "cloud_cover": "",
                    "chance_of_prep": "",
                    "temperature": 0,
                    "feels_like_temperature": 0,
                    "visibility": 0
                }
            },
            "end": {
                "timestamp": ""
                    "location": {
                        "altitude": "",
                        "azimuth": ""
                    }
                "weather": {
                    "cloud_cover": "",
                    "chance_of_prep": "",
                    "temperature": 0,
                    "feels_like_temperature": 0,
                    "visibility": 0
                }
            }
        }
    ]
}

Retrieving Possible Space Objects

Predict the Sky stores a list of space objects that it can provide data for. This isn't comprehensive like Space Track is, but enough to return a good list of objects.

But, to return just the objects themselves in the events calls (above), you need to know the identifier used for them. You can get all or filter by categories:

Routes

Method Route Arguments
GET /objects/all None
GET /objects/<category> None

The possible category values are:

Identifier Notes
satellites Including the ISS.
meteor_showers  
lunar_eclipses  
aurora  
planets  
moon_phase  
comets  
iridium_flare  

Response

Both space objects calls return a collection of object dictionaries, they look like this:

{
    "space_objects": [
        {
            "id": "0123456789",
            "name": "International Space Station",
            "category": "satellite"
        }
    ]
}