FAQ – Tiles API¶
How to get past data?¶
Request the current snapshot timestamp:
HTTP
GET https://api.rainbow.ai/tiles/v1/snapshot?token=<your_token>
Example output:
JSON
{"snapshot": 1754991000}
Use this snapshot to get the latest (current) observation tiles:
HTTP
https://api.rainbow.ai/tiles/v1/precip/1754991000/0/0/0/0?token=<your_token>
To fetch past data, replace the timestamp with an earlier one.
For example, to get data 10 minutes earlier, subtract 600 seconds from the snapshot timestamp 1754991000 - 600 = 1754990400
. Then request tiles with the new timestamp:
HTTP
https://api.rainbow.ai/tiles/v1/precip/1754990400/0/0/0/0?token=<your_token>
Limitations
- Tiles are accessible up to 2 hours before the latest snapshot.
- Snapshot timestamps are aligned to 10-minute intervals (epoch UTC seconds).