{"api":{"id":"api_4f77c755e11d5aaaba2f6fd6","slug":"un-comtrade-agrifood-trade","name":"Agri-food Trade Flows API","description":"Annual exports or imports of food and farm products between countries, from UN Comtrade: value in US dollars, weight and quantity by HS product code, with country and product names instead of numeric codes.","kind":"ready_made","visibility":"public","domain":"comtradeapi.un.org","source_url":"https://comtradeapi.un.org/public/v1/preview/C/A/HS","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":10,"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":"period","type":"string","description":"Year of the figures.","required":true,"coverage":1,"example":"2023"},{"name":"reporter","type":"string","description":"Country that reported the trade.","required":false,"coverage":1,"example":"Canada"},{"name":"partner","type":"string","description":"Partner country, or World.","required":false,"coverage":1,"example":"World"},{"name":"flow","type":"string","description":"export or import.","required":false,"coverage":1,"example":"export"},{"name":"hs_code","type":"string","description":"Harmonized System product code.","required":false,"coverage":1,"example":"0201"},{"name":"description","type":"string","description":"Name of the product group for the code.","required":false,"coverage":1,"example":"Meat of bovine animals; fresh or chilled"},{"name":"net_weight_kg","type":"number","description":"Net weight in kilograms, when reported.","required":false,"coverage":0.75,"example":356999709},{"name":"quantity","type":"number","description":"Quantity in the unit given in quantity_unit, when reported.","required":false,"coverage":0.75,"example":356999709},{"name":"quantity_unit","type":"string","description":"Unit of the quantity, such as kg.","required":false,"coverage":0.75,"example":"kg"},{"name":"trade_value_usd","type":"number","description":"Trade value in US dollars.","required":false,"coverage":1,"example":2918597139.755}],"inputs":[{"name":"reporters","type":"array","description":"Reporting countries by name, ISO code or UN code (up to 10), for example Canada.","example":["Canada"],"required":true},{"name":"partners","type":"array","description":"Partner countries (up to 10). World totals when empty.","example":["World"]},{"name":"hs_codes","type":"array","description":"HS product codes of 2, 4 or 6 digits in chapters 01 to 24, such as 10 (cereals) or 1001 (wheat). All 24 chapters when empty.","example":["10"]},{"name":"years","type":"array","description":"Years such as 2023 (up to 5). The latest complete year, 2023, when empty.","example":[2023]},{"name":"flow","type":"string","description":"export or import.","default":"export","example":"export","enum":["export","import"]}],"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":true,"properties":{"description":{"description":"Name of the product group for the code.","type":"string"},"flow":{"description":"export or import.","type":"string"},"hs_code":{"description":"Harmonized System product code.","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 of the figures.","type":"string"},"quantity":{"description":"Quantity in the unit given in quantity_unit, when reported.","type":"number"},"quantity_unit":{"description":"Unit of the quantity, such as kg.","type":"string"},"reporter":{"description":"Country that reported the trade.","type":"string"},"trade_value_usd":{"description":"Trade value in US dollars.","type":"number"}},"required":["period"],"title":"Agri-food Trade Flows API","type":"object"},"samples":[{"period":"2023","reporter":"Canada","partner":"World","flow":"export","hs_code":"0201","description":"Meat of bovine animals; fresh or chilled","net_weight_kg":356999709,"quantity":356999709,"quantity_unit":"kg","trade_value_usd":2918597139.755},{"period":"2023","reporter":"Canada","partner":"World","flow":"export","hs_code":"10","description":"Cereals","net_weight_kg":null,"quantity":null,"quantity_unit":null,"trade_value_usd":11232212939.253},{"period":"2023","reporter":"Canada","partner":"World","flow":"export","hs_code":"1001","description":"Wheat and meslin","net_weight_kg":25615146610.775,"quantity":25615146610.775,"quantity_unit":"kg","trade_value_usd":8854972028.586}],"validation":{"checked_at":"2026-12-06T03:57:27.599Z","field_coverage":{"description":1,"flow":1,"hs_code":1,"net_weight_kg":0.67,"partner":1,"period":1,"quantity":0.67,"quantity_unit":0.67,"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_4f77c755e11d5aaaba2f6fd6/run","openapi":"https://pullrow.dev/v1/apis/api_4f77c755e11d5aaaba2f6fd6/openapi.json","contract":"https://pullrow.dev/v1/apis/api_4f77c755e11d5aaaba2f6fd6/contract.json","page":"https://pullrow.dev/catalog/un-comtrade-agrifood-trade"},"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":["Uses the free UN Comtrade public preview, which returns at most 500 rows per request; a run reads one request for each year, so a wide mix of countries, partners and codes in one year can be cut off at 500 rows. Narrow the inputs to get everything.","Annual data only, flow of one direction per run, and HS chapters 01 to 24 (food, live animals, beverages, tobacco).","Weight and quantity are empty for whole-chapter (2-digit) totals; they are filled for 4-digit and 6-digit product codes. Some countries report no weight or no quantity.","Countries publish with a delay, so the newest year is often missing or partial; asked-for combinations with no reported trade return nothing.","The source asks for fair use and its terms limit commercial redistribution of the raw data; credit UN Comtrade and check its terms before republishing. Runs keep about one request every three seconds across all users."]},"plain":{"summary":null,"source":"rules","fields":[{"name":"period","label":"Period","description":"Year of the figures.","group":"Basics","shown":true,"written":false},{"name":"reporter","label":"Reporter","description":"Country that reported the trade.","group":"Basics","shown":true,"written":false},{"name":"partner","label":"Partner country, or World","description":"","group":"Basics","shown":true,"written":false},{"name":"flow","label":"Flow","description":"export or import.","group":"Basics","shown":true,"written":false},{"name":"hs_code","label":"Hs code","description":"Harmonized System product code.","group":"Basics","shown":true,"written":false},{"name":"description","label":"Description","description":"Name of the product group for the code.","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 unit given in quantity_unit, when reported.","group":"Basics","shown":true,"written":false},{"name":"quantity_unit","label":"Quantity unit","description":"Unit of the quantity, such as kg.","group":"Basics","shown":true,"written":false},{"name":"trade_value_usd","label":"Trade value (USD)","description":"Trade value in US dollars.","group":"Basics","shown":true,"written":false}],"inputs":[{"name":"reporters","label":"Reporters","help":"Reporting countries by name, ISO code or UN code (up to 10), for example Canada.","example":"Canada","written":false},{"name":"partners","label":"Partners","help":"Partner countries (up to 10). World totals when empty.","example":"World","written":false},{"name":"hs_codes","label":"Hs codes","help":"HS product codes of 2, 4 or 6 digits in chapters 01 to 24, such as 10 (cereals) or 1001 (wheat). All 24 chapters when empty.","example":"10","written":false},{"name":"years","label":"Years","help":"Years such as 2023 (up to 5). The latest complete year, 2023, when empty.","example":"2023","written":false},{"name":"flow","label":"Flow","help":"export or import.","example":"export","written":false}]}},"incidents":[]}