---
title: "UN/LOCODE transport location lookup"
method: GET
path: "/api/unlocode"
tags: ["Reference"]
---

# UN/LOCODE transport location lookup

`GET /api/unlocode`

## Request

- Base URL: `https://www.freightutils.com`
- URL: `https://www.freightutils.com/api/unlocode`
- Auth: none declared

Search 116,000+ UN/LOCODE entries by name, code, country, or function type.

## Query parameters

- `q` string
- `code` string
- `country` string
- `function` 'port' | 'airport' | 'rail' | 'road' | 'icd' | 'border'
- `limit` integer

## Response `200`

Search results. A name search with no match carries did_you_mean: up to 3 real places whose name is one or two letters from the query ({code, name, country}) — suggestions, never applied.

## Other responses

- `404`: Code not found When the code is one character from real UN/LOCODEs in the same country, did_you_mean lists up to 3 of them ({code, name, country}).

---

[API](https://skmtc.dev/freightutils/apis/freightutils-api.md) · [All operations](https://skmtc.dev/freightutils/apis/freightutils-api/llms.txt) · [OpenAPI document](https://skmtc.dev/freightutils/apis/freightutils-api/revisions/6607bb3cea90?raw)
