{"uid":"cap_U6W76YKrOOaYl909Tm0fl","slug":"2s-un-locode-trade-location-lookup-ae2c2449","name":"2s UN/LOCODE Trade Location Lookup","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, 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.","url":"https://2s.io/api/trade/locode?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","queryParams"],"properties":{"type":{"const":"http"},"method":{"const":"GET"},"queryParams":{"properties":{"limit":{"type":"integer","description":"1–50, default 10 (query mode)."},"query":{"type":"string","description":"Location name to search."},"locode":{"type":"string","description":"Exact UN/LOCODE, e.g. USNYC or 'US NYC'."},"country":{"type":"string","description":"ISO 3166 alpha-2 filter for query mode."},"function":{"type":"string","description":"port | rail | road | airport | postal | multimodal | fixed | border."}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0025","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.0025/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_SniZsSh51yDvHpkPUUyrO","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0025","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Look up UN/LOCODE trade and transport location codes by name, exact code, country, or function type, returning structured location metadata.","exampleAgentPrompt":"What's the UN/LOCODE for New York, and what transport functions does it support — can you look it up by the code USNYC?","exampleUseCases":null,"resultDescription":"Returns a list of matching UN/LOCODE location records, each with the official LOCODE string, location name, country, subdivision, coordinates (lat/lon), transport function codes and their human-readable meanings (port, rail, road, airport, postal, etc.), status code with meaning, IATA code if applicable, and last-updated timestamp. Also includes total result count and source/license attribution from UNECE.","failureModes":["No matching LOCODE found for the given code or name — returns empty items array with total:0","Invalid country code supplied — may return no results or an error","Query string too vague — returns up to limit results which may not include the intended location","Missing required queryParams (both locode and query omitted) — API may return error or empty set","Rate or payment failure via x402 — request blocked if USDC payment not provided"],"whenToPreferThis":"Use this endpoint when you need authoritative UN/LOCODE data for trade, logistics, or supply chain workflows — e.g. validating shipping location codes, enriching shipment records with coordinates, looking up port or airport codes by name, or filtering locations by country and transport function. Prefer over generic geocoding when the UN/LOCODE identifier itself is the required output or input for EDI/trade documents.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-17T18:57:27.744Z","isFirstParty":false,"canonicalSlug":"2s-un-locode-trade-location-lookup-ae2c2449"}