Skip to Content
Quickstart

Quickstart

This page makes two calls: it lists the companies your key can access, then reads one company’s emissions. You need an API key with the company:read and emissions:read scopes (see Get access).

The samples use curl, Python with requests (pip install requests), and Node.js 18 or later, whose built-in fetch needs no packages. The Node.js samples are ES modules: save them as .mjs.

Set your key

Keep the key out of your code: put it in an environment variable, which every sample below reads.

export ENERGI_API_KEY="<your API key>"

List your companies

GET /v3/company returns every company the key can access. The id of each is what you put in /v3/company/{companyId}/… for every other operation.

curl --max-time 60 "https://api.energi.ai/v3/company" \ -H "Authorization: Bearer $ENERGI_API_KEY"
curl --max-time 60 "https://api.us.energi.ai/v3/company" \ -H "Authorization: Bearer $ENERGI_API_KEY"

The response:

{ "data": [ { "id": "1042", "name": "Energi.AI AS", "orgNumber": "927611074" } ], "meta": { "nextCursor": null } }

Every response is an object with data and, where there is something to say about it, meta. Here meta.nextCursor is null, which means you have the whole list (see Lists). Ids are strings: use them as they are.

Read a company’s emissions

GET /v3/company/{companyId}/emissions/summary returns a company’s emissions over a range of months. All four query parameters are required: the range (from, to), the size of each period (granularity) and the unit (emissionsUnit).

curl --max-time 60 -G "https://api.energi.ai/v3/company/1042/emissions/summary" \ -H "Authorization: Bearer $ENERGI_API_KEY" \ -d from=2025-01 -d to=2025-12 -d granularity=QUARTER -d emissionsUnit=t
curl --max-time 60 -G "https://api.us.energi.ai/v3/company/1042/emissions/summary" \ -H "Authorization: Bearer $ENERGI_API_KEY" \ -d from=2025-01 -d to=2025-12 -d granularity=QUARTER -d emissionsUnit=t

The response, shortened to one period, one scope and one category:

{ "data": { "companyId": "1042", "emissionsUnit": "tCO2e", "granularity": "QUARTER", "from": "2025-01", "to": "2025-12", "emissions": 4821.55, "periods": [ { "period": "2025-Q1", "periodStart": "2025-01-01", "periodEnd": "2025-03-31", "emissions": 1284.51, "scopes": [ { "scope": "SCOPE_1", "emissions": 210.4, "categories": [ { "code": "STATIONARY_COMBUSTION", "label": "Stationary combustion", "emissions": 180.2 } ] } ] } ] }, "meta": { "status": "UP_TO_DATE", "asOf": "2026-09-16T09:12:04.000Z" } }

data says how to read its own numbers: the unit, the range and the period size are in it, next to the figures. meta says how current they are. Read emissions explains every field.

Next steps

Last updated on