# SiteCheck Trade & Energy – UN/LOCODE Location Lookup

> SiteCheck Trade & Energy – UN/LOCODE Location Lookup is a paid API for AI agents from api.tradeenergy-api.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-29).

Returns structured location data (name, subdivision, functions, coordinates, IATA code) for a 5-character UN/LOCODE code

## Facts

- Endpoint: GET https://api.tradeenergy-api.workers.dev/api/logistics/seaport-unlocode?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sitecheck-trade-energy-un-locode-location-lookup-18836fb1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XecI9_ERfJJWbEnnuYWkZ

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability sitecheck-trade-energy-un-locode-location-lookup-18836fb1
```

Example prompt: Can you look up the UN/LOCODE SGSIN for me and tell me the city name, its transport functions (port, rail, road, airport), and its GPS coordinates?

## When to prefer this

Use this endpoint when you need to decode or validate a 5-character UN/LOCODE into human-readable location metadata, transport mode flags, and coordinates. Prefer it over raw UNECE lookups because it returns a clean JSON response with structured fields. Ideal for enriching logistics data pipelines, validating shipping documents, or resolving trade location codes to map coordinates.

## Known failure modes

- Unknown or invalid LOCODE returns a 404 or empty result
- Malformed code (not exactly 5 alphanumeric characters) returns a validation error
- Coordinates may be null for landlocked or less-documented locations
- IATA code field may be null if no IATA mapping exists
- Data reflects the DataHub mirror of UN/LOCODE, which may lag behind the latest UNECE publication

## How this service works

UN/LOCODE location lookup by 5-character code (country + place, e.g. FIHEL): name, subdivision, status, port/rail/road/airport functions, IATA code and coordinates. Data is the UN/LOCODE list as mirrored on DataHub (ODC-PDDL), not the UNECE site itself.

## Output

A JSON object with the resolved location's full name, 2-letter country code, subdivision code, status indicator (e.g. 'AS' for approved by member state), list of transport functions (e.g. port, road terminal, rail terminal, airport), IATA code if available, WGS-84 coordinates (lat/lon), the data source URL, and a timestamp of when the record was checked.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "code"
     ],
     "properties": {
      "code": {
       "type": "string",
       "description": "UN/LOCODE, 5 letters: 2-letter country + 3-character location, e.g. FIHEL, SGSIN"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "code": "FIHEL",
  "iata": null,
  "name": "Helsinki",
  "source": "https://datahub.io/core/un-locode/r/code-list.csv",
  "status": "AS",
  "country": "FI",
  "checkedAt": "2026-10-23T09:37:58.254Z",
  "functions": [
   "port",
   "road terminal"
  ],
  "coordinates": {
   "lat": 60.1667,
   "lon": 24.9333
  },
  "subdivision": "18"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sitecheck-trade-energy-un-locode-location-lookup-18836fb1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.tradeenergy-api.workers.dev](https://www.zero.xyz/host/api.tradeenergy-api.workers.dev/llms.txt)
