Developer Resources

API Reference

Integrate EcoPulse into your applications. Analyze websites, track carbon footprint, and build sustainable web experiences.

Base URL

https://ecopulse.dev/api

Content Type

application/json

Rate Limiting

10 requests per minute per IP

Endpoints

Other

POST/api/analyze

Analyze Website

Analyze a website's environmental impact and get detailed metrics

Request Body

ParameterTypeRequiredDescription
urlstringRequiredThe URL of the website to analyze (must include http:// or https://)

Response

FieldTypeDescription
urlstringThe analyzed URL
ecoScorenumberOverall eco score (0-100)
carbonEmissionsnumberEstimated carbon emissions in grams per page view
energyConsumptionnumberEstimated energy consumption in Wh
waterUsagenumberEstimated water usage in liters
resourcesobjectBreakdown of resources by type
suggestionsarrayList of optimization suggestions
pageWeightnumberTotal page weight in bytes

Example

Request
{
  "url": "https://example.com"
}
Response
{
  "url": "https://example.com",
  "ecoScore": 75,
  "carbonEmissions": 0.45,
  "energyConsumption": 0.12,
  "waterUsage": 0.18,
  "resources": {
    "html": { "count": 1, "size": 15234 },
    "css": { "count": 3, "size": 45678 },
    "javascript": { "count": 5, "size": 234567 },
    "images": { "count": 8, "size": 456789 },
    "fonts": { "count": 2, "size": 89012 },
    "other": { "count": 1, "size": 1234 }
  },
  "suggestions": [
    {
      "type": "images",
      "priority": "high",
      "message": "Consider using WebP format...",
      "impact": "Could reduce emissions by 30%"
    }
  ],
  "pageWeight": 842514
}