The Wattnet API is open to everyone with an account. Read the docs → docs.wattnet.eu Create your API credentials. Docs →

Build on open data
about the environmental
footprint of electricity

Create credentials for your software, ask for a short-lived token and read real-time, historical and forecasted carbon and water data across Europe.

Open data, a standard OAuth flow and a documented API, for research, services and your own tools.

Create your credentials Read the docs API Reference

One credential,one short-lived token,the whole Wattnet API.

Open by design

  • Open data, CC BY 4.0
  • Open source, Apache 2.0
  • Hosted by CSIC at IFCA
How it works

From Sign-in to Your First API Call

Create a credential once, then let your software exchange it for a short-lived token whenever it needs to call the API. It is the standard OAuth flow, so any OAuth library works.

01

Create a credential

Sign in and create a credential. You get a client ID and a client secret, shown once: keep them in your secrets manager.

02

Request a token

Your software exchanges them for a token that lasts one hour, with any standard OAuth library.

03

Call the API

Send the token as a bearer on every request and renew it before it expires.

Quick start

Your first call in two requests

Exchange your credential for a token, then send it as a bearer on every request. Tokens last one hour, so request a new one shortly before the current one expires and your software never calls with an expired token.

  • Standard OAuth 2.0 client_credentials: any OAuth library or plain curl works, with no SDK to install, in scripts, servers and CI.
  • Every request is tied to your credential, so you see which of your programs calls the API and how often. Disable or delete a credential, or rotate a leaked secret, without touching the others.
  • Try the API Reference with a portal token: press Get token on a credential, paste it in Authorize and call any endpoint. The token lasts one hour and the portal does not store it.
MCP

Give your AI agents the same data

Wattnet also speaks MCP, the Model Context Protocol. Point an agent at the server with the token of one of your credentials and it finds the tools by itself, with the same access level and limits as the API.

  • One credential for both: the same OAuth 2.0 token works on the API and on the MCP server.
  • 15 tools for the zones, generation, flows, footprints, impacts and shares, described to the agent with their parameters and limits.
  • A remote server at https://mcp.wattnet.eu/mcp, with nothing to install. Applications that sign in with a browser, such as Claude Desktop, are not supported yet.
How green is Spain now? 91.9 gCO2/kWh, mostly wind AI assistant Code agent Your agent GATEWAY Token check Access level Rate limits MCP server mcp.wattnet.eu get_generation get_imports get_footprints get_impacts + 11 more tools WATTNET DATA Generation Flows Footprints Impacts