# AIS Estrechos + Señal Sanciones (`synthora-malla/ais-estrechos-senal`) Actor

AIS en 5 estrechos críticos vía aisstream.io con cruce OFAC SDN (FUERTE por IMO, MEDIA por nombre).

- **URL**: https://apify.com/synthora-malla/ais-estrechos-senal.md
- **Developed by:** [Synthora Mesh](https://apify.com/synthora-malla) (community)
- **Categories:** Automation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## AIS Estrechos + Señal Sanciones

Monitor AIS de los **5 estrechos críticos del comercio marítimo** (Ormuz, Bab el-Mandeb, Malaca, Panamá, Gibraltar) con **cruce automático contra la lista OFAC SDN** de buques sancionados.

Es la versión empaquetada del listener permanente de la malla de inteligencia [SYNTHORA](https://hergertsynthora.com), que corre 24/7 en producción. El 2026-09-03 el listener original registró **1.408 buques únicos** en los 5 estrechos y **48 señales activas** de cruce con listas de sanciones/detenciones.

### Cómo funciona

1. Abre **una** conexión WebSocket a [aisstream.io](https://aisstream.io) (key gratuita, la aportas tú como input) con las bounding boxes de los 5 estrechos.
2. Normaliza `PositionReport` + `ShipStaticData` durante N minutos.
3. Cruza cada buque contra los ~1.500 buques de la lista OFAC SDN (`sdn.csv`, descarga pública del Tesoro de EE.UU.):
   - **FUERTE**: IMO exacto en SDN.
   - **MEDIA**: nombre exacto normalizado en SDN.
4. Devuelve un item por buque + `SUMMARY` en el key-value store.

### Ejemplo REAL de salida (malla SYNTHORA, 2026-09-03, cruce extendido con OpenSanctions)

```json
{
  "tipo": "ais_x_sanciones",
  "fuerza": "MEDIA",
  "mmsi": "209963000",
  "zona": "gibraltar",
  "visto_ts": "2026-09-03T13:25:19Z",
  "score": 0.95,
  "entidad_sancionada": "MSM DON",
  "datasets": ["tokyo_mou_detention", "ext_abuja_mou_psc"]
}
```

El buque `MSM DON` (MMSI 209963000, IMO 9518971, bandera Chipre) aparece en las listas de detención Port State Control de Tokyo MOU y Abuja MOU, y fue visto en el estrecho de Gibraltar el 2026-09-03.

Salida de este Actor (por buque):

```json
{
  "mmsi": "209963000",
  "nombre": "MSM DON",
  "imo": "9518971",
  "lat": 35.96, "lon": -5.49,
  "sog": 0.1, "zona": "gibraltar",
  "senal_sanciones": {"fuerza": "FUERTE", "via": "imo_exacto", "lista": "us_ofac_sdn"}
}
```

### Pricing

**Pay-per-result**: $0.005 por buque único devuelto (~$5 por 1.000 buques). Una escucha de 5 minutos en hora valle suele devolver 100-400 buques.

### Auto-test del Store

Apify auto-testea cada Actor a diario con el input por defecto (sin key). En ese caso el Actor corre un **selftest de control**: descarga la lista OFAC SDN y emite un item `modo: selftest_sin_ais_key` con los conteos reales (sin datos AIS). Para datos AIS reales, pasa tu key de aisstream.io.

### Notas

- Respeta los límites de aisstream.io: máx. 3 conexiones simultáneas por key.
- El cruce es contra OFAC SDN (buques). En la malla el cruce se hace además contra yente/OpenSanctions consolidado (477 datasets); si necesitas ese nivel, ver el Actor hermano **Sanciones Consolidado**.
- Datos AIS: cuanto más cerca de hora punta del estrecho, más buques por minuto.

# Actor input Schema

## `aisstreamApiKey` (type: `string`):

Key gratuita de https://aisstream.io (registro en 1 minuto). El Actor abre 1 sola conexión WebSocket y la cierra al terminar. Sin key, el Actor corre un selftest de control (sin datos AIS).

## `minutes` (type: `integer`):

Duración de la escucha AIS (1-60). En hora punta Malaca/Ormuz generan cientos de buques por minuto.

## `straits` (type: `array`):

Estrechos a escuchar.

## `sanctionsCross` (type: `boolean`):

Si está activo, cada buque se cruza contra los ~1.500 buques de la lista OFAC SDN (IMO exacto → FUERTE, nombre exacto → MEDIA).

## Actor input object example

```json
{
  "minutes": 5,
  "straits": [
    "ormuz",
    "bab_el_mandeb",
    "malaca",
    "panama",
    "gibraltar"
  ],
  "sanctionsCross": true
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("synthora-malla/ais-estrechos-senal").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("synthora-malla/ais-estrechos-senal").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call synthora-malla/ais-estrechos-senal --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,synthora-malla/ais-estrechos-senal"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/fvSuYm5LOdZumxW2B/builds/hDtQW9Vub78dpqFvX/openapi.json
