oneapi
Sign in
Energie v1 / Balanţe energetice

Primary energy resources

What the country's primary energy resources are made of — 2,739 values, annually 1992–2024, across 14 resource categories and four origins: domestic production, imports, the stock at the start of the year, and their total (IND107A).

⚠️ Every resource has its own physical unit, plus thousand toe. Coal is in thousand tonnes, gas in million m³, electricity in million kWh — but all 14 categories are also published in thousand tonnes of oil equivalent, the only unit in which they can be compared with one another. um is part of the series' identity.

⚠️ total should be production + imports + opening stock, and almost always is. Checked across all 823 resource × unit × year triples: 808 close within 0.5%. Of the remaining 15, 14 have the total ABOVE the published components — a component is not published, which is not a contradiction — and one has it below. So total is read from the source, never recomposed.

GET
https://oneapi.ro/api/energie/v1/balante/resurse

Query parameters

NameTypeDescriptionAccepted values
provenientaoptional string | null total, productie, import or stoc_initial. totalproductieimportstoc_initial
resursaoptional string | null The slug of a primary resource from the nomenclature. Without it, all are returned. e.g. gaze_naturale
umoptional string | null The unit. mii_tone_echivalent_petrol is the only one common to all resources. e.g. mii_tone_echivalent_petrol
de_laoptional string | null First year included, from 1992. e.g. 2010
pana_laoptional string | null Last year included. e.g. 2024

How it behaves

  • What the country primary energy resources are made of — 2,739 values, annual 1992-2024, across 14 resource categories and four origins: domestic production, imports, the stock at the start of the year and their total (TEMPO matrix IND107A).
  • Each resource has its own physical unit, plus ktoe. Coal is in thousand tonnes, gas in million m³, electricity in million kWh — but all 14 categories are also published in thousand tonnes of oil equivalent, the only unit in which they can be compared. um is part of the series identity, not a label.
  • total is read from the source, not recomposed. It should be production + imports + opening stock, and almost always is: checked across all 823 resource × unit × year triples, 808 close within 0.5%. Of the 15 remaining, 14 have the total above the published components — a component simply is not published, it is not a contradiction — and one has it below.

What it is for

  • See how much of the country primary energy comes from domestic production and how much from imports.
  • Track how the primary resource mix shifted over thirty years.
  • Compare resources against each other — but only in ktoe, the one common unit.

Response structure

FieldTypeDescription
data.serii[].resursa string Slugul resursei.
data.serii[].provenienta string Producţie, import, stoc iniţial ori totalul lor.
data.serii[].um string Unitatea — parte din identitatea seriei.
data.serii[].ani_publicati integer Câţi ani au valoare din intervalul cerut; restul sunt null, nu zero.
data.serii[].valori object An → valoare, ca text zecimal.
data.ani array Anii acoperiţi de răspuns.
data.granularitate string The series step. For balances it is always anual: INS publishes the balance once a year.
data.de_la integer First year in the response.
data.pana_la integer Last year in the response.
data.filtre object The filters actually applied, so you can see what was read from the request.
data.serii[].um_denumire string The unit of measure spelled out. Read it: series in the same response can use different units, and adding them would mean nothing.
meta.sursa string The INS dataset the series comes from, with the source matrix.
meta.acoperire object The year range available in the database for this zone, regardless of the filter requested.
meta.serii_returnate integer How many series are in the response.
data.nota_unitati string The mixed-units warning, repeated next to the data.
data.serii[].resursa_denumire string The resource name.
meta.nota_unitati string Why series with different units cannot be added.
meta.nota_total string Which rows are totals and why they must not be summed with the rest.
meta.nota_sen string The relationship with the real-time data in the sen zone: different concept, different source, not directly comparable.
meta.nota_lista string How to get the full list of codes: from /energie/v1/balante/nomenclator.

Response examples

GEThttps://oneapi.ro/api/energie/v1/balante/resurse?resursa=gaze_naturale&um=mii_tone_echivalent_petrol
{
    "data": {
        "nota_unitati": "Fiecare resursă e publicată în unitatea ei fizică ŞI în mii tep. Doar `mii_tone_echivalent_petrol` acoperă toate categoriile şi permite comparaţia între ele.",
        "granularitate": "anual",
        "de_la": 1992,
        "pana_la": 2024,
        "filtre": {
            "resursa": "gaze_naturale",
            "um": "mii_tone_echivalent_petrol"
        },
        "ani": [
            1992,
            1993,
            1994,
            1995,
            1996,
            1997,
            1998,
            1999,
            2000,
            2001,
            2002,
            2003,
            2004,
            2005,
            2006,
            2007,
            2008,
            2009,
            2010,
            2011,
            2012,
            2013,
            2014,
            2015,
            2016,
            2017,
            2018,
            2019,
            2020,
            2021,
            2022,
            2023,
            2024
        ],
        "serii": [
            {
                "resursa": "gaze_naturale",
                "resursa_denumire": "Gaze naturale",
                "provenienta": "import",
                "um": "mii_tone_echivalent_petrol",
                "um_denumire": "Mii tone echivalent petrol",
                "ani_publicati": 33,
                "valori": {
                    "1992": "3582",
                    "1993": "3616",
                    "1994": "3735",
                    "1995": "4794",
                    "1996": "5654",
                    "1997": "4030",
                    "1998": "3773",
                    "1999": "2538",
                    "2000": "2712",
                    "2001": "2332",
                    "2002": "3043",
                    "2003": "4723",
                    "2004": "4127",
                    "2005": "4233",
                    "2006": "4839",
                    "2007": "3904",
                    "2008": "3567",
                    "2009": "1614",
                    "2010": "1834",
                    "2011": "2489",
                    "2012": "2321",
                    "2013": "1177",
                    "2014": "470",
                    "2015": "163",
                    "2016": "1188",
                    "2017": "962",
                    "2018": "1220",
                    "2019": "2158",
                    "2020": "1726",
                    "2021": "2869",
                    "2022": "2294",
                    "2023": "2151",
                    "2024": "1852"
                }
            }
        ]
    },
    "meta": {
        "sursa": "Institutul Naţional de Statistică — balanţele energetice (TEMPO, matricile IND107A-IND121A).",
        "acoperire": {
            "de_la": "1992-01-01",
            "pana_la": "2024-01-01"
        },
        "serii_returnate": 4,
        "nota_unitati": "⚠️ Fiecare resursă e publicată în unitatea ei fizică ŞI în mii tep. Doar `mii_tone_echivalent_petrol` acoperă toate categoriile şi permite comparaţia între ele.",
        "nota_total": "⚠️ `total` se citeşte de la sursă, nu se recompune din componente: în 15 din 823 de perechi suma componentelor publicate nu-l reface, aproape mereu fiindcă o componentă lipseşte.",
        "nota_sen": "Sunt date statistice anuale. Starea instantanee a sistemului, de la Transelectrica, e la /energie/v1/sen — altă natură, nu se compară.",
        "nota_lista": "Nomenclatoarele zonei: /energie/v1/balante/nomenclator."
    }
}

Error codes

CodeSlugWhen it occurs
401neautentificatToken missing, invalid, expired or revoked.
403feature_indisponibilThe current plan does not include the feature the route depends on.
404necunoscutThe resource does not appear in the nomenclature.
404in_afara_acopeririiThe requested range falls entirely outside the published years.
422raspuns_prea_mareOver 20,000 cells — narrow the period or the series.
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 — narrow the period or the series.",
        "detalii": {
            "provenienta": [
                "The value sent does not satisfy the parameter rule."
            ]
        }
    }
}