---
title: "Find ports by name, country, or UNLOCODE"
method: GET
path: "/api/v0/port_find"
tags: ["Ports"]
---

# Find ports by name, country, or UNLOCODE

`GET /api/v0/port_find`

## Request

- Base URL: `https://api.datalastic.com`
- URL: `https://api.datalastic.com/api/v0/port_find`
- Auth: one of:
  - API key in header `x-api-key`
  - API key in query parameter `api-key`
- TypeScript: <https://skmtc.dev/datalastic/apis/datalastic-maritime-api/docs/api/v0/port_find/get.ts> (a function with typed inputs; its response is checked against the schema)

Search the ports database by name, UN/LOCODE, type, country, or
geographic area. Fuzzy search finds ports by approximate name.
Geographic search returns ports within a radius of a coordinate.
A single request can return multiple matches, for example all ports in
Italy.

**Credit cost:** 1 per port found, capped at 500 credits per request.

## Query parameters

- `name` string
- `country_iso` string
- `unlocode` string
- `uuid` string, uuid
- `fuzzy` 0 | 1
- `port_type` 'Port' | 'Anchorage' | 'Marina' | 'Offshore Terminal' | 'Shelter' | 'Demolition Yard' | 'Canal' | 'Fishing Harbour'
- `lat` number, float
- `lon` number, float
- `radius` number, float

## Response `200`

Matching ports.

- object
  - `data` Port[]
    - `uuid` string, uuid
    - `port_name` string
    - `country_iso` string
    - `country_name` string
    - `unlocode` string
    - `port_type` string
    - `lat` number, float
    - `lon` number, float
    - `area_lvl1` string, nullable: Top-level maritime area.
    - `area_lvl2` string, nullable: Sub maritime area.
    - `terminals` Terminal[]: Terminals belonging to this port. Returned by `/api/v0/port`. Absent or empty for ports that have no terminals.
      - `terminal_code` string: Short terminal identifier.
      - `terminal_name` string: Full terminal name.
      - `company_name` string, nullable: Operator or company name.
      - `lat` number, float: Terminal latitude.
      - `lon` number, float: Terminal longitude.
      - `url` string, nullable: Terminal website.
      - `address` string, nullable: Physical address.
  - `meta` Meta
    - `duration` number, float: Server-side query time in seconds.
    - `endpoint` string
    - `success` boolean
    - `next` string: Pagination token. Present on paginated endpoints (`/vessel_find`) only when more results exist. Pass it back as the `next` query parameter to fetch the following page.

## Other responses

- `400`: Missing required parameter or invalid parameter value.
- `401`: Invalid or expired API key.
- `402`: API key is valid but the credit balance is exhausted or the subscription has expired. Purchase more credits to continue.
- `404`: Requested vessel, port, or resource was not found. No credits deducted.
- `429`: More than 600 API calls in a single minute. The response carries a `Retry-After` header with the wait in seconds. Use it for backoff.
- `500`: Server-side error. Retry the request.

## Changes

- **2026-09-08** `a29cf323d1c3`: 1 breaking, 1 warning, 19 info
  - the `query` request parameter `port_type` was restricted to a list of enum values
  - deleted the `query` request parameter `api-key`
  - added the new optional `query` request parameter `lat`
  - added the new optional `query` request parameter `lon`
  - …17 more
- **2026-05-12** `0b2f634e7f91`: 2 info
  - added the new optional `query` request parameter `fuzzy`
  - added the new optional `query` request parameter `port_type`

[Operation history](https://skmtc.dev/datalastic/apis/datalastic-maritime-api/changes/api/v0/port_find/get.md)

---

[API](https://skmtc.dev/datalastic/apis/datalastic-maritime-api.md) - [All operations](https://skmtc.dev/datalastic/apis/datalastic-maritime-api/llms.txt) - [OpenAPI document](https://skmtc.dev/datalastic/apis/datalastic-maritime-api/revisions/2097cdbffcb4?raw)
