DEVELOPERS · DATA PARTNERS
GREEN FLAMES Data API
Read energy, emissions and institutional-cooking data from GREEN FLAMES as JSON. Access is sold per product and energy category. Each client gets a private key, a monthly request quota and a per-minute rate limit.
Getting started
- Ask us for access (contact below). We agree a plan and the products you need.
- You receive an API key that starts with
gfp_. Keep it secret: anyone holding it uses your quota. - Send the key in the
Authorizationheader on every request, and start with the index endpoint, which lists exactly what your key can call.
curl -H "Authorization: Bearer gfp_YOUR_KEY" https://greenflamesenergy.com/api/v1
All endpoints use GET, return JSON and allow browser calls from any origin (CORS). You can also send the key as X-API-Key: gfp_…. Keys in the URL are not accepted.
Endpoints
| Endpoint | Product | Returns |
|---|---|---|
/api/v1 | any key | Your plan, products, usage this month and your endpoint list. Not counted against the quota. |
/api/v1/summaryrange | summary | Total kWh, renewable share, cost, CO₂ emitted and avoided, peak kW, and kWh by the energy categories in your plan. |
/api/v1/energyrange | energy:* | kWh and CO₂ for each energy category in your plan. |
/api/v1/energy/{category}range, interval, tz | energy:{category} | Time series of kWh, average kW, peak kW, cost and CO₂ for one category: grid, solar, battery, generator, wind, hydro, load, other. |
/api/v1/emissionsrange, interval, tz | emissions | CO₂ emitted, CO₂ avoided by renewables and net CO₂ per hour or day. |
/api/v1/devices | devices | Meters in your energy categories: name, category, location, rated kW, online status, last report. |
/api/v1/realtime | realtime | Latest reading per meter in your energy categories: kW, V, A, power factor, Hz, kWh counter. |
/api/v1/cookingrange, tz | cooking | Institutional cooking: sessions, kWh, portions, kWh per portion, per-day and per-program statistics. |
Parameters
range | 24h (default), 7d or 30d; cooking also accepts 90d. |
interval | hour or day. Defaults to hour for 24h and day otherwise. |
tz | Your time zone in minutes east of UTC, used to group hours and days. Nairobi is 180. Default 0 (UTC). |
Example
GET /api/v1/energy/solar?range=24h&interval=hour&tz=180
{
"data": {
"category": "solar",
"total_kwh": 31.204,
"co2_kg": 0,
"co2_avoided_kg": 13.73,
"points": [
{ "t": "2026-11-30 07:00", "kwh": 1.92, "avg_kw": 1.92, "peak_kw": 2.6, "meters": 2, "co2_kg": 0, "co2_avoided_kg": 0.845, "cost": 0 }
]
},
"meta": { "api_version": "v1", "range": "24h", "interval": "hour", "tz": 180, "units": { "kwh": "kWh", "kw": "kW", "co2": "kg", "cost": "KES" }, "assumptions": { … } }
}
Every response carries meta.assumptions: the emission factor, tariff and currency used and how energy is estimated. Energy is the average kW of each meter over each hour; when a meter reports only its cumulative kWh counter, the change in the counter is used. Solar, wind and hydro count as CO₂ avoided; battery is storage and counts as neither.
Limits and billing
Each response includes your limits in headers: X-RateLimit-Limit, X-RateLimit-Remaining (this minute), X-Quota-Limit and X-Quota-Used (this calendar month, UTC). Quotas reset on the 1st of each month. Depending on your plan, calls above the quota are either refused or billed per 1,000.
| Plan | Requests / month | Requests / minute | Typical products |
|---|---|---|---|
| Free trial | 1,000 | 10 | summary, grid and solar energy |
| Basic | 10,000 | 30 | summary, emissions, grid and solar energy |
| Professional | 100,000 | 120 | everything except cooking; extra calls billed |
| Enterprise | 1,000,000 | 600 | all products; extra calls billed |
Prices and custom plans are agreed with GREEN FLAMES.
Errors
401 | Missing, wrong, rotated or revoked key. |
403 | Your plan does not include that product or category, or the key is suspended or expired. |
404 | Unknown endpoint or energy category. |
429 | Rate limit or monthly quota reached. Wait for Retry-After seconds, or upgrade. |
Errors are JSON: {"error": "…", "docs": "/api-docs.html"}.
Contact
Loading contact options…