oslew docs
Console
Menu

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
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'
Python
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)
TypeScript
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 });
Response
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

NameTypeDescription
mmsi
queryrequired
integer
from
query
integer
to
query
integer

Responses

200 — By time.

  • fromintegerrequired
  • mmsiintegerrequired
  • positionsPosition[]required
    • cogintegerrequired
      Tenths of a degree; 65535 unknown.
    • headingintegerrequired
      Degrees; 511 or 65535 unknown.
    • latnumberrequired
    • lonnumberrequired
    • sogintegerrequired
      Tenths of a knot; 65535 unknown.
    • statusintegerrequired
      AIS navigational status 0–15; 15 unknown.
    • timeintegerrequired
      Unix seconds.
    • vesselintegerrequired
      MMSI.
  • provenanceSource | nullrequired
    • licensestringrequired
    • namestringrequired
    • releasestringrequired
  • tointegerrequired
  • took_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.

400Bad request.
401No key, or one that is unknown, revoked or suspended.
403The 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.
429This 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.
503The 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.