# Electricity Maps

```json
{
  "name": "Electricity Maps",
  "slug": "electricity_maps",
  "url": "https://composio.dev/toolkits/electricity_maps",
  "markdown_url": "https://composio.dev/toolkits/electricity_maps.md",
  "logo_url": "https://logos.composio.dev/api/electricity_maps",
  "categories": [
    "data & analytics"
  ],
  "is_composio_managed": false,
  "updated_at": "2026-11-17T05:36:03.996Z"
}
```

![Electricity Maps logo](https://logos.composio.dev/api/electricity_maps)

## Description

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Electricity Maps MCP or direct API to check carbon intensity, compare electricity mixes, track renewable energy, and view day-ahead prices through natural language.

## Summary

Electricity Maps is a data service for grid carbon intensity, power mix, and energy market data.
It helps teams track emissions, renewable energy, power flows, and prices by zone.

## Categories

- data & analytics

## Toolkit Details

- Tools: 49

## Images

- Logo: https://logos.composio.dev/api/electricity_maps

## Authentication

- **Api Key**
  - Type: `api_key`
  - Description: Api Key authentication for Electricity Maps.
  - Setup:
    - Configure Api Key credentials for Electricity Maps.
    - Use the credentials when creating an auth config in Composio.

## Suggested Prompts

- Check current carbon intensity in California
- Compare renewable energy across European zones
- Forecast tomorrow's grid emissions in Texas

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `ELECTRICITY_MAPS_GET_CARBON_INTENSITY_FORECAST` | Get Carbon Intensity Forecast | Get a grid-average or fossil-only carbon intensity forecast for a zone. |
| `ELECTRICITY_MAPS_GET_CARBON_INTENSITY_HISTORY` | Get Carbon Intensity History | Get the last 24 hours of grid-average or fossil-only carbon intensity for a zone. |
| `ELECTRICITY_MAPS_GET_CARBON_INTENSITY_LATEST` | Get Carbon Intensity Latest | Get the latest grid-average or fossil-only carbon intensity for a zone. |
| `ELECTRICITY_MAPS_GET_CARBON_INTENSITY_PAST` | Get Carbon Intensity Past | Get grid-average or fossil-only carbon intensity for a zone at a given datetime. |
| `ELECTRICITY_MAPS_GET_CARBON_INTENSITY_PAST_RANGE` | Get Carbon Intensity Past Range | Get grid-average or fossil-only carbon intensity for a zone over a datetime range. Maximum range: 3 days for 5_minutes, 4 days for 15_minutes, 10 days for hourly, 365 days for daily, and 30 years for monthly, quarterly, or yearly. |
| `ELECTRICITY_MAPS_GET_ELECTRICITY_FLOWS_FORECAST` | Get Electricity Flows Forecast | Get the electricity flows forecast for a zone. |
| `ELECTRICITY_MAPS_GET_ELECTRICITY_FLOWS_HISTORY` | Get Electricity Flows History | Get the last 24 hours of electricity flows for a zone. |
| `ELECTRICITY_MAPS_GET_ELECTRICITY_FLOWS_LATEST` | Get Electricity Flows Latest | Get the latest electricity flows for a zone. |
| `ELECTRICITY_MAPS_GET_ELECTRICITY_FLOWS_PAST` | Get Electricity Flows Past | Get the electricity flows for a zone at a given datetime. |
| `ELECTRICITY_MAPS_GET_ELECTRICITY_FLOWS_PAST_RANGE` | Get Electricity Flows Past Range | Get the electricity flows for a zone and a given datetime range. Maximum range: 3 days for 5_minutes, 4 days for 15_minutes, 10 days for hourly, 365 days for daily, and 30 years for monthly, quarterly, or yearly. |
| `ELECTRICITY_MAPS_GET_ELECTRICITY_MIX_FORECAST` | Get Electricity Mix Forecast | Get the electricity mix forecast for a zone. |
| `ELECTRICITY_MAPS_GET_ELECTRICITY_MIX_HISTORY` | Get Electricity Mix History | Get the last 24 hours of electricity mix for a zone. |
| `ELECTRICITY_MAPS_GET_ELECTRICITY_MIX_LATEST` | Get Electricity Mix Latest | Get the latest electricity mix for a zone. |
| `ELECTRICITY_MAPS_GET_ELECTRICITY_MIX_PAST` | Get Electricity Mix Past | Get the electricity mix for a zone at a given datetime. |
| `ELECTRICITY_MAPS_GET_ELECTRICITY_MIX_PAST_RANGE` | Get Electricity Mix Past Range | Get the electricity mix for a zone and a given datetime range. Maximum range: 3 days for 5_minutes, 4 days for 15_minutes, 10 days for hourly, 365 days for daily, and 30 years for monthly, quarterly, or yearly. |
| `ELECTRICITY_MAPS_GET_ELECTRICITY_SOURCE_FORECAST` | Get Electricity Source Forecast | Get forecasted electricity generation values for the selected source_type in a zone. |
| `ELECTRICITY_MAPS_GET_ELECTRICITY_SOURCE_HISTORY` | Get Electricity Source History | Get the last 24 hours of electricity generation values for the selected source_type in a zone. |
| `ELECTRICITY_MAPS_GET_ELECTRICITY_SOURCE_LATEST` | Get Electricity Source Latest | Get the latest electricity generation values for the selected source_type in a zone. |
| `ELECTRICITY_MAPS_GET_ELECTRICITY_SOURCE_PAST` | Get Electricity Source Past | Get electricity generation values for the selected source_type in a zone at a given datetime. |
| `ELECTRICITY_MAPS_GET_ELECTRICITY_SOURCE_PAST_RANGE` | Get Electricity Source Past Range | Get electricity generation values for the selected source_type in a zone over a given datetime range. Maximum range: 3 days for 5_minutes, 4 days for 15_minutes, 10 days for hourly, 365 days for daily, and 30 years for monthly, quarterly, or yearly. |
| `ELECTRICITY_MAPS_GET_ENERGY_SHARE_FORECAST` | Get Energy Share Forecast | Get the carbon-free or renewable electricity share forecast for a zone. |
| `ELECTRICITY_MAPS_GET_ENERGY_SHARE_HISTORY` | Get Energy Share History | Get the last 24 hours of carbon-free or renewable electricity share for a zone. |
| `ELECTRICITY_MAPS_GET_ENERGY_SHARE_LATEST` | Get Energy Share Latest | Get the latest carbon-free or renewable electricity share for a zone. |
| `ELECTRICITY_MAPS_GET_ENERGY_SHARE_PAST` | Get Energy Share Past | Get the carbon-free or renewable electricity share at a given datetime. |
| `ELECTRICITY_MAPS_GET_ENERGY_SHARE_PAST_RANGE` | Get Energy Share Past Range | Get carbon-free or renewable electricity share values over a datetime range. Maximum range: 3 days for 5_minutes, 4 days for 15_minutes, 10 days for hourly, 365 days for daily, and 30 years for monthly, quarterly, or yearly. |
| `ELECTRICITY_MAPS_GET_GRID_LEVEL_FORECAST` | Get Grid Level Forecast | Get forecasted carbon-intensity, carbon-free-percentage, or renewable-percentage grid levels. Levels are classified on hourly data. |
| `ELECTRICITY_MAPS_GET_GRID_LEVEL_LATEST` | Get Grid Level Latest | Get the latest carbon-intensity, carbon-free-percentage, or renewable-percentage grid level. Levels are classified on hourly data. |
| `ELECTRICITY_MAPS_GET_GRID_LEVEL_PAST` | Get Grid Level Past | Get a carbon-intensity, carbon-free-percentage, or renewable-percentage grid level for an exact past hourly bucket. |
| `ELECTRICITY_MAPS_GET_GRID_LEVEL_PAST_RANGE` | Get Grid Level Past Range | Get carbon-intensity, carbon-free-percentage, or renewable-percentage grid levels over an hourly range of at most 10 days. |
| `ELECTRICITY_MAPS_GET_LOAD_FORECAST` | Get Load Forecast | Get a net, total, or total-reported electricity load forecast. |
| `ELECTRICITY_MAPS_GET_LOAD_HISTORY` | Get Load History | Get the last 24 hours of net, total, or total-reported load. |
| `ELECTRICITY_MAPS_GET_LOAD_LATEST` | Get Load Latest | Get the latest net, total, or total-reported electricity load value. |
| `ELECTRICITY_MAPS_GET_LOAD_PAST` | Get Load Past | Get net, total, or total-reported load at a given datetime. |
| `ELECTRICITY_MAPS_GET_LOAD_PAST_RANGE` | Get Load Past Range | Get net, total, or total-reported load over a datetime range. Maximum range: 3 days for 5_minutes, 4 days for 15_minutes, 10 days for hourly, 365 days for daily, and 30 years for monthly, quarterly, or yearly. |
| `ELECTRICITY_MAPS_GET_LOCATIONAL_MARGINAL_PRICE_DAY_AHEAD_ACTUAL` | Get Day-Ahead Locational Marginal Price Actual | Get actual day-ahead locational marginal prices for a pricing node and datetime range. Addressed by node, not zone. |
| `ELECTRICITY_MAPS_GET_LOCATIONAL_MARGINAL_PRICE_DAY_AHEAD_HISTORY` | Get Day-Ahead Locational Marginal Price History | Get the last 24 hours of day-ahead locational marginal prices for a pricing node. Addressed by node, not zone. |
| `ELECTRICITY_MAPS_GET_LOCATIONAL_MARGINAL_PRICE_DAY_AHEAD_LATEST` | Get Day-Ahead Locational Marginal Price Latest | Get the latest day-ahead locational marginal price for a pricing node. Addressed by node, not zone. |
| `ELECTRICITY_MAPS_GET_LOCATIONAL_MARGINAL_PRICE_DAY_AHEAD_PAST` | Get Day-Ahead Locational Marginal Price Past | Get the day-ahead locational marginal price for a pricing node at a given datetime. Addressed by node, not zone. |
| `ELECTRICITY_MAPS_GET_LOCATIONAL_MARGINAL_PRICE_DAY_AHEAD_PAST_RANGE` | Get Day-Ahead Locational Marginal Price Past Range | Get day-ahead locational marginal prices for a pricing node and past datetime range of at most 10 days. Addressed by node, not zone. |
| `ELECTRICITY_MAPS_GET_PRICE_DAY_AHEAD_ACTUAL` | Get Day-Ahead Price Actual | Get settled and published day-ahead prices for a zone and datetime range. |
| `ELECTRICITY_MAPS_GET_PRICE_DAY_AHEAD_COMBINED` | Get Day-Ahead Price Combined | Get both actual and forecasted day-ahead prices for a zone in a single response. |
| `ELECTRICITY_MAPS_GET_PRICE_DAY_AHEAD_FORECAST` | Get Day-Ahead Price Forecast | Get the day-ahead price forecast for a zone. |
| `ELECTRICITY_MAPS_GET_PRICE_DAY_AHEAD_HISTORY` | Get Day-Ahead Price History | Get the last 24 hours of day-ahead price for a zone. |
| `ELECTRICITY_MAPS_GET_PRICE_DAY_AHEAD_LATEST` | Get Day-Ahead Price Latest | Get the latest day-ahead price for a zone. |
| `ELECTRICITY_MAPS_GET_PRICE_DAY_AHEAD_PAST` | Get Day-Ahead Price Past | Get the day-ahead price for a zone at a given datetime. |
| `ELECTRICITY_MAPS_GET_PRICE_DAY_AHEAD_PAST_RANGE` | Get Day-Ahead Price Past Range | Get the day-ahead price for a zone and a given datetime range. Maximum range: 3 days for 5_minutes, 4 days for 15_minutes, 10 days for hourly, 365 days for daily, and 30 years for monthly, quarterly, or yearly. |
| `ELECTRICITY_MAPS_GET_ZONE` | Get Zone | Get metadata for a single Electricity Maps zone. |
| `ELECTRICITY_MAPS_LIST_UPDATES_SINCE` | List Updates Since | List data points for a zone that have been updated since a given datetime. |
| `ELECTRICITY_MAPS_LIST_ZONES` | List Zones | List all commercially available Electricity Maps zones. Each top-level key is a zone key; with an API key, its value can include the endpoints available to that key. |

## Supported Triggers

None listed.

## Installation and MCP Setup

### Path 1: SDK Installation

#### Path 1, Step 1: Install Composio

Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
```python
pip install composio composio_openai openai
```

```typescript
npm install @composio/core @composio/openai openai
```

#### Path 1, Step 2: Create a Composio session

Initialize Composio with the OpenAI Responses provider and create a session scoped to Electricity Maps
```python
import json
from openai import OpenAI
from composio import Composio
from composio_openai import OpenAIResponsesProvider

composio = Composio(provider=OpenAIResponsesProvider())
client = OpenAI()

session = composio.create(user_id="your-user-id", toolkits=["electricity_maps"])
tools = session.tools()
```

```typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["electricity_maps"] });
const tools = await session.tools();
```

#### Path 1, Step 3: Run Electricity Maps tools with your agent

Send a request, execute the Electricity Maps tool calls through the session, and print the final answer
```python
response = client.responses.create(
    model="gpt-5.6-sol",
    tools=tools,
    input=[{"role": "user", "content": "Check the current carbon intensity and electricity mix in California."}],
)

while True:
    tool_calls = [o for o in response.output if o.type == "function_call"]
    if not tool_calls:
        break
    results = composio.provider.handle_tool_calls(response=response, session=session)
    response = client.responses.create(
        model="gpt-5.6-sol",
        tools=tools,
        previous_response_id=response.id,
        input=[
            {"type": "function_call_output", "call_id": call.call_id, "output": json.dumps(results[i])}
            for i, call in enumerate(tool_calls)
        ],
    )

print(response.output_text)
```

```typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "Check the current carbon intensity and electricity mix in California." }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
```

### Path 2: MCP Server Setup

#### Path 2, Step 1: Install Composio

Install the Composio SDK and your agent framework
```python
pip install composio claude-agent-sdk
```

```typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
```

#### Path 2, Step 2: Create a session with MCP enabled

Create a session scoped to Electricity Maps and read its MCP URL and headers
```python
from composio import Composio

composio = Composio()
session = composio.create(user_id="your-user-id", toolkits=["electricity_maps"], mcp=True)
```

```typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["electricity_maps"],
  mcp: true,
});
```

#### Path 2, Step 3: Connect your agent to the MCP server

Pass the session's MCP URL and headers to your agent and run a Electricity Maps request
```python
import asyncio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions, AssistantMessage, TextBlock

options = ClaudeAgentOptions(
    mcp_servers={
        "composio": {
            "type": "http",
            "url": session.mcp.url,
            "headers": session.mcp.headers,
        }
    },
    system_prompt="You are a helpful assistant with access to Electricity Maps tools.",
    tools=[],
    allowed_tools=["mcp__composio__*"],
)

async def main():
    async with ClaudeSDKClient(options=options) as client:
        await client.query("Check the current carbon intensity and electricity mix in California.")
        async for message in client.receive_response():
            if isinstance(message, AssistantMessage):
                for block in message.content:
                    if isinstance(block, TextBlock):
                        print(block.text)

asyncio.run(main())
```

```typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "Check the current carbon intensity and electricity mix in California.",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
```

## Why Use Composio?

### 1. AI Native Electricity Maps Integration

- Supports both Electricity Maps MCP and direct API based integrations
- Structured, LLM-friendly schemas for reliable tool execution
- Rich coverage for reading, comparing, and querying grid data by zone

### 2. Secure API Key Auth

- Connect Electricity Maps with your API key through a secure credential flow
- Central place to manage, scope, and revoke Electricity Maps access
- Keep API keys out of prompts, source code, and agent responses

### 3. Agent Optimized Design

- Tools are tuned using real error and success rates to improve reliability over time
- Clear schemas help agents select the right Electricity Maps endpoint and zone parameters
- Comprehensive execution logs show what ran, when, and on whose behalf

### 4. Enterprise Grade Security

- Fine-grained RBAC lets you control which agents and users can access Electricity Maps
- Scoped access helps limit agents to the grid data they need
- Full audit trails support review and compliance for energy data workflows

## Use Electricity Maps with any AI Agent Framework

Choose a framework you want to connect Electricity Maps with:

- [ChatGPT](https://composio.dev/toolkits/electricity_maps/framework/chatgpt)
- [Claude Cowork](https://composio.dev/toolkits/electricity_maps/framework/claude-cowork)
- [Hermes](https://composio.dev/toolkits/electricity_maps/framework/hermes-agent)
- [Atomic Agent](https://composio.dev/toolkits/electricity_maps/framework/atomic-agent)

## Related Toolkits

- [Firecrawl](https://composio.dev/toolkits/firecrawl) - Firecrawl automates large-scale web crawling and data extraction. It helps organizations efficiently gather, index, and analyze content from online sources.
- [Tavily](https://composio.dev/toolkits/tavily) - Tavily offers powerful search and data retrieval from documents, databases, and the web. It helps teams locate and filter information instantly, saving hours on research.
- [Exa](https://composio.dev/toolkits/exa) - Exa is a data extraction and search platform for gathering and analyzing information from websites, APIs, or databases. It helps teams quickly surface insights and automate data-driven workflows.
- [Serpapi](https://composio.dev/toolkits/serpapi) - SerpApi is a real-time API for structured search engine results. It lets you automate SERP data collection, parsing, and analysis for SEO and research.
- [Excel](https://composio.dev/toolkits/excel) - Microsoft Excel is a robust spreadsheet application for organizing, analyzing, and visualizing data. It's the go-to tool for calculations, reporting, and flexible data management.
- [Peopledatalabs](https://composio.dev/toolkits/peopledatalabs) - Peopledatalabs delivers B2B data enrichment and identity resolution APIs. Supercharge your apps with accurate, up-to-date business and contact data.
- [Snowflake](https://composio.dev/toolkits/snowflake) - Snowflake is a cloud data warehouse built for elastic scaling, secure data sharing, and fast SQL analytics across major clouds.
- [Posthog](https://composio.dev/toolkits/posthog) - PostHog is an open-source analytics platform for tracking user interactions and product metrics. It helps teams refine features, analyze funnels, and reduce churn with actionable insights.
- [21risk](https://composio.dev/toolkits/_21risk) - 21RISK is a web app built for easy checklist, audit, and compliance management. It streamlines risk processes so teams can focus on what matters.
- [0xArchive](https://composio.dev/toolkits/0xarchive) - 0xArchive is a crypto data service for historical and current market data, quality signals, feedback, and webhooks. It helps teams access reliable crypto data and manage REST integrations from one API.
- [Abstract](https://composio.dev/toolkits/abstract) - Abstract provides a suite of APIs for automating data validation and enrichment tasks. It helps developers streamline workflows and ensure data quality with minimal effort.
- [AccuWeather](https://composio.dev/toolkits/accu_weather) - AccuWeather is a global weather service providing current conditions, forecasts, MinuteCast precipitation, alerts, and lightning data. Use it for fast, localized forecasts and real-time weather alerts.
- [Adafruit IO](https://composio.dev/toolkits/adafruit_io) - Adafruit IO is Adafruit's cloud platform for connected device and IoT project data. It helps you store, visualize, and act on sensor feeds without running your own backend.
- [Addressfinder](https://composio.dev/toolkits/addressfinder) - Addressfinder is a data quality platform for verifying addresses, emails, and phone numbers. It helps you ensure accurate customer and contact data every time.
- [Agentql](https://composio.dev/toolkits/agentql) - Agentql is a toolkit that connects AI agents to the web using a specialized query language. It enables structured web interaction and data extraction for smarter automations.
- [Agenty](https://composio.dev/toolkits/agenty) - Agenty is a web scraping and automation platform for extracting data and automating browser tasks—no coding needed. It streamlines data collection, monitoring, and repetitive online actions.
- [Ahrefs MCP](https://composio.dev/toolkits/ahrefs_mcp) - Ahrefs MCP is Ahrefs' hosted MCP server for SEO data and insights. Use it to access backlinks, organic metrics, keyword research, and competitor analysis.
- [Akta](https://composio.dev/toolkits/akta) - Akta is a company intelligence platform providing enrichment, news, and alternative business signals. It helps teams build targeted company lists and enrich data-driven workflows.
- [Ambee](https://composio.dev/toolkits/ambee) - Ambee is an environmental data platform providing real-time, hyperlocal APIs for air quality, weather, and pollen. Get precise environmental insights to power smarter decisions in your apps and workflows.
- [Ambient weather](https://composio.dev/toolkits/ambient_weather) - Ambient Weather is a platform for personal weather stations with a robust API for accessing local, real-time, and historical weather data. Get detailed environmental insights directly from your own sensors for smarter apps and automations.

## Frequently Asked Questions

### Do I need my own developer credentials to use Electricity Maps with Composio?

Yes, Electricity Maps requires you to configure your own API key. Once set up, Composio handles secure credential storage and API request handling for you.

### Can I use multiple toolkits together?

Yes! Composio's Tool Router enables agents to use multiple toolkits. [Learn more](https://docs.composio.dev/tool-router/overview).

### Is Composio secure?

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. [Learn more](https://trust.composio.dev).

### What if the API changes?

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
