海事导航 API
对 NAVAREA 与沿海警报的编程访问。订阅式 REST 位于 /api/v1/ 并带有头部字段 X-API-Token。更高级别的方案可解锁坐标、关键字地图、一次获取全部归档和高级筛选。
开发者:用 GitHub 登录,十秒内即可在 API 标签页获得 Developer 密钥,有效警告可免费请求 2,000 次。存档和完整分析包含在付费方案中。
Send a route, get the NAVAREAs and the warnings along it: POST /api/v2/route/ with a route file (RTZ, GPX, KML, CSV...) or JSON waypoints; the same at /api/v2/drop/<token>/route/ for tools that can only drop a file. Section 15 of the README has the calls.
v3: integrate from GitHub
Developers overviewEverything to connect is in one public repository: the OpenAPI specification, the data models, Python and JavaScript clients, an MCP server for Claude, Cursor, VS Code, Windsurf and Zed, and a GitHub Action that checks a route against the warnings in force. The endpoints stay the ones below; the kit is the way in.
- Editors and agents: add the MCP server and ask in plain words; the tools are search_warnings, warnings_near, route_check, navareas and feeds.
- Code:
python/sealagom.pyandjs/sealagom.mjs, no dependencies beyond requests or fetch; generate any other language fromopenapi.yaml. - No-code and agents: import sealagom.com/openapi.json into n8n, Make, Zapier, Pipedream, Postman, ChatGPT actions or LangChain. Send the key as
X-API-TokenorAuthorization: Bearer. - Routes:
POST /api/v2/route/with a route file or waypoints, or the drop link/api/v2/drop/<key>/route/for tools that can only POST a file. - Sky view:
GET /api/v2/sky/link/?vessel=(ormmsi,warningandregion,port,locode,latandlon) gives a ready link that stands there in the sky view;POST /api/v2/sky/route/takes a route and gives its sky link, drawn on the sea, with the RTZ and GPX. Section 20 of the README has the calls. Not for navigation. - CI: the Action fails a build when a critical warning lies on a route kept in the repository.
- Scripts and agents paying for themselves:
POST /api/agent/checkout/, crypto, the key once paid (in the profile when the e-mail already has an account).
快速开始
- 在 上选择一个方案 贡献者计划.
- 在 下创建一个 API 令牌 个人资料 → API.
- 发送
X-API-Token在每次/api/v1/调用时。 - 在列表端点上请遵守分页和令牌使用规则。
API 订阅计划
升级到 API Default 可获得原始文本与坐标,升级到 Full API 可获得结构化几何数据(geo_features),或联系我们定制集成。
免费 API 额度
无需密钥的 API:每天 100 次调用,每次最多 50 条警告,有效期 3 天或共 300 次调用,以先到者为准。
额度用完后,API 返回 HTTP 402,说明已用多少、何时恢复,并附上立即付款的链接:结账页面、加密货币,或从脚本调用 POST /api/agent/checkout/。
登录但没有 API 方案时,同样的免费额度按您的账户计算。GitHub 开发者额度单独保留。
仅限实时消息。不含存档数据、坐标、增强坐标、关键词、webhook 或高级筛选。
API Default
无限请求, 首月 $20,随后自动续费 $18 / 月
- 无限制 API 请求
- NAVAREA 与沿海实时消息
- 归档消息访问权限
- 原始消息文本与坐标
- Webhook 集成以获取实时更新
Not included: geo_features (areas, circles, sectors, lanes, safety zones), analysis, keywords, or enhanced coordinate formats. Those need Full API.
订阅 API DefaultFull API
无限请求, $100 first month, then $90 / month with auto-renew
- 无限制 API 请求
- NAVAREA 与沿海实时消息
- 归档消息访问权限
- 坐标(所有格式:decimal, GeoJSON, DMS, Google Maps)
- geo_features:点、线、航道、区域、圆、扇区、位移、安全区
- analysis of every warning: summary, status, validity / expiry, hazards, recurring series
- 以 GeoJSON、CSV、Shapefile、WKT 提供结构化几何(在 Contributor 上提供 ECDIS 与 KML 完整几何)
- 关键词地图提取
- 高级筛选(date、keyword、country、type、has_coordinates)
- Webhook 集成以获取实时更新
定制 API
按您的需求定制;联系我们
- 包含 Full API 的全部内容
- 自定义响应结构与数据格式
- 可按需提供特定字段、结构或空间格式
- 专属支持与集成指导
- 企业或大流量方案
- 服务级别协议与定制 webhook 负载
需要定制服务?电邮 contact@sealagom.com API 响应可自定义为任意格式或空间结构。
查看当前计划并订阅交互式请求构建器
构建 GET URL 并复制示例(cURL、Python、JavaScript、Java、Rust)。将示例中的 token 替换为您的 token。
每次都使用相同参数?可将参数保存在 token 本身,使用 API v2 builder 在您的个人资料中,并带有实时预览。
已生成的 URL
https://www.sealagom.com/api/v1/navarea/?include_messages=truecurl -X GET "https://www.sealagom.com/api/v1/navarea/?include_messages=true" \
-H "X-API-Token: YOUR_API_TOKEN"概览
欢迎使用 SeaLag.om 海事导航 API!
此 API 提供对 NAVAREA 和近岸警报的编程访问,这些信息对海上安全与航行至关重要。
Full API 订阅用户可获得增强数据,包括坐标(多种格式)、关键词、一次获取全部归档和高级筛选。需要自定义格式或空间结构? 联系我们 以便进行定制集成。
响应为 JSON 列表/详情 结构。使用 page and page_size 在支持的地方。
认证
发送 header X-API-Token: <token> 在每次 /api/v1/ 请求。缺失或无效的令牌将返回 401 Unauthorized。令牌在您的个人资料中创建;可在同一界面轮换或撤销。
X-API-Token: YOUR_API_TOKEN令牌管理
- GET /api/v1/tokens/ - 列出您的令牌
- POST /api/v1/tokens/ - 创建令牌
- POST /api/v1/tokens/{id}/regenerate/ - 轮换(使旧值无效)
# List tokens
curl -X GET "https://www.sealagom.com/api/v1/tokens/" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
# Create a token
curl -X POST "https://www.sealagom.com/api/v1/tokens/" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "My API Token"}'
# Regenerate a token
curl -X POST "https://www.sealagom.com/api/v1/tokens/1/regenerate/" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"API v2 与令牌设置
API v2 使用与 v1 相同的令牌、套餐和请求计费方式。位于 /api/v1/ 下的所有内容将完全如前般工作,因此现有集成无需更改。v2 新增:
- 所有警报的单一列表:
GET /api/v2/messages/, NAVAREA 与近岸合并,按最新优先,每条消息带其区域、国家和归档状态。 - 在区域端点上的消息过滤器:
/api/v2/navarea/and/api/v2/coastal/像 v1 一样应答,同时也对它们返回的消息应用date_from,date_to,keywordandhas_coordinates。 - 保存在每个令牌上的设置: 在 Profile > API > API v2 builder中选择一个令牌,通过菜单和实时预览构建响应并保存。使用该令牌的每个 /api/v2/ 调用将返回该结构;/api/v1/ 调用会忽略已保存的设置并按原样响应。
- prompt filter (Full API):用您自己的话描述一个令牌应该返回的警报,例如 “仅返回美国周边的太空碎片警报”。
- Integrate: the kit on GitHub (OpenAPI spec, clients, MCP server, Action) is the way in; a README.md per token, with its settings, plan and every parameter and field, is there for any program that wants one file.
- Settings file:instead of ticking options, ask LagoPal (with the README) for a settings file: a small JSON file with the token's endpoint, parameters and prompt. Load it on Profile > API (Load settings file); it fills the builder so you can check the live preview before saving. Download settings file gives the current settings in the same form. JSON Schema:
/api/public/api-settings-schema/.
GET /api/v2/messages/
| 参数 | 套餐 | 作用说明 |
|---|---|---|
| scope | 全部 | navarea、coastal 或 all(默认)。 |
| navarea_id | 全部 | 一个或多个 NAVAREA id(可重复或用逗号分隔)。 |
| coastal_id | 全部 | 一个或多个近岸区域 id。 |
| country | 全部 | 国家名称,部分匹配(例如 France)。 |
| q | 全部 | 警报文本中的单词(原文或英文)。 |
| date_from, date_to | 全部 | 添加日期在或晚于 / 在或早于,YYYY-MM-DD。 |
| keyword | 全部 | 关键词类别或文本中的任意词;可重复多次。 |
| has_coordinates | 全部 | true:仅返回带有位置的警报。 |
| include_locals | 全部 | true:也包含法国本地(AVURNAV)警报。 |
| include_archived, only_archived | 付费 API | 活动和存档,或仅存档。 |
| status, message_class, station, lat, lon, radius_nm, bbox | 全部 | 归档筛选:in_force、cancelled 或 expired;类型;NAVTEX 台站;带海里半径的位置,或 west,south,east,north 范围框。 |
| include_coordinates | 付费 API | 从每条警报读取的位置。 |
| include_enhanced_coordinates | Full API | 每个位置的十进制度、度分秒、GeoJSON 与地图链接。 |
| include_keywords | Full API | 每条警报的关键词地图。 |
| include_geo_features | Full API | 以 GeoJSON 表示的区域、圆、线、航道、扇区。 |
| include_ai_analysis | Full API | The analysis object per warning. |
| ai_severity | Full API | critical、high、moderate、low、info(可重复多次)。 |
| ai_category | Full API | category ids, e.g. firing_practice, piracy_or_security. |
| ai_status | Full API | 实时状态:active、scheduled、expired、withdrawn(已存档)、cancellation_notice、informational。 |
| ai_in_force | Full API | true:仅返回当前生效的警报。 |
| expires_within_hours | Full API | 仅返回其 valid_until 在接下来的 N 小时内的警报。 |
| expires_after, expires_before | Full API | valid_until 在或晚于 / 在或早于某日期(YYYY-MM-DD)或 ISO 时间。 |
| exclude_routine | Full API | true:排除常规报告(冰情报告、钻机列表、生效列表)。 |
| ai_has | Full API | 仅包含具有以下分析的:contacts、vessels、aids、keep_clear、time_windows、charts、hazards。 |
| min_keep_clear_nm | Full API | 至少 N nautical miles 的避让距离。 |
| page, page_size | 全部 | 默认每页 50 条;付费计划最多 200,免费计划 50。 |
| prompt_filter | Full API | off: ignore the token's prompt filter for this call. |
| topic | Full API | 一个订阅:ice、military、space、cables、offshore、survey、hazards、aton、sar、security(见 主题订阅)。 |
| settings | 全部 | off:对此调用忽略令牌的已保存设置(即普通调用)。 |
您方案不包含的字段或过滤器将被省略并列在 meta.warnings, 永不作为错误。
content 为广播时的原文文本; content_en is the English text (the official English version or a machine translation) for sources that broadcast in another language, such as China or Turkey, and source_language 列出原始语言名称。
美国海岸警卫队的 Local Notices to Mariners(10 个区,每周更新)是名为 US Coast Guard LNM, country US. They are not analysed, so their automatic fields are empty; each district also has one message, number LNMxx-DISCREPANCIES, 列出其助航设施存在差异的通知。
curl "https://www.sealagom.com/api/v2/messages/?country=France&include_coordinates=true&include_ai_analysis=true" \
-H "X-API-Token: YOUR_API_TOKEN"
{
"count": 42,
"page": 1,
"page_size": 50,
"next": null,
"previous": null,
"results": [
{
"scope": "coastal",
"region_id": 57,
"region_title": "FRANCE Atlantic",
"country": "France",
"is_archived": false,
"archived_on": null,
"id": 90211,
"number": "AVURNAV 1234/26",
"content": "BAY OF BISCAY. DRIFTING BUOY ...",
"content_en": "BAY OF BISCAY. DRIFTING BUOY ...",
"source_language": "en",
"added_on": "2026-09-27T08:10:00Z",
"coordinates": ["45-10.0N 002-05.0W"],
"ai_analysis": { "headline": "...", "severity": "moderate", "valid_until": null }
}
]
}保存到令牌上的设置
- 一个令牌,一个形状: each token keeps its own endpoint and parameters. Need a second shape (say France coastal with coordinates, and a worldwide feed)? Create a second token.
- 每个选项都显示, 包括 Full API 在内,各自需要的计划。保存需要一个有效的 API 计划。
- URL 优先: 你在 URL 中传入的任何参数都会替换该调用的已保存值;
?settings=off发起一个普通调用。 - 相对期间: “过去 30 天”发送
date_from作为每次调用的今天减去 30 天。 - 响应带有一个
X-API-Token-Settings头,标明应用了其设置的令牌。
Ice feed: GET /api/v2/ice/
- Every warning about ice at sea, from NAVAREA, coastal and NAVTEX sources: icebergs and iceberg limits, sea ice, ice edge, vessel icing and freezing spray, ice reports, icebreaker operations and ice navigation rules. An model reads each warning that mentions ice and keeps only those really about it, with its kind in
ice.type. - Positions, shapes (iceberg limit lines, ice areas) and the analysis are included by default.
?output=geojson返回一个 GeoJSON FeatureCollection,每个形状一个 feature,适用于航线检查和图表覆盖。 ice_type可缩小为:iceberg、sea_ice、ice_edge、icing、ice_report、icebreaker、ice_navigation、other_ice(重复或用逗号分隔)。所有 /api/v2/messages/ 参数也可用,且/api/v2/messages/?topic=ice是相同的 feed。- Full API 计划,或冰情 feed 许可(年费,发票):请联系我们。
curl "https://www.sealagom.com/api/v2/ice/?output=geojson&ice_type=iceberg,ice_edge" -H "X-API-Token: YOUR_API_TOKEN"Themed feeds: GET /api/v2/feeds/<feed>/
- Ready-made feeds built from the category the analysis gives every warning: military exercises and firing, rocket launches and space debris, cable and pipeline work, offshore works and rigs, surveys, wrecks and drifting hazards, aids to navigation, search and rescue, security and restricted areas.
- Same output as the ice feed: positions, shapes and the analysis by default, the category in
feed.category,?output=geojson用于 FeatureCollection,和?category=用于只保留某些 feed 的类别。所有 /api/v2/messages/ 参数也可用,且/api/v2/messages/?topic=military是相同的 feed。 - Only warnings with an analysis are included.
GET /api/v2/feeds/(无需令牌) 列出每个 feed 及其当前生效警报数量。 - Full API 计划,或单个 feed 的订阅许可(年费,发票):请联系我们。
- Free and without a token, for feed readers and scripts: RSS at
/feeds/warnings.xml,/feeds/navarea/<id>.xmland/feeds/coastal/<id>.xml; the same three as Atom (.atom) and JSON Feed 1.1 (.json); plain text at/feeds/warnings.txt. The newest 100 warnings, text only, a warning keeps its id when it is updated. Region pages carry the feed links in their head, so a reader finds the feed from the page address.
正在加载订阅……
curl "https://www.sealagom.com/api/v2/feeds/military/?output=geojson&navarea_id=3" -H "X-API-Token: YOUR_API_TOKEN"prompt filter
- Write what you want in plain words on the token (Full API plan). When you save, a model checks every warning in force against it; each new warning is checked within about 10 minutes of arriving.
/api/v2/messages/使用该令牌的调用随后只返回匹配的警报。一条在生效时匹配的警报在归档后仍保留匹配状态。- 响应会添加
meta.prompt_filter字段,包含提示、其状态(matching保存后立即,ready随后)以及匹配的警报数量。?prompt_filter=off对单次调用可跳过它。 - The filter can miss or over-include a warning. Use it to narrow a feed, not as the only safety check; the official broadcast stays the authority.
# Token with saved settings: nothing else needed
curl "https://www.sealagom.com/api/v2/messages/" -H "X-API-Token: YOUR_API_TOKEN"
# Same token, override the period for one call
curl "https://www.sealagom.com/api/v2/messages/?date_from=2026-09-01" -H "X-API-Token: YOUR_API_TOKEN"
# Token with the prompt "only space debris warnings around the USA"
{
"count": 3,
"results": [ ... ],
"meta": {
"prompt_filter": {
"prompt": "only space debris warnings around the USA",
"status": "ready",
"matched": 3
}
}
}结构化地理要素
Full API 订阅使用 请求于 NAVAREA 或 Coastal 列表/详情 端点。每条通告可包含一个 include_messages=true and include_geo_features=true 对象,内含可供图表和 GIS 使用的结构化几何。 geo_features features[].kind
- features[].kind:
point,line,lane,area,circle,sector,displacement - circle / sector: 包含
radius_nm,中心点,以及可选的偏向限制 - lane: 中心线加上以 为单位的走廊宽度
corridor_nmorcorridors_nm points[]: 十进制度;coordinates_raw[]: 来自通告的原始坐标字符串- 多区通告:
message_profile,multi_zone,zone_labels,以及每个要素的metadata.zone_label - 可选安全区:
safety_zone_meters,safety_zone_nm - 文件导出: 贡献者可在 ECDIS 和 KML 中收到完整几何。其他导出格式在账户拥有 Full API 访问权限时包含结构化几何(参见 plans)。
示例消息字段
{
"id": 123,
"number": "105/26",
"content": "HAZARDOUS OPERATIONS IN AREAS BOUND BY: A. 25-40.00N 096-47.00W, ... B. 25-58.00N ...",
"coordinates": ["25-40.00N 096-47.00W", "..."],
"geo_features": {
"version": 1,
"message_profile": "labeled_areas",
"multi_zone": true,
"zone_labels": ["A", "B"],
"features": [
{
"id": "feat-a1b2c3d4",
"kind": "area",
"label": "Area A",
"source": "labeled_zone",
"coordinates_raw": ["25-40.00N 096-47.00W", "..."],
"points": [{ "lat": 25.6667, "lon": -96.7833, "text": "25-40.00N 096-47.00W" }],
"closed": true,
"metadata": { "zone_label": "A" }
},
{
"id": "feat-b2c3d4e5",
"kind": "area",
"label": "Area B",
"source": "labeled_zone",
"metadata": { "zone_label": "B" }
}
]
}
}示例请求
curl -X GET "https://www.sealagom.com/api/v1/navarea/4/?include_messages=true&include_geo_features=true&include_coordinates=true" \
-H "X-API-Token: YOUR_API_TOKEN"analysis
Full API 订阅Every new or changed warning is read by a model and turned into structured data. Add include_ai_analysis=true (带有 include_messages=true) 到 NAVAREA 或 Coastal 列表/详情端点,并且每条消息都会带有一个 ai_analysis object, or null 在新的警告仍在等待分析时。
- headline, summary:通俗易懂的描述(非英语警告会被翻译)
- status:
active,scheduled,expired,withdrawn(不再在发布方的现行有效列表中),cancellation_notice,informational。根据有效期在每次请求时重新计算,因此警告会自动从计划中变为生效再变为已过期。 - valid_from / valid_until (ISO 8601 UTC)和
time_windows[]:活动时段和自动取消时间;validity_text引用了原始语句短语 - category, severity (critical, high, moderate, low, info),
hazards[],mariner_action,location newsworthy/background: for events the wider public would care about (space launches, missile tests, conflict, disasters), a few sentences of general context. It comes from general knowledge, not from the warning text, and can be wrong; empty for routine warningscancels[]/references[]:本消息取消或引用的警告编号- 操作细节:
keep_clear_nm(最大避让距离,NM),contacts[](VHF 频道、台站、电话),vessels[](名称、呼号、MMSI、IMO、角色),depth_m(沉船处的最小水深),observed_at(漂流物何时被报告),aids[](受影响的灯浮标及其状态),charts[] translations:中文、西班牙语、俄语、葡萄牙语、希腊语、乌克兰语、土耳其语、法语和菲律宾语的标题、摘要和行动建议coord_check: positions the automatic read compared with the parser's (ok,mismatch仅 AI 找到的位置)- 另外:
status_label,category_label,status_at_analysis(分析时判断的状态),positions_read[](positions as the automatic read them),confidence(0 到 1),analyzed_atandmodel - 重复系列:
is_routine,series_keyandseries_label对重复发布的通告(冰情报告、钻机位置列表、现行有效警告清单)进行分组,以便您只保留最新一期
On the website, everyone sees each warning's headline and status; the full analysis on message pages and the map is part of the Contributor plan, and the full LagoPal (warning search, PDF reports, reading attached files and images) plus watch alerts are part of Full Contributor. Through the API the analysis comes with the Full API plan.
使用 API v2 您还可以按这些数据过滤:实时状态、到期(例如未来 24 小时内到期的所有条目)、当前生效、严重性、类别、避让距离,以及那些指出联系人、船舶或灯浮标的分析。
分析是自动生成的,可能有错误。原始警告文本在 content 仍为权威来源。
示例消息字段
{
"id": 123,
"number": "1234/26",
"content": "NAVAREA III 1234/26 ... GUNNERY EXERCISES ... CANCEL THIS MSG 301600 UTC SEP 26.",
"ai_analysis": {
"headline": "Gunnery firing exercises south of Crete, 28-30 Sep",
"summary": "Live gunnery firing south of Crete daily 0600-1500 UTC from 28 to 30 September. Ships should keep clear of the area.",
"category": "firing_practice",
"category_label": "Firing practice",
"subject": "firing",
"subject_label": "Firing exercise",
"severity": "high",
"status": "active",
"status_label": "Active",
"status_at_analysis": "scheduled",
"valid_from": "2026-09-28T06:00:00+00:00",
"valid_until": "2026-09-30T16:00:00+00:00",
"validity_text": "280600 UTC TO 301500 UTC SEP 26. CANCEL THIS MSG 301600 UTC SEP 26",
"time_windows": [{ "start": "2026-09-28T06:00:00+00:00", "end": "2026-09-30T15:00:00+00:00", "note": "daily 0600-1500 UTC" }],
"location": "South of Crete",
"hazards": ["live firing"],
"mariner_action": "Keep clear of the area during the firing periods.",
"newsworthy": false,
"background": "",
"keep_clear_nm": 3,
"contacts": [{ "type": "vhf", "value": "VHF 16", "note": "HN warship" }],
"vessels": [],
"depth_m": null,
"observed_at": null,
"aids": [],
"charts": [],
"coord_check": { "status": "ok", "ai_count": 4, "parser_count": 4, "ai_only": [], "parser_only": [] },
"translations": { "es": { "headline": "Ejercicios de tiro al sur de Creta, 28-30 sep", "summary": "...", "mariner_action": "..." } },
"cancels": ["1198/26"],
"references": [],
"is_routine": false,
"series_key": "",
"series_label": "",
"confidence": 0.92,
"analyzed_at": "2026-09-27T08:10:00+00:00",
"model": "gpt-5-mini"
}
}示例请求
curl -X GET "https://www.sealagom.com/api/v1/navarea/3/?include_messages=true&include_ai_analysis=true" \
-H "X-API-Token: YOUR_API_TOKEN"地图对象(钻井平台和 MODU)
包含钻井平台或 MODU 位置列表的警告可能会返回一个 map_objects 字段在每条消息上,当您使用时 include_messages=true.
消息字段: map_objects.oil_rigs[]
name: 按发布的名称的钻台或装置名称coordinate: 来自警告的坐标字符串lat,lon: 十进制度数is_new_rig,is_new_position: 在原文中被标注时catalog(可选): 匹配的目录条目,含 slug、href、MMSI、导航区
公共目录(无需 API 令牌)
- GET /api/public/modu/?q=&page=1 - search active rigs
- GET /api/public/modu/s/{slug}/ - 钻台详情及相关警告链接
- GET /api/public/map-rigs/ - all active rigs for map overlays
海岸电台和救助中心
救助协调中心(RCC、MRCC、MRSC、JRCC)和 70 个国家的 DSC 海岸电台,来源为 NGA Pub 117 Radio Navigational Aids(第 4 章),并标注了 SeaLagom 的 MF/HF DSC 测试台。无需 API 令牌。
- GET /api/public/coast-stations/ - every station with a position, short rows (id, k, n, c, m, la, lo, r, b, t)
- GET /api/public/coast-stations/{id}/ - 单个电台:MMSI、频段和覆盖范围、监听时间、服务区、联系方式
- GET /api/public/coast-stations/near/?lat=&lon=&radius_nm=200&limit=12 - nearest stations
near returns rcc_covering (其管辖区包含该位置的救助中心), rcc_near, dsc_near and test_nearest, 每项含有 distance_nm. position_approximate 当 Pub 117 未给出位置且电台被置于同名港口时,is true。请将每项与您的官方无线电台名录核对。
curl "https://www.sealagom.com/api/public/coast-stations/near/?lat=36.8&lon=3.1&radius_nm=150"Space: launches, hazard warnings, re-entries, objects in orbit
Rocket launches of every agency and company from Launch Library 2 (The Space Devs), refreshed hourly, each with the NAVAREA and coastal warnings of its hazard areas at sea (stage, booster and fairing drop zones, landing zones), SpaceX droneships and capsule splashdowns. A warning is linked only when its wording is a launch, one of its windows holds the launch time and opens within an hour of the launch window, an area lies within 1,000 nm of the pad and no other launch fits as well. No API token needed.
- GET /api/public/space/launches/?from=&to=&provider=&limit= - launches (default 7 days back to 60 ahead) with warnings
- GET /api/public/space/launches/{id}/ - one launch, its description and the warning page line
- GET /api/public/space/reentries/ - re-entry predictions (Space-Track TIP) when available
- GET /api/public/sky/space/?g=bright|stations|recent|rocket|debris - positions now and a minute later (SGP4)
- GET /api/public/sky/space/meta/?g= - names, owners, launch dates and sizes (SATCAT)
Sources: Launch Library 2 (thespacedevs.com), CelesTrak, Space-Track.org (USSPACECOM). The warnings themselves stay the authority for navigation.
curl "https://www.sealagom.com/api/public/space/launches/?provider=SpaceX&limit=10"芬兰与波罗的海:冰区航行、故障灯标和浮标
芬兰-瑞典破冰服务的冬季航行(有冰况限制或已关闭的港口、破冰船及其任务、冰区航路)以及芬兰水域内故障的灯标和浮标,来自 Fintraffic Digitraffic,每 10 分钟更新一次。无需 API 令牌。许可为 CC BY 4.0:请显示随数据提供的来源说明。
- GET /api/public/winter-navigation/
- GET /api/public/aton-faults/
像 IA 2000 这样的限制表示仅为至少达到该冰级和载重吨(吨)的船舶提供破冰援助。非冰季时列表为空。以冬季航行服务的官方通告为准。
curl "https://www.sealagom.com/api/public/winter-navigation/"Your own vessels: positions in by API or webhook
Push the positions of your own vessels from trackers, satellite AIS, Noon or the bridge. They show live in your sky view and on the chart, for your account only, drawn at their real size, with a Fleet panel: status (under way, at anchor or stopped, no update), the last position and its age, speed and course, the ETA when a route is set, the warnings in force near each vessel and along her route, and the approximate under-keel clearance. Private by default; showing a vessel to everyone is a paid placement labelled Sponsored. Not for navigation.
- POST /api/v2/fleet/positions/: one position, a list, or {positions: [...]}, at most 500 a request
- GET /api/v2/fleet/vessels/: every vessel with her live state (?detail=1)
- GET /api/v2/fleet/vessels/{vessel}/: one vessel: our id, MMSI, IMO, your own id or her name; her last 24 hours
- PUT|DELETE /api/v2/fleet/vessels/{vessel}/route/: her route for the ETA and the warnings along it
- GET|POST /api/v2/fleet/webhook/: your webhook receiver; {rotate: true} makes a new signing secret, shown once
- GET /api/v2/fleet/access/, POST /api/v2/fleet/trial/: what your account may do; the free trial
A position
The vessel by vessel_id (our id, or your own id for her), mmsi or imo, with her name the first time; lat and lon in decimal degrees; time in UTC as ISO 8601 or Unix seconds. Optional: speed (knots), course, heading, draught (metres, as reported), length and beam (metres), destination, nav_status (the AIS number). The spellings providers use are read too: latitude, lng, sog, cog, hdg, timestamp, a nested position, a GeoJSON Point.
curl -X POST https://www.sealagom.com/api/v2/fleet/positions/ \
-H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \
-d '{"positions": [
{"mmsi": "244123456", "name": "NORTH STAR", "lat": 51.9512, "lon": 4.0417,
"time": "2026-10-31T12:00:00Z", "speed": 12.1, "course": 271, "heading": 270,
"draught": 9.4, "length": 182, "beam": 28},
{"vessel_id": "TRK-0042", "name": "SEA BIRD", "lat": 1.2402, "lon": 103.8523,
"time": 1793448000}
]}'Each position is checked and refused with a plain reason in the answer (refused: [{index, why}]): no vessel named, out of range or 0, 0, no time, older than 24 hours or more than 5 minutes ahead of our clock, a speed over 80 knots, an impossible jump from her last position (over 60 knots), a second position within 10 seconds of the last one or older than it (send them in time order), a new vessel over your plan's number of vessels. 200 when any was kept, 422 when none was.
Reading your fleet
curl https://www.sealagom.com/api/v2/fleet/vessels/ -H "Authorization: Bearer YOUR_KEY"
curl https://www.sealagom.com/api/v2/fleet/vessels/244123456/ -H "Authorization: Bearer YOUR_KEY"
curl -X PUT https://www.sealagom.com/api/v2/fleet/vessels/244123456/route/ \
-H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \
-d '{"name": "Rotterdam to Felixstowe", "speed_kn": 14,
"waypoints": [[51.95, 4.05], [51.98, 2.90], [51.93, 1.40]]}'import datetime, requests
KEY = "YOUR_KEY"
now = datetime.datetime.now(datetime.timezone.utc).isoformat()
r = requests.post(
"https://www.sealagom.com/api/v2/fleet/positions/",
headers={"Authorization": f"Bearer {KEY}"},
json={"positions": [{"imo": "9074729", "name": "ALPHA", "lat": 36.84, "lon": -6.42,
"time": now, "speed": 11.4, "course": 145, "draught": 8.2}]},
timeout=20,
)
print(r.status_code, r.json()) # accepted, refused [{index, why}], vessels
for v in requests.get("https://www.sealagom.com/api/v2/fleet/vessels/",
headers={"Authorization": f"Bearer {KEY}"}, timeout=20).json()["vessels"]:
print(v["name"], v["status"], v["position"]["age_s"], v["speed_kn"],
(v["route"] or {}).get("eta"), v["warnings_near"]["count"])The ETA is worked out along the rest of her route at her reported speed, or at the route's planned speed while she reports none. The warnings near her are those in force within 50 nm; along her route, those within 10 nm of the rest of it, in the order she meets them. The under-keel clearance is an estimate, never a safety value: GEBCO is not a nautical chart, depths are not reduced to chart datum, tides are not included, the draught is what the crew reported.
Webhook for providers that push
Your account has its own receiver address (GET /api/v2/fleet/webhook/ or the Fleet panel). Point your tracker, satellite AIS provider or Noon at it; any JSON with positions is read (our format, a list, data or items envelopes, a GeoJSON FeatureCollection). Sign every push with your secret: the header X-SeaLagom-Signature: t=<Unix seconds>,v1=<hex HMAC-SHA256 of t, a dot and the raw body>, within 5 minutes of our clock; or X-Hub-Signature-256: sha256=<hex HMAC-SHA256 of the raw body>. ?provider= names the source.
import hashlib, hmac, json, time, requests
SECRET = "flsec_..." # Fleet panel, Make the signing secret
URL = "https://www.sealagom.com/api/fleet/hook/flh_.../" # GET /api/v2/fleet/webhook/
body = json.dumps({"data": [{"MMSI": "244123456", "LATITUDE": 51.95, "LONGITUDE": 4.05,
"SOG": 12.1, "COG": 271, "TIMESTAMP": int(time.time())}]}).encode()
t = int(time.time())
sig = hmac.new(SECRET.encode(), f"{t}.".encode() + body, hashlib.sha256).hexdigest()
r = requests.post(URL + "?provider=MyTracker", data=body, timeout=20, headers={
"Content-Type": "application/json", "X-SeaLagom-Signature": f"t={t},v1={sig}"})
print(r.status_code, r.json())Agents (MCP)
The same as an MCP server: tools fleet_access, fleet_vessels, fleet_vessel, fleet_push_positions, fleet_set_route and fleet_start_trial, with your key as Bearer.
{
"mcpServers": {
"sealagom-fleet": {
"url": "https://www.sealagom.com/mcp/fleet",
"headers": { "Authorization": "Bearer YOUR_KEY" }
}
}
}Who may use it
The plans that include fleets (Fleet, All In, Fleet Pro and the Fleet unlimited license) and company licences. People can try it free for 7 days with up to 3 vessels, once per account (POST /api/v2/fleet/trial/ or the Fleet panel). Limits: 120 requests a minute per account and a number of positions a day by the access. These calls never use the requests of a data plan. Plans with fleets
沿海 API
按水文测绘区域划分的沿海航行警告,通常比 NAVAREA 更为本地化,涵盖港口作业、沿海危害和本地海事安全通告。
- GET /api/v1/coastal/
- GET /api/v1/coastal/{id}/
- GET /api/v1/coastal/{id}/messages/
- GET /api/v1/coastal/{id}/archived_messages/
Basic request
curl -X GET "https://www.sealagom.com/api/v1/coastal/?include_messages=true" \
-H "X-API-Token: YOUR_API_TOKEN"沿海 API 参数
沿海列表/详情端点在适用时接受与 NAVAREA 相同风格的过滤器。
| 参数 | 类型 | 描述 |
|---|---|---|
| id | integer | 按沿海区域 ID 过滤。 |
| title | string | 按标题过滤。 |
| sub_title | string | 按子标题过滤。 |
| include_messages | boolean | 包含有效的沿海消息。 |
| include_archived | boolean | 包含存档消息(Full / Custom)。 |
| include_coordinates | boolean | 响应中包含坐标(Full / Custom)。 |
| include_enhanced_coordinates | boolean | 十进制度、Google 地图、GeoJSON、DMS 格式(Full / Custom)。 |
| include_keywords | boolean | 响应中包含关键词地图(Full / Custom)。 |
| include_geo_features | boolean | 每条消息的结构化 geo_features JSON(仅 Full API)。 |
| include_ai_analysis | boolean | 每条消息的 ai_analysis JSON(仅 Full API)。 |
| date_from | date | 与 NAVAREA 相同的语义(Full / Custom)。 |
| date_to | date | 与 NAVAREA 相同的语义(Full / Custom)。 |
| keyword | string | 关键词过滤器(Full / Custom)。 |
| has_coordinates | boolean | 过滤包含坐标的消息(Full / Custom)。 |
| country | string | 按国家名称过滤(部分匹配)。 |
| content_search | string | 搜索消息正文(部分匹配)。 |
| title_search | string | 在标题中搜索(部分匹配)。 |
Webhook 集成
Full API 和 Custom 订阅者可以在订阅设置中配置 webhook URL,以在 NAVAREA 或 Coastal 警告被添加、更新或归档时接收实时 POST 通知(无需轮询)。
Webhook 的工作原理
- 在订阅设置中配置 webhook URL。
- 当警告发布或更新时,我们会向您的 URL 发送签名的 POST 请求。
- 使用您的 webhook secret 验证该请求。
- 您的服务器处理负载并采取措施(更新数据库、推送通知等)。
Security
- Only public https:// URLs are called (no private or local addresses, port 443, no redirects followed).
X-Sealagom-Signatureis HMAC-SHA256 of the body with your secret;X-Sealagom-Signature-256issha256=+ HMAC-SHA256 of<X-Sealagom-Timestamp>.<body>. Check one of them, and reject deliveries whose timestamp is older than five minutes.X-Sealagom-Deliveryis unique per call: keep the last ids to drop a repeated delivery.- Alerts can also go to a Slack, Discord or Teams incoming webhook, or to Zapier, Make, n8n and IFTTT: Integrations.
配置 webhook
curl -X POST "https://www.sealagom.com/api/v1/subscriptions/1/webhook/" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"webhook_url": "https://your-server.com/webhook", "webhook_secret": "your_secret_key"}'Webhook 有效载荷示例
{
"event_type": "navarea_message_added",
"timestamp": "2024-06-01T12:34:56Z",
"data": {
"navarea_id": 1,
"message_id": 123,
"title": "NAVAREA I",
"number": "123/24",
"content": "Message content...",
"added_on": "2024-06-01T12:30:00Z"
},
"signature": "generated_signature_for_verification"
}使用场景
SeaLag.om API 适用于各种海事应用。以下是一些示例:
导航软件
将实时 NAVAREA 和沿海警报直接覆盖在电子海图上。使用坐标过滤仅显示与船舶位置或计划航线相关的危险。
面向海员的移动应用
针对感兴趣区域的新警报推送通知。将地理过滤与 webhook 配合使用,仅在用户指定区域发生时提醒。
风险评估工具
将警报数据纳入航线规划和安全分析。关键字过滤可让您隔离特定危险类型,例如海底电缆、军事演习或海盗活动。
历史分析
使用日期过滤和归档消息提要识别季节性警报模式、经常出现的危险或长期的高风险航道。
GIS 集成
将坐标数据(小数、GeoJSON、DMS)导入 ArcGIS、QGIS 或自定义图层,以创建动态海上危险可视化。
自定义告警系统
为航运公司、海上作业方或港口管理机构构建自动告警。符合条件的新警报发布时,webhook 会立即触发。
需要这里未列出的功能? contact@sealagom.com
数据集成模式
将海事警报数据集成到您系统中的常见模式:
| 模式 | 描述 | 推荐等级 |
|---|---|---|
| 周期同步 | 定期调度 API 调用,将警报同步到您的数据库。适用于不需要实时交付的场景。 | Full API |
| 实时更新 | Webhook 集成在发布/更新事件时提供即时通知。 | Full 或 Custom |
| 地理过滤 | 按坐标过滤,仅检索与特定作业区域相关的数据。 | Full 或 Custom |
| 基于关键字的告警 | 当警报信息中包含特定关键字时触发自动告警(例如海底电缆、军事演习)。 | Full 或 Custom |
| 数据仓库 | 使用日期范围和归档端点将警报数据导入 BI 和分析管道。 | Full 或 Custom |
| 图表 / GIS 覆盖 | 在电子海图或制图系统上绘制带有坐标的警报。 | Full 或 Custom |
| 自定义响应格式 | 特定字段选择、定制空间格式或非常规的 JSON 结构。 | Custom |
开发者提示: 使用高级过滤以尽量减少数据传输和处理。这样免费层级的响应可保持在每次调用允许的记录数以内,并在 Full / Custom 计划下减小响应大小。
速率限制与令牌使用
The free tier counts calls a day (above). The Full API plans count no tokens and have a daily fair use (UTC): 20,000 calls and 2,000,000 warnings on API Default, 60,000 calls and 6,000,000 warnings on every Full API plan, shown in X-API-Daily-Calls-Limit and X-API-Daily-Calls-Remaining; past it the API answers 429 until 00:00 UTC. No limit at all comes with the Fleet unlimited license: yearly, by a proposal to [email protected].
| 套餐 | 请求 | 已存档 / 坐标 / 关键词 |
|---|---|---|
| Free 级别 | 无需密钥的 API:每天 100 次调用,每次最多 50 条警告,有效期 3 天或共 300 次调用,以先到者为准 | 不包含 |
| API Default | 无限制 | Archived + raw coordinates; no keywords, enhanced coordinates, geo_features or analysis |
| Full API | 无限制 | 全部包含 |
| Custom | 按合同约定 | 完全可定制 |
剩余的免费 API 调用次数显示在: 个人资料 → API.
示例
基本集合请求
curl -X GET "https://www.sealagom.com/api/v1/navarea/?include_messages=true" \
-H "X-API-Token: YOUR_API_TOKEN"示例列表响应(已截断)
{
"count": 21,
"next": "https://www.sealagom.com/api/v1/navarea/?page=2",
"previous": null,
"results": [
{
"id": 1,
"title": "NAVAREA I",
"time_upd": "2024-06-01T12:30:00Z",
"active_messages": [
{
"id": 123,
"number": "123/24",
"content": "Full warning text as published...",
"added_on": "2024-06-01T12:30:00Z",
"cancel_date": null
}
]
}
]
}高级筛选(Full / Custom)
curl -X GET "https://www.sealagom.com/api/v1/navarea/?include_messages=true&date_from=2024-01-01&date_to=2024-12-31&keyword=GUNNERY%20EXERCISE&country=United%20Kingdom" \
-H "X-API-Token: YOUR_API_TOKEN"包含坐标与关键词的 Full API 响应
{
"count": 21,
"next": "https://www.sealagom.com/api/v1/navarea/?page=2&include_messages=true&include_coordinates=true&include_keywords=true",
"previous": null,
"results": [
{
"id": 1,
"title": "NAVAREA I",
"country": "United Kingdom",
"time_upd": "2024-06-01T12:30:00Z",
"active_messages": [
{
"id": 123,
"number": "123/24",
"content": "NORTH SEA. UNIT ORCADES FIELD...",
"added_on": "2024-06-01T12:30:00Z",
"cancel_date": null,
"coordinates": {
"text_coordinates": ["59-08.0N 000-34.0E"],
"decimal_coordinates": [[59.1333, 0.5667]],
"google_coordinates": ["59.1333 0.5667"],
"geojson_coordinates": [[0.5667, 59.1333]],
"dms_coordinates": [["59°08'00"N", "0°34'00"E"]]
},
"keywords": {
"hazard": "HAZARD TO NAVIGATION",
"location": "NORTH SEA, ORCADES FIELD",
"action": "CANCEL"
}
}
]
}
]
}筛选带坐标的消息,所有格式
curl -X GET "https://www.sealagom.com/api/v1/navarea/?include_messages=true&has_coordinates=true&include_coordinates=true&include_enhanced_coordinates=true" \
-H "X-API-Token: YOUR_API_TOKEN"组合筛选
curl -X GET "https://www.sealagom.com/api/v1/navarea/?include_messages=true&date_from=2024-01-01&keyword=GUNNERY%20EXERCISE&has_coordinates=true&country=United%20Kingdom" \
-H "X-API-Token: YOUR_API_TOKEN"