canonical: https://jentic.com/apis/aishub.net/aishub

# AISHub API

Jentic publishes the only available OpenAPI specification for AISHub API, keeping it validated and agent-ready. AISHub provides global AIS (Automatic Identification System) data sourced from a community of receiving stations, exposing vessel position retrieval and station metadata. The API is rate-limited to one request per minute and uses an API username passed as a query parameter, so it suits low-frequency monitoring rather than streaming use cases.

## For AI agents

Look up live AIS vessel positions and the network of receiving stations contributing data, with results filtered by MMSI, IMO, area, or station id.

## Scope

Does not provide weather, port operations, voyage history, or commercial maritime tracking - use for AIS position and station lookups only.

## Capabilities

- Retrieve live AIS vessel positions filtered by MMSI, IMO, MMSI list, or geographic bounding box
- List the global network of AIS receiving stations and their last-seen status
- Choose between JSON, XML, and CSV response formats per request
- Resolve a vessel's most recent position fix and reported speed and course
- Identify the contributing station for a given AIS message

## Use cases

### Vessel tracking dashboard

Power a low-cost vessel tracking display by polling AISHub once per minute for vessels of interest. The API returns position, speed, course, and timestamp. Best used for occasional refresh - for high-frequency tracking, a paid commercial AIS feed is required.

Example prompt: Call GET /ws.php with username, format=json, and mmsi=366000000 and parse the latest LAT/LON from the response

### Station network monitoring

Audit which AISHub receiving stations are online and which have stopped reporting. The /stations.php endpoint lists each station with metadata including its last data timestamp, useful for community-run station operators.

Example prompt: Call GET /stations.php with username and format=json, then surface stations whose last-seen timestamp is older than 24 hours

### AI agent integration via Jentic

Let an agent answer maritime questions like 'where is vessel X right now' by calling AISHub through Jentic. The agent searches Jentic for vessel-position retrieval, loads the AISHub schema, and Jentic injects the username credential at execution.

Example prompt: Search Jentic for 'look up the position of a ship by MMSI', load the AISHub /ws.php operation, and return the latest LAT/LON for the requested MMSI

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /ws.php | Retrieve AIS vessel data |
| GET | /stations.php | Retrieve AIS station information |

## Key resources

- **AIS Data** — Retrieve vessel positions filtered by MMSI, IMO, list, or area
- **Stations** — List receiving stations and their reporting status

## Why Jentic

- **Setup:** Wiring AISHub by hand means appending its username as a query parameter, parsing the ws.php and stations.php responses, and writing your own retry logic. Through Jentic you install once, import AISHub from the API Directory, store the username once, and your agent calls it.
- **Permission scoping:** AISHub takes its filters as query parameters and only reads AIS position and station data, so scope your agent by operation: limit it to the operations it needs, such as /ws.php for ship positions or /stations.php for station lookups.
- **Credential handling:** Your AISHub username is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'find a ship by MMSI', and Jentic returns the AISHub /ws.php operation with its parameter schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **AISHub API (aishub_api)** — Same AISHub service published under the aishub_api vendor entry.
- **OpenAI API** — Use OpenAI to summarise vessel movement narratives from raw AIS data.
- **Anthropic Messages API** — Generate agent responses that explain AISHub query results.

## FAQ

### Why is there no official OpenAPI spec for AISHub API?

AISHub does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call AISHub API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the AISHub API use?

AISHub uses an API username passed as the 'username' query parameter on each request. Jentic stores the username in its encrypted vault and appends it at execution time, so the agent never embeds it in code.

### What are the rate limits for the AISHub API?

AISHub limits free accounts to one request per minute. Treat the API as a polling source for occasional updates, not a real-time stream. If you need higher frequency you'll need a commercial AIS provider.

### Can I look up a vessel by MMSI through Jentic?

Yes. Use the Jentic search query 'look up vessel position by MMSI'. Jentic returns the GET /ws.php operation; supply the mmsi and format parameters and Jentic injects your AISHub username automatically.

### What response formats does AISHub support?

Both endpoints accept a 'format' query parameter and can return JSON, XML, or CSV. Most agent flows pick JSON for parsing, but CSV is useful for bulk position dumps into a spreadsheet.

### Can I limit what my agent is allowed to do with the AISHub API?

Yes. Because you run Jentic One yourself, your own rules decide which AISHub operations and credentials the agent may use. AISHub only reads AIS data through query parameters, so you can scope the agent by operation, granting it just /ws.php for vessel positions, just /stations.php for station lookups, or both. Your stored AISHub username is injected at execution only for the operations you allow.
