# Carbon Footprint Calculator API: Emission Factors and CO2e (`nabeelbaghoor/carbon-footprint-emission-factor-api`) Actor

Search emission factors by activity, region, year and source, then calculate kg CO2e for electricity, fuel, travel, materials and spend, Scope 3.1 procurement and intermodal freight through the Climatiq API. Every row cites its emission factor source. Bring your own key.

- **URL**: https://apify.com/nabeelbaghoor/carbon-footprint-emission-factor-api.md
- **Developed by:** [Nabeel Hassan](https://apify.com/nabeelbaghoor) (community)
- **Categories:** Developer tools, Business, Integrations
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 emission factors

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Carbon Footprint Calculator API: Emission Factors and CO2e

Search thousands of scientifically vetted emission factors and calculate carbon emissions in kg CO2e for energy, fuel, travel, materials, spend and freight through the Climatiq API with your own API key, as clean rows you can export to CSV, Excel or JSON.

Climatiq is a carbon calculation API with an emission factor database built from more than 140 datasets, including EPA, BEIS (DESNZ), EXIOBASE, IEA, ecoinvent, GLEC and many national inventories. This actor wraps its emission factor search, its basic estimate, procurement and intermodal freight calculation endpoints, and its unit type and data version lookups. Use it for corporate carbon footprints (Scope 1, 2 and 3), Scope 3.1 purchased goods and services, logistics emissions under the GLEC Framework and ISO 14083, ESG reporting pipelines and product carbon accounting. Bring your own API key.

BYOK, not live tested: every route, parameter and response field comes from Climatiq's own API reference at climatiq.io/docs/api-reference, and every route was probed on 2026-10-27 with an invalid key. The actor has not been run against a live Climatiq key.

### What it does

- **Emission factor search**: GET /data/v1/search with free text and filters for activity ID, factor ID, region (with wildcards), year, source, source dataset, category, sector, GHG Protocol scope, unit type, LCA activity, IPCC calculation method (AR4, AR5, AR6), access type and data quality flags. One row per factor with name, activity ID, factor value and unit, region, year, source, dataset, source link, scopes, constituent gases (CO2, CH4, N2O), uncertainty and data version status, paged automatically up to 500 per call.
- **Activity emissions estimate**: POST /data/v1/estimate/batch, 100 activities per call. Give an emission factor selector (activity ID with region, year, source and fallbacks, or a unique factor ID) and parameters for its unit type: energy (kWh, MWh, GJ, therm), weight, volume, distance, passengers over distance, weight over distance, money spent and more. Returns kg CO2e, the factor used, constituent gases and activity data. Spend based estimates can be inflation adjusted.
- **Spend based procurement estimate**: POST /procurement/v1/spend/batch for Scope 3.1 purchased goods and services from NACE, ISIC, NAICS, MCC or UNSPSC codes, with EXIOBASE tax, trade and transport margins, exchange rates and inflation applied.
- **Intermodal freight emissions**: POST /freight/v3.1/intermodal for shipments by road, rail, sea, air and inland waterway with automatic routing, giving total, hub, vehicle operation and energy provision CO2e, distance, cargo tonnes and each route leg.
- **Unit types and latest data version**: GET /data/v1/unit-types and GET /data/v1/data-versions.
- **Citations built in**: every factor and estimate row carries a `citation` line (source, dataset, year, region), and estimates keep the full source trail.
- **Pay only for results**: refused items and empty searches are recorded as a free row that says why, never charged.

When the data version input is empty, the actor asks Climatiq for the latest release and uses its caret form (such as ^38), which the search and activity ID selectors require.

### How to use it

1. Get a Climatiq API key: sign up at climatiq.io, open API Toolkit, API Keys and create one. The free community plan allows a limited number of non-commercial calls; paid plans unlock commercial use and more features.
2. Paste it into the API key field, or set the DATA_API_KEY environment secret.
3. Pick a mode. Search first to find the activity ID and unit type you need, then estimate with it.
4. Download the dataset as JSON, CSV or Excel, or connect it to your workflow through the Apify API, webhooks or integrations.

### Input

| Field | Modes | Notes |
| --- | --- | --- |
| `mode` | all | `searchFactors`, `estimate`, `procurement`, `freight`, `unitTypes`, `dataVersions` |
| `query`, `activityId`, `factorId`, `region`, `year`, `source`, `sourceDataset`, `category`, `sector`, `scope`, `unitType`, `sourceLcaActivity`, `calculationMethod`, `accessType`, `allowedDataQualityFlags` | search | Climatiq's documented search filters |
| `estimates` | estimate | JSON array of estimate request bodies |
| `spendItems` | procurement | JSON array of procurement request bodies |
| `shipments` | freight | JSON array of freight request bodies |
| `dataVersion` | search, estimate | such as ^38; empty means the latest release |
| `maxResults` | all | most rows returned and charged, default 100 |
| `requestsPerMinute` | all | pacing, default 120 |
| `apiKey` | all | your Climatiq API key, stored as a secret |

Example activity estimate input:

```json
{
    "mode": "estimate",
    "estimates": [
        {
            "emission_factor": { "activity_id": "electricity-supply_grid-source_residual_mix", "region": "DE", "region_fallback": true },
            "parameters": { "energy": 1000, "energy_unit": "kWh" }
        },
        {
            "emission_factor": { "activity_id": "metals-type_steel_section" },
            "parameters": { "weight": 100, "weight_unit": "kg" }
        }
    ]
}
```

### Output

One row per factor or estimate. Example estimate row (trimmed):

```json
{
    "mode": "estimate",
    "recordType": "estimate",
    "query": "activity 2",
    "found": true,
    "co2e": 292.1894413,
    "co2eUnit": "kg",
    "co2eCalculationMethod": "ar5",
    "activityValue": 100,
    "activityUnit": "kg",
    "emissionFactorId": "88d331fb-1a4a-8342-a585-78e1bde3c57f",
    "activityId": "metals-type_steel_section",
    "name": "Steel section",
    "category": "Metals",
    "source": "OEKOBAUDAT",
    "sourceDataset": "OEKOBAUDAT 2024-I",
    "citation": "Source: OEKOBAUDAT, OEKOBAUDAT 2024-I (2023, DE)",
    "year": 2023,
    "region": "DE",
    "constituentGases": { "co2e_total": 292.1894413, "co2": null, "ch4": null, "n2o": null },
    "request": { "emission_factor": { "activity_id": "metals-type_steel_section", "data_version": "^38" }, "parameters": { "weight": 100, "weight_unit": "kg" } },
    "record": { "...": "the full Climatiq answer" },
    "note": null
}
```

Search rows add `factor`, `unit`, `unitType`, `sector`, `sourceLink`, `scopes`, `uncertainty`, `description`, `dataQualityFlags` and `dataVersionStatus`. Procurement rows add `taxMargin`, `tradeMargin`, `transportMargin`, `inflationApplied` and `sourceTrail`. Freight rows add `hubEquipmentCo2e`, `vehicleOperationCo2e`, `vehicleEnergyProvisionCo2e`, `distanceKm`, `cargoTonnes` and `legs`.

### Citing emission factor sources

Climatiq's terms ask you to cite the sources of the emission factors you use. Every row carries a ready `citation` line built from the factor's source, dataset, year and region, and search rows also carry the publisher's `sourceLink`. Keep that line next to any figure you report. Freight results may contain OpenStreetMap data, which Climatiq asks you to attribute, for example "May contain information from OpenStreetMap".

### Pricing

Pay per event, only for rows that carry a real Climatiq result:

| Event | Price |
| --- | --- |
| Emission factor (search result) | $0.005 |
| CO2e emissions estimate (activity or spend item) | $0.01 |
| Freight shipment emissions | $0.02 |
| Unit type or data version | $0.005 |

Your Climatiq plan and its call quota apply on top. Each batch element counts as one Climatiq API call.

### FAQ

#### What is the Climatiq API?

Climatiq is a Berlin based carbon calculation API. It serves an emission factor database from more than 140 public and premium datasets and calculation endpoints that multiply activity data by the right factor to give kg CO2e, for energy, travel, freight, procurement and product footprints.

#### Do I need my own Climatiq API key?

Yes. This actor is bring your own key: it calls Climatiq with your key and your plan. Without a key the run ends straight away with a message saying how to get one, and nothing is charged.

#### How do I find the right emission factor?

Run the emission factor search with a few words (such as diesel, hotel stay or grid electricity) plus a region and year. Each row gives the activity ID, unit type and source. Use that activity ID and unit type in the activity estimate mode, or use the unique factor ID to pin one exact factor for audit purposes.

#### How do I calculate Scope 2 electricity emissions?

Use the activity estimate mode with an electricity activity ID, such as electricity-supply_grid-source_residual_mix or a location based grid mix, a region code and `{"energy": 1000, "energy_unit": "kWh"}`. Set `region_fallback` to true to fall back to a larger region if the exact one has no factor.

#### How do I calculate Scope 3.1 purchased goods emissions from spend?

Use the spend based procurement mode with an industry classification code (NACE, ISIC, NAICS, MCC or UNSPSC), the spend year, the country of production and the amount and currency. Climatiq applies EXIOBASE basic price margins, exchange rates and inflation.

#### How do I calculate shipping and logistics emissions?

Use the intermodal freight mode with a route of locations and legs (road, rail, sea, air or inland waterway) and the cargo weight. Climatiq follows the GLEC Framework and returns per leg results.

#### Why is the factor value empty in my search results?

Climatiq returns the raw `factor` value only on plans with that add on; otherwise it is null and you calculate with the estimate mode instead. Premium datasets also need a separate license.

#### What do I pay?

The actor's per row price above, plus whatever your Climatiq plan charges. The community plan is free for a limited number of non-commercial calls.

### Keyword map

carbon footprint calculator API, emission factor database, CO2e calculator, carbon emissions API, GHG emissions calculation, Scope 1 2 3 emissions, Scope 3.1 spend based emissions, freight emissions calculator, GLEC ISO 14083, EXIOBASE, EPA emission factors, DEFRA BEIS emission factors, electricity grid emission factors, ESG carbon accounting data.

### Routes and verification

| Mode | Route | Source | Probe with invalid key (twice) |
| --- | --- | --- | --- |
| Emission factor search | GET /data/v1/search | API reference, Search | 401 `Your authentication token was not valid`; /data/v1/searchx 404 |
| Activity emissions estimate | POST /data/v1/estimate/batch | API reference, Basic Estimate and Batch Endpoints | 401; /data/v1/estimate/batchx 404 |
| Spend based procurement | POST /procurement/v1/spend/batch | API reference, Procurement | 401; /procurement/v1/spendx 404 |
| Intermodal freight | POST /freight/v3.1/intermodal | API reference, Freight v3.1 | 401; /freight/v9.9/intermodal 404 |
| Unit types | GET /data/v1/unit-types | API reference, Unit Types | 401; /data/v1/unit-typez 404 |
| Latest data version | GET /data/v1/data-versions | API reference, Data Versions | 401 |

The key goes in an `Authorization: Bearer` header and never in a URL or a log line. Private factor management, the Mapping Agent, PCF, travel and energy endpoints are not wrapped.

### Licensing and data use

This actor works only with your own Climatiq API key, and your agreement with Climatiq applies. Use the output inside your own product or analysis rather than reselling it, keep to the non-commercial limit of the community plan, and cite the emission factor sources you use. Premium datasets carry their own license terms. This actor is not affiliated with or endorsed by Climatiq GmbH.

# Actor input Schema

## `mode` (type: `string`):

Emission factor search finds factors by text and filters (source, region, year, unit type, scope). Activity emissions estimate calculates kg CO2e for activities such as electricity, fuel, distance, weight or money spent. Spend based procurement estimate calculates purchased goods and services emissions from spend with EXIOBASE margins and inflation. Intermodal freight emissions calculates a shipment by road, rail, sea, air or inland waterway. Unit types and latest data version are reference lookups.

## `query` (type: `string`):

Free text matched fuzzily against emission factor IDs, names and descriptions, such as electricity grid, diesel, steel or hotel stay. Results come best match first.

## `activityId` (type: `string`):

Only factors for this activity ID, such as electricity-supply_grid-source_residual_mix. End it with \* as a wildcard, such as electricity-supply_grid\*.

## `factorId` (type: `string`):

One specific emission factor by its unique ID. Returns at most one factor.

## `region` (type: `string`):

Region code the factor applies to, such as US, DE, GB or GLOBAL. End it with \* to include sub regions, such as US\*.

## `year` (type: `integer`):

Only factors considered most relevant for this year, according to the source.

## `source` (type: `string`):

Data source that published the factor, such as EPA, BEIS, EXIOBASE, IEA or GLEC.

## `sourceDataset` (type: `string`):

Dataset within the source, such as 2021 GHG Emission Factors Hub.

## `category` (type: `string`):

Factor category, such as Electricity, Fuel, Vehicles or Metals.

## `sector` (type: `string`):

Factor sector, such as Energy, Transport or Materials and Manufacturing.

## `scope` (type: `string`):

Scope such as 1, 2, 3 (all Scope 3 categories) or 3.1.

## `unitType` (type: `string`):

Unit type the factor accepts, such as Energy, Weight, Distance, Volume or Money. The unit types mode lists them all.

## `sourceLcaActivity` (type: `string`):

Life cycle stage of the factor, such as cradle_to_gate, fuel_combustion or electricity_generation.

## `calculationMethod` (type: `string`):

IPCC assessment report used for CO2e. Empty uses the latest the source supports.

## `accessType` (type: `string`):

Public factors are open to all, premium factors need a separate license, private factors are your own.

## `allowedDataQualityFlags` (type: `array`):

Optional. Data quality flags you accept, one per line, such as partial_factor or notable_methodological_variance. Use none to allow only factors without detected quality issues.

## `estimates` (type: `array`):

Activity emissions estimate mode. A JSON array of estimate requests, each with an emission_factor selector (activity_id plus optional region, year, source, region_fallback, year_fallback; or a unique id) and parameters for the factor's unit type, such as {"energy": 100, "energy_unit": "kWh"}, {"distance": 50, "distance_unit": "km"}, {"weight": 2, "weight_unit": "t"} or {"money": 500, "money_unit": "usd"}. Optional apply_inflation_adjustment takes the spend year. Sent 100 per batch call.

## `spendItems` (type: `array`):

Spend based procurement mode. A JSON array of purchases, each with an activity (classification_code and classification_type of nace2, isic4, naics2017, mcc or unspsc; or an EXIOBASE activity_id), spend_year, spend_region (country code), money and money_unit, plus optional tax_margin, trade_margin and transport_margin. Sent 100 per batch call.

## `shipments` (type: `array`):

Intermodal freight mode. A JSON array of shipments, each with a route (locations and legs in turn, a leg naming transport_mode road, rail, sea, air or inland_waterways with optional leg_details) and cargo (weight and weight_unit). One API call per shipment.

## `dataVersion` (type: `string`):

Search and activity estimate modes. Climatiq data release, such as ^38 for the latest compatible version or 38 for a fixed one. Empty asks the API for the latest release. A selector's own data_version wins.

## `maxResults` (type: `integer`):

The most rows this run returns and charges for: factors in the search, or estimates in the calculation modes.

## `requestsPerMinute` (type: `integer`):

Pacing for calls to Climatiq. Throttled calls are retried after a pause. Each batch element counts as one call against your Climatiq quota.

## `apiKey` (type: `string`):

Your Climatiq API key, from API Toolkit, API Keys in your Climatiq account. Stored as a secret, sent only to api.climatiq.io and never logged. You can instead set the DATA_API_KEY environment secret.

## Actor input object example

```json
{
  "mode": "searchFactors",
  "query": "electricity grid",
  "estimates": [
    {
      "emission_factor": {
        "activity_id": "electricity-supply_grid-source_residual_mix",
        "region": "DE",
        "region_fallback": true
      },
      "parameters": {
        "energy": 1000,
        "energy_unit": "kWh"
      }
    }
  ],
  "spendItems": [
    {
      "activity": {
        "classification_code": "25",
        "classification_type": "isic4"
      },
      "spend_year": 2022,
      "spend_region": "DE",
      "money": 100,
      "money_unit": "eur"
    }
  ],
  "shipments": [
    {
      "route": [
        {
          "location": "Hamburg"
        },
        {
          "transport_mode": "road"
        },
        {
          "location": "Berlin"
        }
      ],
      "cargo": {
        "weight": 10,
        "weight_unit": "t"
      }
    }
  ],
  "maxResults": 100,
  "requestsPerMinute": 120
}
```

# Actor output Schema

## `records` (type: `string`):

One row per factor, estimate, shipment or reference record the chosen mode read.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "query": "electricity grid",
    "estimates": [
        {
            "emission_factor": {
                "activity_id": "electricity-supply_grid-source_residual_mix",
                "region": "DE",
                "region_fallback": true
            },
            "parameters": {
                "energy": 1000,
                "energy_unit": "kWh"
            }
        }
    ],
    "spendItems": [
        {
            "activity": {
                "classification_code": "25",
                "classification_type": "isic4"
            },
            "spend_year": 2022,
            "spend_region": "DE",
            "money": 100,
            "money_unit": "eur"
        }
    ],
    "shipments": [
        {
            "route": [
                {
                    "location": "Hamburg"
                },
                {
                    "transport_mode": "road"
                },
                {
                    "location": "Berlin"
                }
            ],
            "cargo": {
                "weight": 10,
                "weight_unit": "t"
            }
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("nabeelbaghoor/carbon-footprint-emission-factor-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "query": "electricity grid",
    "estimates": [{
            "emission_factor": {
                "activity_id": "electricity-supply_grid-source_residual_mix",
                "region": "DE",
                "region_fallback": True,
            },
            "parameters": {
                "energy": 1000,
                "energy_unit": "kWh",
            },
        }],
    "spendItems": [{
            "activity": {
                "classification_code": "25",
                "classification_type": "isic4",
            },
            "spend_year": 2022,
            "spend_region": "DE",
            "money": 100,
            "money_unit": "eur",
        }],
    "shipments": [{
            "route": [
                { "location": "Hamburg" },
                { "transport_mode": "road" },
                { "location": "Berlin" },
            ],
            "cargo": {
                "weight": 10,
                "weight_unit": "t",
            },
        }],
}

# Run the Actor and wait for it to finish
run = client.actor("nabeelbaghoor/carbon-footprint-emission-factor-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "electricity grid",
  "estimates": [
    {
      "emission_factor": {
        "activity_id": "electricity-supply_grid-source_residual_mix",
        "region": "DE",
        "region_fallback": true
      },
      "parameters": {
        "energy": 1000,
        "energy_unit": "kWh"
      }
    }
  ],
  "spendItems": [
    {
      "activity": {
        "classification_code": "25",
        "classification_type": "isic4"
      },
      "spend_year": 2022,
      "spend_region": "DE",
      "money": 100,
      "money_unit": "eur"
    }
  ],
  "shipments": [
    {
      "route": [
        {
          "location": "Hamburg"
        },
        {
          "transport_mode": "road"
        },
        {
          "location": "Berlin"
        }
      ],
      "cargo": {
        "weight": 10,
        "weight_unit": "t"
      }
    }
  ]
}' |
apify call nabeelbaghoor/carbon-footprint-emission-factor-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nabeelbaghoor/carbon-footprint-emission-factor-api"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/w17fP39IuD79BsdfL/builds/lK9uED1MvwCj6wEp3/openapi.json
