{"api":{"id":"api_bfc0065c0294615b9d0fed34","slug":"un-locode-port-codes","name":"UN/LOCODE Port and Trade Location API","description":"UN/LOCODE trade locations worldwide: code, name, country, subdivision, what the place serves (port, rail, road, airport), status, IATA code and decimal coordinates. Search by country, name words or function.","kind":"ready_made","visibility":"public","domain":"raw.githubusercontent.com","source_url":"https://raw.githubusercontent.com/datasets/un-locode/main/data/code-list.csv","category":"commerce","record_type":"place","active_version":"1.0","units_per_1k":500,"health":"unknown","auto_repair":false,"last_checked_at":null,"last_run_at":null,"fields_count":8,"created_at":"2026-12-06T04:45:48.408Z","updated_at":"2026-12-06T04:45:48.408Z","runnable":true,"egress":null,"repairs":[],"repairs_total":0,"how":"Runs on a reader we built and maintain by hand for this site.","fields":[{"name":"locode","type":"string","description":"UN/LOCODE, country code and place code, such as CA VAN.","required":true,"coverage":1,"example":"CA CXH"},{"name":"country","type":"string","description":"Two-letter country code.","required":false,"coverage":1,"example":"CA"},{"name":"name","type":"string","description":"Place name.","required":false,"coverage":1,"example":"Vancouver Harbour Water Apt/Vancouver"},{"name":"subdivision","type":"string","description":"State or province code.","required":false,"coverage":1,"example":"BC"},{"name":"function","type":"array","description":"What the place serves, such as port, airport, rail.","required":false,"coverage":1,"example":["airport"]},{"name":"status","type":"string","description":"Status of the entry in plain words.","required":false,"coverage":1,"example":"recognised location"},{"name":"iata","type":"string","description":"IATA code when there is one.","required":false,"coverage":0.2,"example":"YVR"},{"name":"coordinates","type":"object","description":"Latitude and longitude in decimal degrees.","required":false,"coverage":0.6,"example":{"latitude":49.2833,"longitude":-123.1}}],"inputs":[{"name":"country","type":"string","description":"Two-letter country code, such as CA.","example":"CA"},{"name":"name","type":"string","description":"Words of the place name, such as Vancouver.","example":"Vancouver"},{"name":"function","type":"string","description":"What the place serves: 1 or port, 2 rail, 3 road, 4 or airport, 5 postal, 6 multimodal, 7 fixed transport, B border crossing.","example":"1"}],"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":true,"properties":{"coordinates":{"description":"Latitude and longitude in decimal degrees.","type":"object"},"country":{"description":"Two-letter country code.","type":"string"},"function":{"description":"What the place serves, such as port, airport, rail.","type":"array"},"iata":{"description":"IATA code when there is one.","type":"string"},"locode":{"description":"UN/LOCODE, country code and place code, such as CA VAN.","type":"string"},"name":{"description":"Place name.","type":"string"},"status":{"description":"Status of the entry in plain words.","type":"string"},"subdivision":{"description":"State or province code.","type":"string"}},"required":["locode"],"title":"UN/LOCODE Port and Trade Location API","type":"object"},"samples":[{"locode":"CA CXH","country":"CA","name":"Vancouver Harbour Water Apt/Vancouver","subdivision":"BC","function":["airport"],"status":"recognised location","iata":null,"coordinates":{"latitude":49.2833,"longitude":-123.1}},{"locode":"CA PMO","country":"CA","name":"Port Moody/Vancouver","subdivision":"BC","function":["port","rail","road"],"status":"recognised location","iata":null,"coordinates":null},{"locode":"CA VAC","country":"CA","name":"North Vancouver","subdivision":"BC","function":["rail","road","airport"],"status":"recognised location","iata":null,"coordinates":{"latitude":49.3167,"longitude":-123.0667}}],"validation":{"checked_at":"2026-12-06T04:45:48.335Z","field_coverage":{"coordinates":0.67,"country":1,"function":1,"iata":0,"locode":1,"name":1,"status":1,"subdivision":1},"fresh_read":false,"identity_unique":true,"issues":["Imported from a hand-built source. Field names and types come from its published schema; no live read was made for this check."],"level":"preview","pages_checked":0,"passed":true,"records_checked":3},"links":{"run":"https://pullrow.dev/v1/apis/api_bfc0065c0294615b9d0fed34/run","openapi":"https://pullrow.dev/v1/apis/api_bfc0065c0294615b9d0fed34/openapi.json","contract":"https://pullrow.dev/v1/apis/api_bfc0065c0294615b9d0fed34/contract.json","page":"https://pullrow.dev/catalog/un-locode-port-codes"},"runs_30d":0,"success_rate_30d":null,"price_per_1k_usd":0.5,"featured":false,"reliability":{"window_days":30,"runs":0,"completed":0,"succeeded":0,"failed":0,"success_rate":null,"last_run_at":null},"demo":{"available":false,"max_records":0,"reason":"Every run of this API costs us money, so it has no free live demo. The sample records on its page show what it returns.","code":"demo_not_available"},"meta":{"limitations":["Built on the UNECE UN/LOCODE list as republished in the open datasets repository; it is updated about twice a year, so new codes can lag.","Each run reads the whole list (about 2 MB) before filtering, so a run takes a few seconds whatever the filters.","Coordinates are empty for many locations, and are given in degrees and minutes in the source (converted to decimals here, so only about 1 km precise).","IATA code is only present for some airports and cities.","Name search matches all given words anywhere in the name, ignoring accents and case.","One run returns at most 5,000 records. Open licence of the UNECE data; credit UNECE UN/LOCODE."]},"plain":{"summary":null,"source":"rules","fields":[{"name":"locode","label":"Locode","description":"UN/LOCODE, country code and place code, such as CA VAN.","group":"Basics","shown":true,"written":false},{"name":"country","label":"Two-letter country code","description":"","group":"Location","shown":true,"written":false},{"name":"name","label":"Place name","description":"","group":"Basics","shown":true,"written":false},{"name":"subdivision","label":"Subdivision","description":"State or province code.","group":"Basics","shown":true,"written":false},{"name":"function","label":"Function","description":"What the place serves, such as port, airport, rail.","group":"Basics","shown":true,"written":false},{"name":"status","label":"Status","description":"Status of the entry in plain words.","group":"Basics","shown":true,"written":false},{"name":"iata","label":"Iata","description":"IATA code when there is one.","group":"Basics","shown":true,"written":false},{"name":"coordinates","label":"Coordinates","description":"Latitude and longitude in decimal degrees.","group":"Location","shown":true,"written":false}],"inputs":[{"name":"country","label":"Country","help":"Two-letter country code, such as CA.","example":"CA","written":false},{"name":"name","label":"Name","help":"Words of the place name, such as Vancouver.","example":"Vancouver","written":false},{"name":"function","label":"Function","help":"What the place serves: 1 or port, 2 rail, 3 road, 4 or airport, 5 postal, 6 multimodal, 7 fixed transport, B border crossing.","example":"1","written":false}]}},"incidents":[]}