API Documentation
Programmatic access to sustainability data
Standard REST endpoints for accessing sustainability metrics, country data, and AI insights.
Free access to all endpoints. Rate limiting applies: 1000 requests per hour per IP.
Access the same data powering our web interface with millisecond response times.
https://sustainabilityportal.org/api
All API endpoints are relative to this base URL. Responses are in JSON format.
/api/countriesGet list of all countries with sustainability data
/api/data/filterFilter sustainability data by country, year, region
?country=Brazil&year=2018®ion=South%20America/api/insightsGet AI-generated insights for dataset
?country=Brazil&metrics=carbon,renewable/api/statsGet aggregated statistics for filtered data
Get Brazil Data
curl -X GET "https://sustainabilityportal.org/api/data/filter?country=Brazil"
JavaScript Fetch
fetch('/api/data/filter?country=Brazil&year=2018')
.then(response => response.json())
.then(data => console.log(data));Python Request
import requests
url = "https://sustainabilityportal.org/api/data/filter"
params = {"country": "Brazil", "year": "2018"}
response = requests.get(url, params=params)
data = response.json()All API responses follow a consistent format:
{
"success": true,
"data": [...],
"meta": {
"total": 3287,
"filtered": 152,
"countries": 173,
"years": "2000-2018"
},
"timestamp": "2024-12-01T10:30:00Z"
}400 Bad Request
Invalid parameters or malformed request
429 Too Many Requests
Rate limit exceeded (1000 requests/hour)
500 Internal Server Error
Server error - please try again later
Need help with API integration or have questions?
Developer Support: api@sustainabilityportal.org
Documentation: docs.sustainabilityportal.org
Status Page: status.sustainabilityportal.org