Port State Control API

Ship detention and inspection data from global maritime authorities

→ Record Details

Overview

API Endpoints

All endpoints require HTTP Basic Authentication.

GET /api/detentions
GET /api/detentions/:imo
GET /api/inspections
GET /api/inspections/:imo
GET /api/stats

Power BI Integration

Connect to this API from Power BI Desktop:

1. Get Data → Web

Enter the API URL (returns all records by default):

https://mou.mrl.dev/api/inspections

2. Authentication

When prompted, select Basic and enter your credentials:

Note: By default, all records are returned. Use ?limit=10000 to paginate if needed.

3. Query Parameters (Optional)

4. Alternative: M Query with Credentials

If you prefer to embed credentials in the query (avoids auth prompts):

let Source = Json.Document( Web.Contents("https://mou.mrl.dev/api/inspections") ), #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error), #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"imo", "ship_name", "inspection_id", "date_of_inspection", "place_of_inspection", "flag", "deficiency_code", "inspected_by", "is_detention", "rectified", "detention", "nature_of_deficiency", "date_of_release"}, {"imo", "ship_name", "inspection_id", "date_of_inspection", "place_of_inspection", "flag", "deficiency_code", "inspected_by", "is_detention", "rectified", "detention", "nature_of_deficiency", "date_of_release"}) in #"Expanded Column1"

5. Available Fields

Important Notes:

Rate Limits

No rate limits currently enforced. Please be respectful with request frequency.