Headline figures: total import/export quantities, values and
weighted-average prices per period, the trade balance, and a top-partner
breakdown. The best first call for any new customs-code/reporter slice.
The figures sit under `total` / `partners` / `balance`, each panel
carrying its own `periods` axis; the metadata (units, residual share,
selection notes) is in `header`.
View input schema
{
"type": "object",
"properties": {
"query": {
"additionalProperties": false,
"description": "The customs-code/reporter/partner-set/period/frequency slice to query -- the same request body every tradedashboard.eu analytical endpoint takes. See its own field descriptions (customs_code, baskets, reporter, partner_set, period_start, period_end, frequency, n_top, ...) for details; exactly one of `customs_code` and `baskets` is required, everything else has a sensible default.",
"properties": {
"reporter": {
"default": "European Union",
"description": "Declaring entity: an EU Member State, an EU candidate country, Northern Ireland ('XI'), or one of the three aggregate presets ('European Union', 'Euro area', 'EU candidate countries'), or a predefined reporter group name.",
"maxLength": 120,
"type": "string"
},
"group_reporters": {
"anyOf": [
{
"items": {
"maxLength": 120,
"type": "string"
},
"maxItems": 300,
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Explicit reporters for a custom reporter group. Each entry must be an EU Member State, EU candidate country, or Northern Ireland. When more than one is supplied the frame is aggregated into a synthetic group named after 'reporter'."
},
"partner_set": {
"default": "non-EU countries",
"description": "Named partner preset, e.g. 'non-EU countries', 'EU countries', 'all countries', or a predefined partner group.",
"maxLength": 120,
"type": "string"
},
"partners": {
"anyOf": [
{
"items": {
"maxLength": 120,
"type": "string"
},
"maxItems": 300,
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Explicit partner-country list that overrides 'partner_set' when present."
},
"period_start": {
"default": {
"year": 2015,
"month": 1
},
"description": "Inclusive start of the analysis window, ISO month 'YYYY-MM'.",
"pattern": "\\d{4}-\\d{2}",
"type": "string"
},
"frequency": {
"description": "Resampling frequency for the series: 'month', 'quarter' or 'year'.",
"enum": [
"month",
"quarter",
"year"
],
"type": "string",
"default": "quarter"
},
"remove_outliers": {
"default": true,
"description": "Drop extreme unit-price outliers before computing weighted-average prices.",
"type": "boolean"
},
"customs_code": {
"anyOf": [
{
"description": "A canonical customs code, TOTAL, or a supported residual spelling.",
"type": "string"
},
{
"items": {
"description": "A canonical customs code, TOTAL, or a supported residual spelling.",
"type": "string"
},
"maxItems": 50,
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Combined Nomenclature customs code(s), 2–8 digits, or the literal 'TOTAL' meta-aggregate (all products combined). Residual customs codes are requestable too (e.g. 850440XX, 85SSS999, 85SSS); see https://tradedashboard.eu/faq-en.html#customscode for details. Pass a list to compare codes side by side, or to aggregate them in views that fold several codes into one basket: their volumes are summed and prices volume-weighted across every tab — except the Cross-section views, which keep each code separate. Exactly one of 'customs_code' and 'baskets' must be given.",
"examples": [
"3801",
[
"0901",
"0902"
],
"TOTAL",
"850440XX",
"85SSS"
]
},
"baskets": {
"anyOf": [
{
"items": {
"additionalProperties": false,
"description": "A nonempty tuple of pieces summed into one displayed line.",
"properties": {
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The basket's display label; default: the pieces' codes joined with '+'."
},
"pieces": {
"description": "The pieces summed into this basket.",
"items": {
"additionalProperties": false,
"description": "Every declaration under one code in one optional month window.",
"properties": {
"customs_code": {
"description": "The customs code: 2/4/6/8 digits, 'TOTAL', or a residual spelling (850440XX, 85SSS999, 85SSS).",
"type": "string"
},
"from_month": {
"anyOf": [
{
"description": "A calendar month, 'YYYY-MM'.",
"pattern": "\\d{4}-\\d{2}",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Inclusive first month of the window, ISO 'YYYY-MM'; null = the request's period_start."
},
"to_month": {
"anyOf": [
{
"description": "A calendar month, 'YYYY-MM'.",
"pattern": "\\d{4}-\\d{2}",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Inclusive last month of the window, ISO 'YYYY-MM'; null = the request's period_end."
}
},
"required": [
"customs_code"
],
"type": "object"
},
"maxItems": 50,
"minItems": 1,
"type": "array"
}
},
"required": [
"pieces"
],
"type": "object"
},
"maxItems": 50,
"minItems": 1,
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The explicit basket form of the customs-code selection: a list of baskets, each a list of (customs_code, optional month window) pieces summed into one displayed line. Use it to clip a code to specific months or to chain successor codes (e.g. [{pieces: [{customs_code: '8524', to_month: '2006-12'}, {customs_code: '85241100', from_month: '2007-01'}]}] with a period starting before 2007). Every piece must meet the requested period. Exactly one of 'customs_code' and 'baskets' must be given."
},
"period_end": {
"description": "Inclusive end of the analysis window, ISO month 'YYYY-MM'. Defaults to roughly three months ago — the latest period Eurostat typically has fully reported.",
"pattern": "\\d{4}-\\d{2}",
"type": "string"
},
"n_top": {
"default": 7,
"description": "Number of top entities (by volume/value) to break out individually in charts.",
"maximum": 100,
"minimum": 1,
"type": "integer"
},
"include_other": {
"default": true,
"description": "Bundle entities outside the top-N into a single 'Other' bucket.",
"type": "boolean"
},
"include_residuals": {
"default": true,
"description": "Include the residual customs-code layer: residual rows in the breakdown views (subcode-compare, concentration-compare, volatility heatmap), the residual share in the response header and the related notes. False hides all of it; non-residual figures are unaffected.",
"type": "boolean"
},
"lang": {
"default": "en",
"description": "Language for translated labels in the response: one of the listed ones (the languages the metadata exists in); any other is refused.",
"enum": [
"bg",
"cs",
"da",
"de",
"el",
"en",
"es",
"et",
"fi",
"fr",
"ga",
"hr",
"hu",
"it",
"lt",
"lv",
"mt",
"nl",
"pl",
"pt",
"ro",
"sk",
"sl",
"sv"
],
"type": "string"
}
},
"type": "object"
},
"compact": {
"default": false,
"description": "If true, condense long numeric time series (more than ~6 points -- typically monthly/quarterly windows or wide multi-partner/multi-period breakdowns) into summary statistics (first, last, min, max, mean, pct_change) instead of returning every data point. Leave false for full-fidelity series (e.g. to actually plot a chart); set true when you just need the headline trend and want to save context.",
"type": "boolean"
}
},
"required": [
"query"
],
"additionalProperties": false
}