{"api":{"id":"api_80c16fb55cd11f02d7f8f4b2","slug":"un-comtrade-trade-flows","name":"International Trade Flows API (UN Comtrade)","description":"Official yearly or monthly trade between countries from UN Comtrade: exports or imports of a reporting country with a partner, for all goods or one HS product code, in US dollars, with weight and quantity when reported.","kind":"ready_made","visibility":"public","domain":"comtradeapi.un.org","source_url":"https://comtradeapi.un.org/public/v1/preview/C/A/HS?reporterCode=124&period=2024&partnerCode=0&cmdCode=TOTAL&flowCode=X","category":"public_data","record_type":"generic","active_version":"1.0","units_per_1k":500,"health":"unknown","auto_repair":false,"last_checked_at":null,"last_run_at":null,"fields_count":9,"created_at":"2026-12-06T03:57:27.722Z","updated_at":"2026-12-06T03:57:27.722Z","runnable":true,"egress":null,"repairs":[],"repairs_total":0,"how":"Runs on a reader we built and maintain by hand for this site.","fields":[{"name":"reporter","type":"string","description":"Reporting country.","required":false,"coverage":1,"example":"Canada"},{"name":"partner","type":"string","description":"Partner country or World.","required":false,"coverage":1,"example":"World"},{"name":"period","type":"string","description":"Year, or year and month, the figure covers.","required":false,"coverage":1,"example":"2024"},{"name":"flow","type":"string","description":"exports or imports.","required":false,"coverage":1,"example":"imports"},{"name":"hs_code","type":"string","description":"Product code (Harmonized System) or TOTAL.","required":false,"coverage":1,"example":"0201"},{"name":"description","type":"string","description":"Name of the product group.","required":false,"coverage":1,"example":"Meat of bovine animals; fresh or chilled"},{"name":"trade_value_usd","type":"number","description":"Value of the trade in US dollars.","required":false,"coverage":1,"example":846316155.891},{"name":"net_weight_kg","type":"number","description":"Net weight in kilograms, when reported.","required":false,"coverage":0.75,"example":79076414},{"name":"quantity","type":"number","description":"Quantity in the product's standard unit, when reported.","required":false,"coverage":1,"example":79076414}],"inputs":[{"name":"reporter","type":"string","description":"Reporting country, as a two-letter or three-letter code or a name, such as CA, USA or Germany.","example":"CA","required":true},{"name":"partner","type":"string","description":"Partner country (code or name), World for the total, or All for every partner (up to 500 rows).","default":"World","example":"World"},{"name":"period","type":"integer","description":"Year such as 2024, or year and month such as 202406 with frequency monthly.","example":2024},{"name":"frequency","type":"string","description":"Annual or monthly figures.","default":"annual","enum":["annual","monthly"]},{"name":"hs_code","type":"string","description":"Harmonized System product code of 2, 4 or 6 digits, several separated by commas, or TOTAL for all goods.","default":"TOTAL","example":"TOTAL"},{"name":"flow","type":"string","description":"Direction of trade seen by the reporting country.","default":"exports","example":"imports","enum":["exports","imports"]}],"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":true,"properties":{"description":{"description":"Name of the product group.","type":"string"},"flow":{"description":"exports or imports.","type":"string"},"hs_code":{"description":"Product code (Harmonized System) or TOTAL.","type":"string"},"net_weight_kg":{"description":"Net weight in kilograms, when reported.","type":"number"},"partner":{"description":"Partner country or World.","type":"string"},"period":{"description":"Year, or year and month, the figure covers.","type":"string"},"quantity":{"description":"Quantity in the product's standard unit, when reported.","type":"number"},"reporter":{"description":"Reporting country.","type":"string"},"trade_value_usd":{"description":"Value of the trade in US dollars.","type":"number"}},"required":[],"title":"International Trade Flows API (UN Comtrade)","type":"object"},"samples":[{"reporter":"Canada","partner":"World","period":"2024","flow":"imports","hs_code":"0201","description":"Meat of bovine animals; fresh or chilled","trade_value_usd":846316155.891,"net_weight_kg":79076414,"quantity":79076414},{"reporter":"Canada","partner":"World","period":"2024","flow":"imports","hs_code":"2709","description":"Petroleum oils and oils obtained from bituminous minerals; crude","trade_value_usd":15154800354.105,"net_weight_kg":24774635123.58,"quantity":24774635123.58},{"reporter":"Canada","partner":"World","period":"2024","flow":"imports","hs_code":"8703","description":"Motor cars and other motor vehicles; principally designed for the transport of persons (other than those of heading no. 8702), including station wagons and racing cars","trade_value_usd":40529774655.885,"net_weight_kg":2238724546.388,"quantity":1462390}],"validation":{"checked_at":"2026-12-06T03:57:27.599Z","field_coverage":{"description":1,"flow":1,"hs_code":1,"net_weight_kg":1,"partner":1,"period":1,"quantity":1,"reporter":1,"trade_value_usd":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_80c16fb55cd11f02d7f8f4b2/run","openapi":"https://pullrow.dev/v1/apis/api_80c16fb55cd11f02d7f8f4b2/openapi.json","contract":"https://pullrow.dev/v1/apis/api_80c16fb55cd11f02d7f8f4b2/contract.json","page":"https://pullrow.dev/catalog/un-comtrade-trade-flows"},"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":["The free preview service returns at most 500 rows per request, so a broad question (all partners with all products) is cut at 500 rows; ask for one partner or one HS code to get the rest.","Countries report on their own schedule: the latest year is often incomplete or missing, and some countries publish with a delay of a year or more. A period with no data returns no rows.","Values are as reported to the United Nations, in US dollars. Exports are usually valued free-on-board, imports including freight; mirror data from partners can differ.","Weight and quantity are empty for many products and for total-trade rows.","HS codes can be 2, 4 or 6 digits (or TOTAL); the goods classification is the Harmonized System as of the version the country used.","The source asks users to stay within fair-use limits; runs keep about one request per second. Credit UN Comtrade when you publish the data."]},"plain":{"summary":null,"source":"rules","fields":[{"name":"reporter","label":"Reporter","description":"Reporting country.","group":"Basics","shown":true,"written":false},{"name":"partner","label":"Partner country or World","description":"","group":"Basics","shown":true,"written":false},{"name":"period","label":"Period","description":"Year, or year and month, the figure covers.","group":"Basics","shown":true,"written":false},{"name":"flow","label":"Flow","description":"exports or imports.","group":"Basics","shown":true,"written":false},{"name":"hs_code","label":"Hs code","description":"Product code (Harmonized System) or TOTAL.","group":"Basics","shown":true,"written":false},{"name":"description","label":"Description","description":"Name of the product group.","group":"Basics","shown":true,"written":false},{"name":"trade_value_usd","label":"Trade value (USD)","description":"Value of the trade in US dollars.","group":"Basics","shown":true,"written":false},{"name":"net_weight_kg","label":"Net weight (kg)","description":"Net weight in kilograms, when reported.","group":"Basics","shown":true,"written":false},{"name":"quantity","label":"Quantity","description":"Quantity in the product's standard unit, when reported.","group":"Basics","shown":true,"written":false}],"inputs":[{"name":"reporter","label":"Reporter","help":"Reporting country, as a two-letter or three-letter code or a name, such as CA, USA or Germany.","example":"CA","written":false},{"name":"partner","label":"Partner","help":"Partner country (code or name), World for the total, or All for every partner (up to 500 rows).","example":"World","written":false},{"name":"period","label":"Period","help":"Year such as 2024, or year and month such as 202406 with frequency monthly.","example":"2024","written":false},{"name":"frequency","label":"Frequency","help":"Annual or monthly figures.","example":"","written":false},{"name":"hs_code","label":"Hs code","help":"Harmonized System product code of 2, 4 or 6 digits, several separated by commas, or TOTAL for all goods.","example":"TOTAL","written":false},{"name":"flow","label":"Flow","help":"Direction of trade seen by the reporting country.","example":"imports","written":false}]}},"incidents":[]}