Quick Start Guide

Get your first energy score in under 5 minutes.

1

Get your API key

Create an account to get your API key. You'll find it in your dashboard.

All requests require the X-Api-Key header.

2

Make your first request

curl

curl -H "X-Api-Key: YOUR_API_KEY" \
  "https://api.wattmind.fr/api/b2b/score?lat=48.8566&lon=2.3522"

Python

import requests

response = requests.get(
    "https://api.wattmind.fr/api/b2b/score",
    headers={"X-Api-Key": "YOUR_API_KEY"},
    params={"lat": 48.8566, "lon": 2.3522}
)
score = response.json()
print(f"Score: {score['globalScore']}/100 - {score['level']}")

JavaScript

const res = await fetch(
  "https://api.wattmind.fr/api/b2b/score?lat=48.8566&lon=2.3522",
  { headers: { "X-Api-Key": "YOUR_API_KEY" } }
);
const score = await res.json();
console.log(`Score: ${score.globalScore}/100 - ${score.level}`);

C#

var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-Api-Key", "YOUR_API_KEY");

var score = await client.GetFromJsonAsync<JsonElement>(
    "https://api.wattmind.fr/api/b2b/score?lat=48.8566&lon=2.3522");

Console.WriteLine($"Score: {score.GetProperty("globalScore")}/100");
3

Understand the response

Field Type Description
globalScoreintComposite score 0-100 (higher = better time to consume)
levelstringOptimal / Acceptable / Unfavorable
recommendationstringHuman-readable recommendation (French)
subScoresobjectBreakdown: grid, tariff, carbon, weather (each with score + label)
computedAtdatetimeWhen the score was computed (UTC)
4

Rate limits & errors

Every response includes rate limit headers:

X-RateLimit-Limit-Minute: 60
X-RateLimit-Remaining-Minute: 58
X-RateLimit-Limit-Month: 100000
X-RateLimit-Remaining-Month: 99842

When rate limited, you'll get a 429 with a Retry-After header.

Error format

{
  "status": 401,
  "error": "Unauthorized",
  "traceId": "0HN5..."
}

Next steps