Glossary

Bilateral TradeFlow record structure

Bilateral TradeFlow record structure is the row shape of a UN Comtrade Plus observation: one flow between a reporter and partner economy for a single 6-digit HS commodity and period. UN Comtrade Plus TradeFlow - Electrical Machinery & Instruments (HS 85/90) serves every HS 85 and HS 90 row in this shape.

What is the Bilateral TradeFlow record structure?

The cataloged TradeFlow dataset states its own grain: "Bilateral reporter x partner x 6-digit HS commodity x flow x period." Every returned record is one country pair, one commodity, one direction and one time bucket - never a multi-commodity summary.

Behind that sentence sits a field dictionary of 38 named columns: identification fields (typeCode, freqCode, refPeriodId, refYear, refMonth, period), party codes (reporterCode, partnerCode, partner2Code), commodity detail (cmdCode, aggrLevel, isLeaf, customsCode, motCode), measures (qty, netWgt, grossWgt, cifvalue, fobvalue, primaryValue) and status booleans (isReported, isAggregate, legacyEstimationFlag).

Delivery matches the grain. The acquisition notes describe response JSON that nests records under a 'data' array alongside 'count' and 'elapsedTime', and for HS chapter 85 electrical machinery and chapter 90 instruments alone the cataloged size estimate runs into the millions of records.

Why does the Bilateral TradeFlow record structure matter when choosing a dataset?

Grain decides which questions a trade table can answer. A source shipping only national totals cannot say whether China's exports of HS 8542 integrated circuits to one partner moved in a given month; the bilateral, 6-digit, per-flow row can.

Two consequences follow:

  • Flows stay separable. Because each row carries one flowCode, mirror reconciliation compares reporter-side exports against partner-side imports instead of fighting a blended value column.
  • Aggregates are flagged, not hidden. isAggregate marks computed rows and isLeaf marks finest-detail commodity codes, so analysts can filter before summing rather than discovering double-counts late.

That discipline is rare: only 32.9% of the 1,744 datasets Datadory catalogs offer an official API, and fewer document their row contract this explicitly.

How do you evaluate Bilateral TradeFlow record structure in a data source?

  1. Ask for the stated grain. The cataloged record spells out "reporter x partner x 6-digit HS commodity x flow x period"; a vendor who cannot match that sentence is selling something coarser.
  2. Count the estimation flags. Comtrade Plus exposes isReported, legacyEstimationFlag and isAggregate beside the values. A feed without them buries imputed figures inside reported ones.
  3. Exercise the free route. The unauthenticated public preview endpoint returns live records with no registration, so sample real rows before committing to premium bulk download.

Where to see it in context: electronic-equipment-instruments data and semiconductors data.

These entries complete the Comtrade field picture:

Frequently asked questions

What does one row of Comtrade Plus data represent?

One bilateral flow: a reporter economy, a partner economy, a single 6-digit HS commodity, one flow direction and one period. Quantity, net weight, gross weight and US dollar values ride on the same row beside boolean estimation flags such as isReported and isAggregate.

Can I sample this structure without paying?

Yes. The unauthenticated public preview endpoint at comtradeapi.un.org/public/v1/preview/ returns real records with no key. Final non-preview data needs a subscription key sent as Ocp-Apim-Subscription-Key, and bulk download is gated to premium accounts.

Which flag separates aggregate rows from reported ones?

isAggregate marks computed rows such as World totals, where partnerCode is 0, while isReported is true when the record was directly reported rather than imputed. Filter on both before summing, or aggregate rows will double-count the underlying flows.

Datasets containing this field

Datasets containing Bilateral TradeFlow record structure

6 datasets carry bilateral tradeflow record structure in the catalog. Open one, count the fields, judge for yourself.

Electronic Equipment & Instruments

Census Foreign Trade – Schedule B / HS-Based Trade Statistics

Industries EU member states beside EU institutions… · Per-record issue and revision…

EU Open Data Portal - Electronics Datasets

id · identifier · title …+11 more

Electronic Equipment & Instruments

Google Patents Public Data on BigQuery

Electronic Equipment & Instruments

Hugging Face Datasets - Electronics & Semiconductors

id · downloads · likes …+5 more

Industries

JEITA Electronics Shipment & Production Statistics

Product category · Sub-category · Unit …+3 more

Every listing shows the field dictionary, sample rows, and coverage before you commit. API, files, or your warehouse. Daily, weekly, or hourly.

Get sample rows