Reference
Maps & playback
The weather archive drawn on your own map, and a storm day played back moment by moment.
Fetch a vector tile
GET /api/v1/tiles/{z}/{x}/{y}.mvt
Vector tiles of the weather archive, for drawing it on your own map.
maps:read
Path parameters
z
The tile zoom level.
x
The tile column.
y
The tile row.
Answers
200
The answer.
Plus the shared refusals: 401, 402, 403, 404, 422 and 429, described on Errors.
curl https://titanweather.com/api/v1/tiles/9/118/205.mvt \
-H "Authorization: Bearer $TITAN_API_TOKEN" \
-o tile.mvt
$titan = new \GuzzleHttp\Client([
'base_uri' => 'https://titanweather.com',
'headers' => ['Authorization' => 'Bearer '.getenv('TITAN_API_TOKEN')],
]);
$response = $titan->get('/api/v1/tiles/9/118/205.mvt', [
'sink' => 'tile.mvt',
]);
const response = await fetch('https://titanweather.com/api/v1/tiles/9/118/205.mvt', {
headers: {
Authorization: `Bearer ${process.env.TITAN_API_TOKEN}`,
},
});
const bytes = await response.arrayBuffer();
import os
import requests
response = requests.get(
"https://titanweather.com/api/v1/tiles/9/118/205.mvt",
headers={
"Authorization": f"Bearer {os.environ['TITAN_API_TOKEN']}",
},
)
with open("tile.mvt", "wb") as file:
file.write(response.content)
A Mapbox Vector Tile, as application/x-protobuf bytes. The same tiles the first-party map draws, byte for byte.
Play back a storm day
GET /api/v1/playback
One storm day over a box of the earth, moment by moment.
maps:read
Query parameters
date
string
required
The storm day to play back.
south
number
required
Southern edge of the box, in degrees latitude.
west
number
required
Western edge of the box, in degrees longitude.
north
number
required
Northern edge of the box, in degrees latitude.
east
number
required
Eastern edge of the box, in degrees longitude.
Answers
200
The answer.
Plus the shared refusals: 401, 402, 403, 404, 422 and 429, described on Errors.
curl https://titanweather.com/api/v1/playback?date=2023-04-21&south=32.87&west=-96.87&north=33.16&east=-96.52 \
-H "Authorization: Bearer $TITAN_API_TOKEN"
$titan = new \GuzzleHttp\Client([
'base_uri' => 'https://titanweather.com',
'headers' => ['Authorization' => 'Bearer '.getenv('TITAN_API_TOKEN')],
]);
$response = $titan->get('/api/v1/playback', [
'query' => [
'date' => '2023-04-21',
'south' => 32.87,
'west' => -96.87,
'north' => 33.16,
'east' => -96.52,
],
]);
$playback = json_decode((string) $response->getBody(), true);
const response = await fetch('https://titanweather.com/api/v1/playback?date=2023-04-21&south=32.87&west=-96.87&north=33.16&east=-96.52', {
headers: {
Authorization: `Bearer ${process.env.TITAN_API_TOKEN}`,
},
});
const playback = await response.json();
import os
import requests
response = requests.get(
"https://titanweather.com/api/v1/playback",
headers={
"Authorization": f"Bearer {os.environ['TITAN_API_TOKEN']}",
},
params={
"date": "2023-04-21",
"south": 32.87,
"west": -96.87,
"north": 33.16,
"east": -96.52,
},
)
playback = response.json()
{
"date": "2023-04-21",
"moments": [
{
"at": "2023-04-21T19:52:00Z",
"cells": [
{
"latitude": 33.05,
"longitude": -96.71,
"mesh_in": 1.75
}
]
}
],
"context": {
"reports": [
{
"at": "2023-04-21T20:18:00Z",
"type": "hail",
"magnitude_in": 2.75,
"latitude": 33.041,
"longitude": -96.699
}
],
"warnings": [
{
"label": "Severe Thunderstorm Warning",
"issued": "2023-04-21T19:41:00Z",
"expires": "2023-04-21T20:45:00Z"
}
]
},
"meta": {
"count": 96,
"available": 96,
"thinned": false,
"from": "2023-04-21T19:52:00Z",
"until": "2023-04-21T23:04:00Z"
}
}