un_energy_statistics

Pack: un-energy · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)

No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/un_energy_statistics for the schema, then POST the same URL with its arguments for the data.

Energy Statistics Database of the UN Statistics Division: one named fuel or product (aviation gasoline, hard coal, lignite, kerosene-type jet fuel, natural gas, fuelwood, hydro electricity, …) against one flow (production, imports, exports, total energy supply, final energy consumption, consumption by industry, …) by country and year, in the unit the country reported (tonnes, cubic metres, GWh or TJ) with the conversion factor UNSD uses and the value converted to TJ. Use for “final energy consumption of aviation gasoline in Brazil in 2022 (thousand metric tons)”. Example: un_energy_statistics({ country: “Brazil”, commodity: “aviation gasoline”, flow: “final energy consumption”, year: 2022 }).

Parameters

NameTypeRequiredDescription
countrystringyesCountry name or UN M49 numeric code, e.g. “Brazil” or “076”.
commoditystringnoProduct name or code, e.g. “aviation gasoline” (4651), “hard coal”, “natural gas”. Omit for every product.
flowstringnoFlow name or code, e.g. “final energy consumption”, “production”, “imports”, “total energy supply”. Omit for every flow (large; use with commodity and a single year).
yearnumbernoA single year, e.g. 2022.
start_yearnumbernoFirst year of a range (ignored if year is set).
end_yearnumbernoLast year of a range (ignored if year is set).

Example call

Arguments

{
  "country": "Brazil",
  "commodity": "aviation gasoline",
  "flow": "final energy consumption",
  "year": 2022
}

curl

curl -X POST https://gateway.pipeworx.io/un-energy/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"un_energy_statistics","arguments":{"country":"Brazil","commodity":"aviation gasoline","flow":"final energy consumption","year":2022}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('un_energy_statistics', {
  "country": "Brazil",
  "commodity": "aviation gasoline",
  "flow": "final energy consumption",
  "year": 2022
});

Response shape

FieldTypeDescription
countrystring
country_codestring
countnumber
rowsarray
truncatedboolean
notesstring
sourcestring
retrieved_atstring
Full JSON Schema
{
  "type": "object",
  "properties": {
    "country": {
      "type": "string"
    },
    "country_code": {
      "type": "string"
    },
    "count": {
      "type": "number"
    },
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "year": {
            "type": "number"
          },
          "commodity": {
            "type": "string"
          },
          "commodity_code": {
            "type": "string"
          },
          "flow": {
            "type": "string"
          },
          "flow_code": {
            "type": "string"
          },
          "value_published": {
            "type": "number"
          },
          "unit": {
            "type": "string"
          },
          "unit_multiplier": {
            "type": "number"
          },
          "value": {
            "type": "number"
          },
          "conversion_factor_tj_per_thousand_units": {
            "type": "number"
          },
          "value_tj": {
            "type": "number"
          },
          "status": {
            "type": "string"
          }
        },
        "additionalProperties": true
      }
    },
    "truncated": {
      "type": "boolean"
    },
    "notes": {
      "type": "string"
    },
    "source": {
      "type": "string"
    },
    "retrieved_at": {
      "type": "string"
    }
  },
  "additionalProperties": true
}

Connect

Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://pipeworx.io/mcp"
    }
  }
}
Connect to just the un-energy pack
{
  "mcpServers": {
    "un-energy": {
      "url": "https://gateway.pipeworx.io/un-energy/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build November 21, 2026