Our Data APIs

Available APIs and Examples

We have a number of APIs which can be used to retrieve our data programatically, either using commandline tools like curl and wget, or from programming languages such as Python.

Data are returned in JSON format which can readily be converted into a python list, array or Pandas DataFrame. Simple examples are shown below, and a set of Python examples can be found in our GitHub repository here. A Data Dictionary in Excel format can be downloaded from here.

Detections API
Matches API
Full Trajectory API
Video Data

Detections API

This API allows you to retrieve the raw data for a single detection from one camera at a specific time. The time can be given to the nearest second or fraction of a second but be aware that if the time is insufficiently precise then no data will be returned.

https://api.ukmeteors.co.uk/getecsv?stat=UKxxxx&dt=yyyy-mm-ddTHH:MM:SS.uuuuuu&metcount=n

Data are returned in Astropy ECSV format. Note that if more than one event matches, then the returned data will be a concatenation of multiple ECSV datasets and you will need to either split the data into individual files or make a new API request with sufficient time granularity to retrieve only one event.

If more than one meteor is seen in an FF file, then the optional “metcount” parameter can be used to select the desired one.

Examples

PS> curl "https://api.ukmeteors.co.uk/getecsv?stat=UK0025&dt=2021-07-17T02:41:05.05" > test.ecsv

PS> curl "https://api.ukmeteors.co.uk/getecsv?stat=UK005U&dt=2024-08-10T00:38:15.387&metcount=2"

Matches API

This API returns information about matched events. There are several ways in which this API can be used.
* List of all Matches for a Date
* List of all Matches for a Camera and Date
* Summary of a Single Match
* Summary of All Matches for a Date

All Matches for a Date

This returns a JSON object containing a list of the events for the given date.

https://api.ukmeteors.co.uk/matches?reqtyp=matches&reqval=yyyymmdd

Sometimes, you may find that this call returns an error due to too much data. If thats the case you can add an optional period parameter which can be either am, pm or a pair of hour values eg &period=am or &period=0-6 which would retrieve events in the morning or between 00:00 and 06:00 respectively

You can consume the list directly in Python, or parse it with Linux’s jq or Windows Powershell’s convertfrom-json, for example:

curl "https://api.ukmeteors.co.uk/matches?reqtyp=matches&reqval=20211121" > matches-20211121.txt 
get-content .\matches-20211121.txt | convertfrom-json

orbname
-------
20211121_000411.688_UK
20211121_000855.686_UK
20211121_002819.330_UK
20211121_003704.344_UK
20211121_011116.433_UK
.....

All Matches for a Station on a Date

This version of the match API returns a list of the matched detections for a specific station on a specific date. The return format is the same as the above. Useful for camera owners wanting to monitor their own camera’s involvement. The optional period argument is also available here.

https://api.ukmeteors.co.uk/matches?reqtyp=station&reqval=yyyymmdd&statid=UKxxxx

Details of a Single Matched Event

This returns brief details of a matched event.

https://api.ukmeteors.co.uk/matches?reqtyp=detail&reqval=yyyymmdd_HHMMSS.mmm_xx

Trajectory IDs can be found using either the by-day or by-station-by-day lists above.

curl "https://api.ukmeteors.co.uk/matches?reqtyp=detail&reqval=20211121_032219.699_UK" > 20211121_032219.699_UK.txt
(get-content .\20211121_032219.699_UK.txt | convertfrom-json -ashashtable)._mag
-0.93

Summary Data

This returns a JSON object containing a list of summary statistics for the requested. Be warned that this may return a lot of data and the period argument can also be used here if too much is returned.

https://api.ukmeteors.co.uk/matches?reqtyp=summary&reqval=yyyymmdd

curl "https://api.ukmeteors.co.uk/matches?reqtyp=summary&reqval=20231214"
60292.0000114124","_sol":"261.383852","_ID1":"_(UNIFIED_8)","_amag":"0.467934",
.... (2800 lines)

Single Trajectory API

This returns a complex JSON object containing the complete trajectory, orbit and raw data for a matched event.

https://api.ukmeteors.co.uk/pickle/getpickle?reqval=yyyymmdd_HHMMSS.mmm_xx

As before, the trajectory ID can be obtained using the matches API.

 curl "https://api.ukmeteors.co.uk/pickle/getpickle?reqval=20220814_205940.252_UK" | more
{
"jdt_ref": 2459806.374771438,
"meastype": 2,
"output_dir": ".",
"max_toffset": 10.0,
"verbose": false,
....

Video Data

This isn’t strictly speaking an API, however we provide a mechanism to obtain the 100 brightest videos for a given month. Download one of the two scripts linked below, make sure you can execute it and then in a bash or powershell window run the script with a single parameter of the form YYYYMM corresponding to the year and month you want eg 202304 for April 2023. The script will create a folder in your current working directory and download the videos into it. Data are available from January 2021 onwards.
getVideos.ps1
getVideos.sh