MaritimeplatformoperationId track
GET/v1/track
A vessel's positions in a time range, by time.
Send Authorization: Bearer sk_live_…. The key's plan must include theplatform product; which plans do.
Explained in Vessels and tracks.
Example
One vessel's track for an hour, crossing from Mexican into US waters.
curl -G "https://api.oslew.com/v1/track" \
-H "Authorization: Bearer $GEO_API_KEY" \
--data-urlencode 'mmsi=366749490' \
--data-urlencode 'from=1735637400' \
--data-urlencode 'to=1735641000'from oslew import Client
# The key is read from GEO_API_KEY.
client = Client(base_url="https://api.oslew.com")
answer = client.track(366749490, from_=1735637400, to=1735641000)import { Client } from "@oslew/client";
// The key is read from GEO_API_KEY.
const client = new Client({ baseUrl: "https://api.oslew.com" });
const answer = await client.track(366749490, { from: 1735637400, to: 1735641000 });HTTP/1.1 200 OK
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 292
ratelimit-reset: 1
{
"mmsi": 366749490,
"from": 1735637400,
"to": 1735641000,
"positions": [
{
"vessel": 366749490,
"time": 1735637483,
"lat": 32.48491,
"lon": -117.2007,
"sog": 98,
"cog": 3482,
"heading": 353,
"status": 15
},
{
"vessel": 366749490,
"time": 1735637603,
"lat": 32.49052,
"lon": -117.20172,
"sog": 101,
"cog": 3535,
"heading": 355,
"status": 15
},
{
"vessel": 366749490,
"time": 1735637694,
"lat": 32.49476,
"lon": -117.20255,
"sog": 100,
"cog": 3497,
"heading": 353,
"status": 15
},
{
"vessel": 366749490,
"time": 1735637814,
"lat": 32.50033,
"lon": -117.20354,
"sog": 103,
"cog": 3514,
"heading": 351,
"status": 15
},
{
"vessel": 366749490,
"time": 1735637902,
"lat": 32.50443,
"lon": -117.20425,
"sog": 102,
"cog": 3507,
"heading": 352,
"status": 15
}
],
"provenance": {
"name": "noaa-ais",
"release": "2024-12-31",
"license": "public domain (US Government work)"
},
"took_us": 472
}A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call. Shortened for the page: positions shows 5 of 35.
Query
| Name | Type | Description |
|---|---|---|
mmsiqueryrequired | integer | |
fromquery | integer | |
toquery | integer |
Responses
200 — By time.
fromintegerrequiredmmsiintegerrequiredpositionsPosition[]requiredcogintegerrequiredTenths of a degree; 65535 unknown.headingintegerrequiredDegrees; 511 or 65535 unknown.latnumberrequiredlonnumberrequiredsogintegerrequiredTenths of a knot; 65535 unknown.statusintegerrequiredAIS navigational status 0–15; 15 unknown.timeintegerrequiredUnix seconds.vesselintegerrequiredMMSI.
provenanceSource | nullrequiredlicensestringrequirednamestringrequiredreleasestringrequired
tointegerrequiredtook_usintegerrequired
With RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset(and their X-RateLimit-* aliases); see rate limits.
Refusals
Every refusal is a JSON object with an error string, except where noted.
| 400 | Bad request. |
| 401 | No key, or one that is unknown, revoked or suspended. |
| 403 | The key's plan does not include this route's product, or the request is larger than the plan allows. The body names the plan that does. |
| 429 | This product's bucket is empty: the key is going faster than its plan's sustained rate. Wait Retry-After seconds; nothing is used up. Carries Retry-After. |
| 503 | The pod cannot reach the control plane and its entitlements are too old to trust. Retry. |
A malformed query string or JSON body is refused by the framework before this route runs, in plain text rather than JSON; see errors.
Rendered from the OpenAPI document at commit b8f4bde-dirty; the same document is served at/v1/openapi.json and generates both clients.