Guidance

HMRC Datalab datasets: Imports and exports

Details of datasets held in the HMRC Datalab relating to imports and exports.

Information from UK import and export declarations for countries outside the EU for 1996 to 2013 and countries within the EU for 2008 to 2016.

Non-EU trade panel dataset

This data shows information from UK import and export declarations from and to countries outside the EU for 1996 to 2016.

Variable name Definition Appears in imports? Appears in exports?
traderid Trader identifier - this is a generated number unique to DataLab. Yes Yes
agentid Agent identifier - this is a generated number unique to DataLab. Yes Yes
comcode The commodity code listed in HMRC Tariff (Non-EU) - digits 1-8 are the Combined Nomenclature. Yes Yes
codseq Numeric sequence for Country of Destination for exports and Country of Dispatch for imports. Yes Yes
portseq Numeric code for port of import/export (from 2007 onwards portseq is mapped from location). Yes Yes
location Indicates location of inland/local clearance (eg inland clearance depot, inland rail depot or trader premises) if goods were not cleared at the border. Also used to indicate relevant freezone location for goods entering or leaving a freezone. Yes Yes
job 3 digit number identifying the type of document (for manually input entries) or the data source (if electronic). Can be used to identify data source. Yes Yes
directin System generated code identifying the data source. For codes see separate table. Yes Yes
cooseq Numeric sequence for Country of Origin. The COO is the country where the goods were originally produced, which may be different from the Country of Dispatch (it will be different if goods have been sold to another country before being consigned to the UK). Imports - mandatory. Exports - not required; system inserts CODSEQ. Yes No
cpc Customs Procedure Code. Code identifying the type of procedure, or regime, to which the goods are subject: Digits 1-2 are the customs regime the goods are subject to; Digits 3-4 the regime the goods have just left; Digits 5-6 show the national breakdown identifying further specific procedures. Yes Yes
Svalue Statistical value. The value used for trade statistical purposes (ie Free on Board for Exports, Cost Insurance Freight for Imports). The statistical value is taken either directly from the customs declaration (where a stat value has been declared) or calculated within CHIEF (non-EU). Yes Yes
netmass Weight of the item in kilograms excluding packaging. Yes Yes
suppunit Second quantity (eg number) required for certain comcodes, as specified in the Tariff/CN. Yes Yes
mot Mode of Transport. Mode of transport by which goods leave the UK (exports) or arrive at the UK (imports ). For codes see separate table. Yes Yes
imot Inland Mode of Transport. Optional code identifying the means of transport where there has been an ‘internal’ movement within the community before goods have been subject to customs formalities (imports) or after they have been subject to customs formalities (exports). No code will be present where customs formalities are carried out at point of exit from, or entry into, the community, which is the normal situation. Yes Yes
qty3 Additional 3rd quantity declaration required for non-EU imports only for certain commodities (excise goods, CAP goods etc.) as defined in the Tariff. Yes No
perref Period reference. Identifies the month of account of an item in format YYYYMM. Yes Yes
suite Indicator based on COMCODE which identifies non-trade items. Used to exclude certain categories of non-trade in general and special trade compilations. Indicators are shown in separate table. Yes Yes
sitc Standard International Trade Classification - a United Nations commodity classification system based on a five digit numeric code. SITC data is published at different levels. Each level is designated as follows: 1 digit - Section. 2 digit - Division. 3 digit - Group. 4 digit - Sub-group. 5 digit - Item. Yes Yes
suppress Basic yes/no code indicating whether the comcode is subject to suppression in publications available to the public. (Please see list of commodity codes suppressed and HMRC Suppressions Policy for further details.) Yes Yes
Currinv Currency of invoicing. Introduced on non-EU imports and exports from January 2010. Required for all imports lines and for all exports lines on a header with a value >=£100,000. No No
amend Identifies amendment: Positive value in format YYYYMM = past month amendment record, 000000 = standard records. Yes Yes
addtype Anti-Dumping Duty type. Indicates whether the item has been subject to Anti-Dumping Duty. An additional duty imposed on goods which have a very low (uneconomic) unit cost compared with goods of home, EU or non-EU country origin. Yes No
cbcode System generated, shows whether items are subject to certain procedures or belonging to certain duty groups. For values see separate table. Yes No
ctr Code identifying goods transported by container: 0 = not in container. 1 = in container. Yes Yes
decrep Indicates the relationship between the importer/exporter and the declarant. 1 = Trader declaring; 2 = Direct agent representation; 3 = Indirect agent representation Yes Yes
depdate Date of departure (aka ‘date of shipment’) in YYYYMMDD format from January 2007. Defaults to January if date is missing. Before January 2007 field was 6 characters in format YYMMDD. Pre - Jan 04 this was included in ‘ENTRYDTE’. No Yes
prefcode Preference code. 3 digit code indicating whether a preferential rate of Import Duty is being claimed (see separate table). Yes No
Entrydte Date of entry. Imports - date of acceptance by customs in format yyyymmdd. Exports - date of shipment in format ddmmyyyy. From Jan 04: - Date of Entry. Before Jan 04: - Date of departure (date of shipment). Before January 2007 format was yymmdd. Yes Yes
flow A manually added field that distinguishes the four flows. E = Exports (non-EU exports); I = Imports (non-EU imports) Yes Yes
tradeind System generated code based upon CPC to identify the trade type. Code is used in conjunction with suite indicator to select appropriate items for general and special trade compilations. For list of indicators see separate table. Yes Yes
sitc2 SITC division comprising first 2 digits of SITC. Yes Yes
HS4 Comcode ‘heading’ comprising first four digits of comcode. Yes Yes

EU trade panel dataset

This data shows information from UK import and export declarations from and to countries within the EU for 2008 to 2016.

Variable name Definition Appears in EU-imports? Appears in EU-exports?
traderid Trader identifier - This is a generated number unique to DataLab Yes Yes
agentid Agent identifier - This is a generated number unique to DataLab Yes Yes
comcode The commodity code listed in HMRC Tariff (Non-EU) - digits 1-8 are the Combined Nomenclature Yes Yes
codseq Numeric sequence for Country of Destination for exports and Country of Dispatch for Imports Yes Yes
job 3 digit number identifying the type of document (for manually input entries) or the data source (if electronic). Can be used to identify data source. Yes Yes
directin System generated code identifying the data source. For codes see separate table. Yes Yes
Svalue Statistical value. The value used for trade statistical purposes (ie Free on Board for Exports, Cost Insurance Freight for Imports). The statistical value is taken either directly from the customs declaration (where a stat value has been declared) or calculated within CHIEF (non-EU) . Yes Yes
netmass Weight of the item in kilograms excluding packaging. Yes Yes
netmassest Indicator to show if netmass has been estimated. For comcodes that netmass is not mandatory. 2010 onwards only Yes Yes
suppunit Second quantity (eg number) required for certain comcodes, as specified in the Tariff/CN. Yes Yes
perref Period reference. Identifies the month of account of an item in format YYYYMM. Yes Yes
suite Indicator based on COMCODE which identifies non-trade items. Used to exclude certain categories of non-trade in General and Special Trade compilations. Indicators are shown in separate table. Yes Yes
sitc Standard International Trade Classification - a United Nations commodity classification system based on a five digit numeric code. SITC data is published at different levels. Each level is designated as follows: 1 digit - Section. 2 digit - Division. 3 digit - Group. 4 digit - Sub-group. 5 digit - Item. Yes Yes
suppress Basic yes/no code indicating whether the comcode is subject to suppression in publications available to the public. (Please see list of commodity codes suppressed and HMRC Suppressions Policy for further details) Yes Yes
amend Identifies amendment: Positive value in format YYYYMM = past month amendment record, 000000 = standard records. Yes Yes
delterms Delivery terms - indicator to show basis for declared value calculation. From 2001 this is required from traders with a total annual EU import/export turnover over a given value. (Currently for 2011 it is £16m). However this is also declared voluntarily by some traders below the threshold Yes Yes
ancosts The difference between statvalue and declared invoice value Yes Yes
notrans Nature of transaction - indicator showing the type of transaction. Yes Yes
tradeind System generated code, used in conjunction with SUITE, to select appropriate items for General and Special Trade. Yes Yes
consol Number of consolidated lines - (where consolidation has taken place). Yes Yes
flow A manually added field that distinguishes the four flows: A = Arrivals (EU Imports); D = Dispatches (EU Exports). Yes Yes
sitc2 SITC division comprising first 2 digits of SITC. Yes Yes
HS4 Comcode ‘heading’ comprising first four digits of comcode. Yes Yes

The HMRC Datalab

The HMRC Datalab allows approved researchers to access de-identified HMRC data in a government accredited secure environment.

Read more about the HMRC Datalab.

Published 14 November 2014
Last updated 5 June 2018 + show all updates
  1. Updated years of data availability
  2. First published.