{"slug":"2s-io-api-trade-locode-1840bb","title":"Look up or search UN/LOCODE — the United Nations Code for Trade and Transport Lo","host":"2s.io","method":"GET","resource":"https://2s.io/api/trade/locode","category":"code","description":"Look up or search UN/LOCODE — the United Nations Code for Trade and Transport Locations (~116k locations, all countries). Pass `locode` for an exact code (e.g. USNYC or 'US NYC'). Or pass `query` to search location names, optionally filtered by `country` (ISO 3166 alpha-2) and `function` (port, rail","price_listed":0.0025,"price_asked":0.0025,"state":"answering","state_label":"Answering","checks_7d":1,"answered_7d":1,"latency_ms_median":269,"reported_calls_30d":2,"reported_payers_30d":2,"networks":["eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"method":"GET","queryParams":{"locode":"USNYC"},"type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"properties":{"method":{"const":"GET"},"queryParams":{"properties":{"country":{"description":"ISO 3166 alpha-2 filter for query mode.","type":"string"},"function":{"description":"port | rail | road | airport | postal | multimodal | fixed | border.","type":"string"},"limit":{"description":"1–50, default 10 (query mode).","type":"integer"},"locode":{"description":"Exact UN/LOCODE, e.g. USNYC or 'US NYC'.","type":"string"},"query":{"description":"Location name to search.","type":"string"}}},"type":{"const":"http"}},"required":["type","method","queryParams"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-10-10","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.0025,"price_match":true,"latency_ms":269,"error":null}],"description_full":"Look up or search UN/LOCODE — the United Nations Code for Trade and Transport Locations (~116k locations, all countries). Pass `locode` for an exact code (e.g. USNYC or 'US NYC'). Or pass `query` to search location names, optionally filtered by `country` (ISO 3166 alpha-2) and `function` (port, rail, road, airport, postal, multimodal, fixed, border). Each result: locode, name, country, subdivision, transport functions, entry status, IATA code where it differs, and coordinates. UN/LOCODE is the standard location identifier in shipping schedules, EDI messages, and customs documents.","last_updated":"2026-10-08T23:43:04.198Z","schemes":["exact"]}