oneapi
Sign in
Financiar v1 / Inflatie

External trade by partner country

FOB exports and CIF imports across 249 partner countries, annually since 1991, in dollars and euro. 84,142 values from the TEMPO matrices EXP101B, EXP102G, EXP102E (the country total) and EXP101D, EXP102C (EU countries × nomenclature sections).

⚠️ For imports, „partner country" means TWO different things, and the source splits them in 2006. Up to then it publishes the country of origin; after, the country of consignment for intra-EU trade. On the import total the two coincide — it is the same goods, merely attributed differently — but across countries it moves billions. In 2006, the only year published on both: Hungary goes from 1.67 to 3.45 billion dollars, while China falls from 2.19 to 1.31 and the United States from 1.24 to 0.72. Chinese goods entering through Hungary or the Netherlands appear as coming from China by origin and as coming from there by consignment. Every series carries its own concept; the two are not spliced.

Exports do not have this ambiguity — the partner country is the destination.

⚠️ The product breakdown exists only for European Union countries — 27 countries × 22 sections. For the rest of the world only the country total is published.

✅ The sum of the countries gives the total row in 34 of 35 years for exports (maximum deviation 0.018%), 20/20 for imports by consignment and 16/16 for imports by origin.

GET
https://oneapi.ro/api/financiar/v1/comert-exterior/tari

Query parameters

NameTypeDescriptionAccepted values
nivel_ncoptional string | null Optional: total (default) or sectiune. totalsectiune
grup_tarioptional string | null Optional: toate (default) or ue. toateue
monedaoptional string | null Optional: eur (default) or usd. usdeur
de_laoptional integer | null Optional, a year, from 1991. 1991 – 2100
pana_laoptional integer | null Optional, a year. 1991 – 2100
fluxlistoptional text Optional: export, import. Both by default. exportimport
taralistoptional text Optional, comma-separated slugs, plus total. e.g. afganistane.g. austria
nclistoptional text Optional, sections in Roman numerals — for European Union countries only. e.g. total

How it behaves

  • Exports FOB and imports CIF across 249 partner countries, annually from 1991 to 2025, in dollars and euro. 84,142 values from TEMPO matrices EXP101B, EXP102G, EXP102E (country totals) and EXP101D, EXP102C (EU countries × nomenclature sections).
  • ⚠️ For imports, “partner country” means TWO different things, and the source splits them in 2006. Until then it publishes the country of origin — where the goods were made; from 2006, the country of dispatch for intra-EU flows. On the import total the two coincide (in 2006: 51,106,041 against 51,106,042 thousand dollars, a difference of one thousand) — it is the same merchandise, only attributed differently. Across countries, however, it moves billions: in 2006, the only year published on both, Hungary goes from 1.67 to 3.45 billion dollars, while China falls from 2.19 to 1.31 and the United States from 1.24 to 0.72. Chinese goods entering through Hungary or the Netherlands appear as coming from China under origin and from there under dispatch.
  • Each series carries its concept, and the two do not join. The response also returns the largest differences in the overlapping year, in identitati.concept, so the shift can be seen rather than merely described. Exports have no such ambiguity — the partner country is the destination.
  • ⚠️ The product breakdown exists only for European Union countries — 27 countries × 22 nomenclature sections. For the rest of the world only the country total is published. grup_tari separates the two sets: toate and ue.
  • ⚠️ Imports by section change concept too, but one year later: EU countries × sections are on origin up to and including 2006 and on dispatch from 2007 (Hungary, euro: 1,331,563 in 2006 = origin, 3,566,110 in 2007 = dispatch). concept states it for every year, so a country's section series breaks in two, just like the total.
  • ✅ The countries sum to the total row in 34 of 35 years for exports (maximum deviation 0.018%), 20 of 20 for imports on dispatch and 16 of 16 on origin, at a relative threshold of 0.01%.
  • The largest export partners in 2024, in euro: Germany 19.04 billion, Italy 8.85, France 5.87, Hungary 4.92, Bulgaria 4.11.
  • The country code is a slug of the source name (germania, africa_de_sud). Czechia appears at the source under two names depending on the group; the slug served is republica_ceha, and cehia stays accepted as a synonym so requests written before the unification keep working. There is no ISO nomenclature in the platform to join against, so the original name stays in denumire. The one exception: the source writes “Cehia” for the Union countries and “Republica Ceha” for the country totals — both carry the slug republica_ceha.

What it is for

  • The destination structure of Romanian exports, across thirty-five years.
  • Dependence on a particular partner, with the full series behind it.
  • What we buy from each EU country, by section of goods.
  • The effect of the 2006 concept change, measured country by country.

Response structure

FieldTypeDescription
data.de_la integer Start of the interval the response covers.
data.pana_la integer End of the interval the response covers, inclusive.
data.unitate string The unit of the values. Read it before plotting or adding them up.
data.filtre.flux array Direction of the flow (usually import or export).
data.filtre.nivel_nc string
data.filtre.grup_tari string
data.filtre.moneda string Currency the values are expressed in.
data.ani array Years for which values exist.
data.serii[].flux string Direction of the flow (usually import or export).
data.serii[].concept string partener for exports, origine or expediere for imports — it says what the country means on that row.
data.serii[].tara string The country the value refers to.
data.serii[].denumire string The name, exactly as the source publishes it.
data.serii[].grup_tari string toate (country total) or ue (with the section breakdown).
data.serii[].nc string Code from the Combined Nomenclature of goods.
data.serii[].nivel_nc string
data.serii[].moneda string Currency the values are expressed in.
data.serii[].unitate string Unit of measure of the values. Read it before plotting or summing them.
data.serii[].ani_publicati integer Years the source actually published for this series.
data.serii[].valori object The values of the series, by period.
data.identitati.tari.identitate string The identity being checked — which sum must equal which total.
data.identitati.tari.toleranta string How much deviation is accepted before the identity counts as unclosed — the source rounding, not an error.
data.identitati.tari.nota string A note on how to read the data — a pitfall, a convention or a limit of the source.
data.identitati.tari.pe_serie[].flux string Direction of the flow (usually import or export).
data.identitati.tari.pe_serie[].concept string
data.identitati.tari.pe_serie[].verificari integer How many combinations were checked.
data.identitati.tari.pe_serie[].inchise integer How many checks closed within tolerance.
data.identitati.tari.pe_serie[].abatere_maxima_procente string
meta.sursa string The official source the data comes from, with its licence where one is required.
meta.acoperire.de_la integer The first period we have data for.
meta.acoperire.pana_la integer The last period we have data for.
meta.serii_returnate integer How many series were actually returned, after filters and the cell ceiling.
meta.unitate string Unit of measure of the values. Read it before plotting or summing them.
meta.nota_implicit string Which value was used when the parameter was not sent.
meta.nota_concept string A note on how to read the response: a caveat, a convention or a limit of the source.
meta.nota_produse string A note on how to read the response: a caveat, a convention or a limit of the source.
meta.nota_identitate string How the identity above is checked and what it means when it does not close.
meta.nota_lista string What the list contains and what it does not — its limits.
data.identitati.concept The two import concepts side by side for 2006, with the largest per-country differences.
meta.fara_date data is null and this says why. The projection over the INS data is empty. The lists are at /financiar/v1/comert-exterior/tari/nomenclator. The combination has no series; note that the section breakdown exists only for EU countries. As for the other series.
meta.fara_date_cod The short, STABLE word for the reason, for clients that branch on it in code: fara_date is prose and may be rephrased, this is not.

Response examples

GEThttps://oneapi.ro/api/financiar/v1/comert-exterior/tari?flux=export&de_la=2020&pana_la=2024
{
    "data": {
        "de_la": 2020,
        "pana_la": 2024,
        "unitate": "mii EUR",
        "filtre": {
            "flux": [
                "export"
            ],
            "nivel_nc": "total",
            "grup_tari": "toate",
            "moneda": "eur"
        },
        "ani": [
            2020,
            2021,
            2022,
            2023,
            2024
        ],
        "serii": [
            {
                "flux": "export",
                "concept": "partener",
                "tara": "afganistan",
                "denumire": "Afganistan",
                "grup_tari": "toate",
                "nc": "total",
                "nivel_nc": "total",
                "moneda": "eur",
                "unitate": "mii EUR",
                "ani_publicati": 5,
                "valori": {
                    "2020": "5017",
                    "2021": "6964",
                    "2022": "500",
                    "2023": "528",
                    "2024": "2550"
                }
            }
        ],
        "identitati": {
            "tari": {
                "identitate": "suma ţărilor partenere = rândul `total`",
                "toleranta": "relativă, 0.0001 din total",
                "nota": "Cerută din bază — un răspuns pe o singură ţară n-ar avea cum s-o închidă. Măsurat pe toată seria: 34 din 35 de ani la export (abatere maximă 0,018%), 20/20 la importul pe expediere şi 16/16 la cel pe origine.",
                "pe_serie": [
                    {
                        "flux": "export",
                        "concept": "partener",
                        "verificari": 5,
                        "inchise": 5,
                        "abatere_maxima_procente": "0.000"
                    }
                ]
            }
        }
    },
    "meta": {
        "sursa": "Institutul Naţional de Statistică — comerţul internaţional pe ţări partenere (TEMPO, matricile EXP101B, EXP102G, EXP102E, EXP101D şi EXP102C).",
        "acoperire": {
            "de_la": 1991,
            "pana_la": 2025
        },
        "serii_returnate": 220,
        "unitate": "mii EUR",
        "nota_implicit": "Fără `nivel_nc` şi `grup_tari`, răspunsul ar amesteca totalul pe ţară cu defalcarea pe secţiuni. Implicit: toate ţările, pe total.",
        "nota_concept": "La import, `concept` spune dacă ţara e cea de origine (până în 2006) ori cea de expediere (după).",
        "nota_produse": "Defalcarea pe secţiuni de nomenclator există numai pentru cele 27 de ţări ale Uniunii Europene.",
        "nota_identitate": "Cerută din bază — un răspuns pe o singură ţară n-ar avea cum s-o închidă. Măsurat pe toată seria: 34 din 35 de ani la export (abatere maximă 0,018%), 20/20 la importul pe expediere şi 16/16 la cel pe origine.",
        "nota_lista": "Lista ţărilor, cu grupul şi anii fiecăreia: /financiar/v1/comert-exterior/tari/nomenclator."
    }
}

Error codes

CodeSlugWhen it occurs
401neautentificatMissing or invalid token.
403feature_indisponibilfinanciar.indici is not in the current plan.
422raspuns_prea_mareOver 20,000 cells; the 249 countries across the whole series exceed the cap. Plus flux, country, section, group or currency outside the list.
429cota_depasitaThe plan's monthly quota has been exceeded (see Retry-After).

All errors share the same shape. eroare.cod is stable and is the value you should branch on in code — not the text in mesaj, which may change.

{
    "eroare": {
        "cod": "raspuns_prea_mare",
        "mesaj": "Over 20,000 cells; the 249 countries across the whole series exceed the cap. Plus flux, country, section, group or currency outside the list.",
        "detalii": {
            "nivel_nc": [
                "The value sent does not satisfy the parameter rule."
            ]
        }
    }
}