

Global Energy & Power Grid Data
Data
Premium Product
Available ActionsEach successful request consumes credits as outlined below.
query_energy_data10cr
Details
Explore energy production and access data for any country in the world. Look up electricity access rates, renewable energy adoption, fossil fuel usage, energy efficiency metrics, and power grid coverage. Compare energy mixes across countries, track the shift toward clean energy, and identify urban-rural electricity gaps — all from a comprehensive global data set.
Use Cases
Research electricity access rates by country, Compare renewable energy adoption across regions, Track fossil fuel vs clean energy trends, Analyze urban vs rural electricity gaps, Study energy consumption per capita, Monitor energy efficiency and intensity metrics, Assess progress toward SDG 7 clean energy targets, Compare energy mix breakdowns between countries, Research clean cooking fuel access, Evaluate energy transition progress over time
Connect Your Agent In 5 Min
Watch the setup guide for your platform
Or Install Locally
STDIO connector for Claude Code, Codex, Cursor, Zed, and other LLMs that require STDIO or custom connections. This lightweight connector routes requests to https://api.agentpmt.com/mcp. All tool execution happens in the cloud and the server cannot edit any files on your computer.
npm install -g @agentpmt/mcp-routeragentpmt-setupActions(1)
query_energy_data10cr5 params(1 required)Fetch energy indicators for a country or region, including electricity access rates, renewable and fossil energy mix, per capita consumption, energy efficiency, and clean cooking access with SDG 7 tracking.
query_energy_data10cr5 params(1 required)Fetch energy indicators for a country or region, including electricity access rates, renewable and fossil energy mix, per capita consumption, energy efficiency, and clean cooking access with SDG 7 tracking.
country_or_regionrequiredstringCountry name, ISO3 code (e.g., 'USA', 'KEN'), or region (e.g., 'Sub-Saharan Africa')
energy_typestringEnergy category: 'electricity', 'renewable', 'fossil', 'efficiency', 'cooking', or 'all'
Values:
electricityrenewablefossilefficiencycookingall
Default:
allinclude_urban_rural_gapsbooleanCalculate urban/rural electricity access gap analysis with percentage points difference
Default:
falseinclude_energy_mixbooleanCalculate energy mix breakdown showing renewable, fossil, nuclear, and other percentages
Default:
truetime_periodstringTime period: 'latest', single year 'YYYY' (e.g., '2020'), or range 'YYYY:YYYY' (e.g., '2015:2023')
Default:
latestcurl -X POST "https://api.agentpmt.com/products/purchase" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ********" \
-d '{
"product_id": "6980de6b71cad8f61bf5b1e4",
"parameters": {
"action": "query_energy_data",
"country_or_region": "example_country_or_region",
"energy_type": "all",
"include_urban_rural_gaps": false,
"include_energy_mix": true,
"time_period": "latest"
}
}'import requests
import json
url = "https://api.agentpmt.com/products/purchase"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer ********"
}
data = {
"product_id": "6980de6b71cad8f61bf5b1e4",
"parameters": {
"action": "query_energy_data",
"country_or_region": "example_country_or_region",
"energy_type": "all",
"include_urban_rural_gaps": false,
"include_energy_mix": true,
"time_period": "latest"
}
}
response = requests.post(url, headers=headers, json=data)
print(response.status_code)
print(response.json())const url = "https://api.agentpmt.com/products/purchase";
const headers = {
"Content-Type": "application/json",
"Authorization": "Bearer ********"
};
const data = {
product_id: "6980de6b71cad8f61bf5b1e4",
parameters: {
"action": "query_energy_data",
"country_or_region": "example_country_or_region",
"energy_type": "all",
"include_urban_rural_gaps": false,
"include_energy_mix": true,
"time_period": "latest"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));const axios = require('axios');
const url = "https://api.agentpmt.com/products/purchase";
const headers = {
"Content-Type": "application/json",
"Authorization": "Bearer ********"
};
const data = {
product_id: "6980de6b71cad8f61bf5b1e4",
parameters: {
"action": "query_energy_data",
"country_or_region": "example_country_or_region",
"energy_type": "all",
"include_urban_rural_gaps": false,
"include_energy_mix": true,
"time_period": "latest"
}
};
axios.post(url, data, { headers })
.then(response => {
console.log(response.status);
console.log(response.data);
})
.catch(error => {
console.error("Error:", error.message);
});Login to view your API and budget keys. The example above uses placeholder values. Sign in to see personalized code with your bearer token.
This tool supports credit-based access for external agents using AgentAddress identities or standard crypto wallets. External agents should use the External Agent API to buy credits with x402 and invoke this tool.
1. Buy Credits
Purchase credits via x402 payment (500 credit minimum, 100 credits = $1).
# Request payment requirements (returns 402 + PAYMENT-REQUIRED header)
curl -i -s -X POST "https://www.agentpmt.com/api/external/credits/purchase" \
-H "Content-Type: application/json" \
-d '{ "wallet_address":"0xYOUR_WALLET", "credits": 500, "payment_method":"x402" }'
# Sign the EIP-3009 authorization, then retry with signature header
curl -s -X POST "https://www.agentpmt.com/api/external/credits/purchase" \
-H "Content-Type: application/json" \
-H "PAYMENT-SIGNATURE: <base64-json>" \
-d '{ "wallet_address":"0xYOUR_WALLET", "credits": 500, "payment_method":"x402" }'2. Create a Session Nonce (nonce used in signed balance/invoke)
curl -s -X POST "https://www.agentpmt.com/api/external/auth/session" \
-H "Content-Type: application/json" \
-d '{ "wallet_address":"0xYOUR_WALLET" }'3. Invoke This Tool
Sign the message with your wallet (EIP-191 personal-sign), then POST to the invoke endpoint.
# Sign this message (wallet MUST be lowercased):
# agentpmt-external
# wallet:0xyourwallet...
# session:<session_nonce>
# request:<request_id>
# method:POST
# path:/external/tools/energy-access-production/actions/<actionSlug>/invoke
# payload:<sha256(canonical_json(parameters))>
curl -s -X POST "https://www.agentpmt.com/api/external/tools/energy-access-production/actions/<actionSlug>/invoke" \
-H "Content-Type: application/json" \
-d '{
"wallet_address": "0xYOUR_WALLET",
"session_nonce": "<session_nonce>",
"request_id": "invoke-uuid",
"signature": "0x<signature>",
"parameters": {
"your_param": "value"
}
}'Usage Instructions
Usage guidance provided directly by the developer for this product.
Energy Access & Production Data
Access World Bank energy indicators including electricity access, renewable energy mix, fossil fuel consumption, energy efficiency, and clean cooking access through a natural language interface.
Overview
This tool provides natural language access to World Bank energy data covering electricity access rates (total, urban, rural), energy mix breakdowns (renewable, fossil, nuclear), per capita consumption, energy efficiency metrics, and clean cooking fuel access. It supports SDG 7 (Affordable and Clean Energy) tracking with built-in urban/rural gap analysis and energy mix calculations.
Data is sourced from the World Bank Data API (World Development Indicators).
Actions
query_energy_data
Query energy indicators for any country or region.
Required Parameters
- action (string): Must be
"query_energy_data" - country_or_region (string): Country name, ISO3 code, or region
- Country names:
"Kenya","India","United States","Germany" - ISO3 codes:
"USA","KEN","IND" - If not provided or empty, defaults to
"WLD"(World)
- Country names:
Optional Parameters
-
energy_type (string, default:
"all"): Energy category to query"electricity"- Electricity access rates: total population, urban, and rural"renewable"- Renewable energy share in total final energy consumption and electricity output"fossil"- Fossil fuel energy consumption as percentage of total"efficiency"- Energy intensity (MJ per $2017 PPP GDP) and energy use per capita"cooking"- Clean cooking fuel access as percentage of population"all"- All available energy indicators (11 indicators)
-
include_urban_rural_gaps (boolean, default:
false): Calculate urban/rural electricity access gap analysis. Returns urban access %, rural access %, and the gap in percentage points. Most useful withenergy_type: "electricity"or"all". -
include_energy_mix (boolean, default:
true): Calculate energy mix breakdown showing renewable, fossil fuel, and nuclear percentages with an "other" category for the remainder. Applies whenenergy_typeis"all","renewable", or"fossil". -
time_period (string, default:
"latest"): Time period for data retrieval"latest"- Most recent available data point"YYYY"- Single specific year (e.g.,"2020"), must be between 1960 and current year"YYYY:YYYY"- Year range (e.g.,"2015:2023"), both years must be between 1960 and current year
Example: Electricity access for a country
{
"action": "query_energy_data",
"country_or_region": "Kenya",
"energy_type": "electricity",
"include_urban_rural_gaps": true
}
Example: Renewable energy overview
{
"action": "query_energy_data",
"country_or_region": "Germany",
"energy_type": "renewable",
"time_period": "latest"
}
Example: Full energy profile with mix breakdown
{
"action": "query_energy_data",
"country_or_region": "India",
"energy_type": "all",
"include_energy_mix": true,
"include_urban_rural_gaps": true
}
Example: Energy efficiency comparison
{
"action": "query_energy_data",
"country_or_region": "Japan",
"energy_type": "efficiency",
"time_period": "2015:2023"
}
Example: Clean cooking access
{
"action": "query_energy_data",
"country_or_region": "Ethiopia",
"energy_type": "cooking"
}
Response Structure
Responses include:
- country: Resolved country name from the data
- energy_type: The energy category queried
- indicators: Object with each indicator containing:
value: The numeric valuedate: Year of the data pointunit: Unit of measurement (e.g., "% of population", "kg of oil equivalent per capita")
- energy_mix (when
include_energy_mixis true): Breakdown with renewable_percent, fossil_percent, nuclear_percent, other_percent, and corresponding dates - urban_rural_gap (when
include_urban_rural_gapsis true): urban_access_percent, rural_access_percent, access_gap_percentage_points, and date - sdg_7_context: SDG 7 tracking with target values, current values, and gap-to-universal for electricity access and clean cooking; renewable energy share note; energy intensity assessment
Key Indicators Reference
| Indicator | Unit | Description |
|---|---|---|
| electricity_access | % of population | Total population with electricity access |
| electricity_urban | % of urban population | Urban electricity access rate |
| electricity_rural | % of rural population | Rural electricity access rate |
| clean_cooking_access | % of population | Access to clean cooking fuels |
| renewable_energy | % of total final energy | Renewable share in energy consumption |
| fossil_fuel_energy | % of total energy | Fossil fuel share of energy |
| renewable_electricity | % of total electricity output | Renewable share in electricity generation |
| alternative_nuclear | % of total energy use | Alternative and nuclear energy share |
| energy_use_per_capita | kg of oil equivalent per capita | Per capita energy consumption |
| electric_power_consumption | kWh per capita | Per capita electricity consumption |
| energy_intensity | MJ/$2017 PPP GDP | Energy intensity (lower = more efficient) |
Workflows
- Energy Access Assessment: Query
energy_type: "electricity"withinclude_urban_rural_gaps: trueto identify electrification gaps between urban and rural areas - Energy Transition Tracking: Query
energy_type: "all"withinclude_energy_mix: trueto see the renewable/fossil/nuclear breakdown and track transition progress - SDG 7 Progress Monitoring: Query
energy_type: "all"to get the full sdg_7_context with gap-to-universal calculations for electricity and clean cooking - Efficiency Benchmarking: Query
energy_type: "efficiency"for multiple countries to compare energy intensity and per capita consumption
Notes
- Data sourced from World Bank World Development Indicators
- Most recent data may be 1-3 years behind the current year due to collection delays
- Data availability varies by country; some indicators may return null for certain countries
- Energy mix percentages may not sum to exactly 100% due to data collection timing differences across indicators
- The "other" category in energy mix is calculated as 100 minus the sum of renewable, fossil, and nuclear
- Urban/rural gap analysis requires both urban and rural data to be available; returns null if either is missing
- SDG 7 context is always included in responses regardless of parameters
- When a country name is not recognized, a ValueError is raised with guidance
- If country_or_region is empty or null, defaults to World (WLD) data
- Country codes that are already 3 uppercase letters pass through directly
Pricing
$0.05 per request





