---
title: "Retrieve a list of ports from a name or an unlocode."
method: GET
path: "/ports"
tags: ["ports"]
---

# Retrieve a list of ports from a name or an unlocode.

`GET /ports`

## Request

- Base URL: `https://api.sinay.ai/ports-vessels/api/v1`
- URL: `https://api.sinay.ai/ports-vessels/api/v1/ports`
- Auth: API key in header `API_KEY`
- TypeScript: <https://skmtc.dev/sinay/apis/ports-and-vessels-api/docs/ports/get.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint is used to retrieve a list of ports that can match your input.

It will return a list of of none/one/several ports depending of the result of the search.

If there is no port that match your input the ports list will be empty.

## Query parameters

- `portNameOrCode` string, required
- `numberOfResult` integer

## Response `200`

Successful Response

- PortsResponse
  - `input` string
  - `portsList` Port[]
    - `unlocode` string
    - `name` string

## Other responses

- `400`: Validation Error
- `500`: An error occurend on server side

---

[API](https://skmtc.dev/sinay/apis/ports-and-vessels-api.md) - [All operations](https://skmtc.dev/sinay/apis/ports-and-vessels-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sinay/apis/ports-and-vessels-api/revisions/4bb8d55043bf?raw)
