Cedre083/eco-score-api

API pour calculer l'empreinte carbone des sites web

JavaScript

1

19 commits

updated Oct 16, 2025

See the code

See what people are saying

SourceMessageScoreDate

I built a web carbon footprint API and I am looking for feedback (r/SideProject)

Hi r/SideProject, I am sharing a project I work on: Eco-Score Web API. It analyzes a website URL and returns: - an eco-score and rating - estimated grams of CO₂ per page view - an indicator for green hosting The goal is to make a first technical assessment of a site's environmental footprint easier…

2

Oct 5, 2026

README

Eco-Score Web API

API pour calculer l'empreinte carbone des sites web.

Déploiement sur Vercel

  1. Créez un repository GitHub
  2. Uploadez tous les fichiers de ce dossier
  3. Connectez le repository à Vercel
  4. Ajoutez la variable d'environnement :
    • CORS_ORIGINS = https://votre-site.com
  5. Déployez !

Endpoints

GET /

Informations sur l'API

GET /api/health

Vérification de santé

POST /api/analyze

Analyse d'une URL

Body:

{
  "url": "https://exemple.com"
}

Response:

{
  "status": "success",
  "data": {
    "url": "https://exemple.com",
    "ecoScore": 85,
    "ranking": "A",
    "carbon": {
      "gramsCO2PerView": 0.52
    },
    "hosting": {
      "isGreen": true
    }
  }
}

Cedre083/eco-score-api

API pour calculer l'empreinte carbone des sites web

JavaScript

1

19 commits

updated Oct 16, 2025

See the code

See what people are saying

SourceMessageScoreDate

I built a web carbon footprint API and I am looking for feedback (r/SideProject)

Hi r/SideProject, I am sharing a project I work on: Eco-Score Web API. It analyzes a website URL and returns: - an eco-score and rating - estimated grams of CO₂ per page view - an indicator for green hosting The goal is to make a first technical assessment of a site's environmental footprint easier…

2

Oct 5, 2026

README

Eco-Score Web API

API pour calculer l'empreinte carbone des sites web.

Déploiement sur Vercel

  1. Créez un repository GitHub
  2. Uploadez tous les fichiers de ce dossier
  3. Connectez le repository à Vercel
  4. Ajoutez la variable d'environnement :
    • CORS_ORIGINS = https://votre-site.com
  5. Déployez !

Endpoints

GET /

Informations sur l'API

GET /api/health

Vérification de santé

POST /api/analyze

Analyse d'une URL

Body:

{
  "url": "https://exemple.com"
}

Response:

{
  "status": "success",
  "data": {
    "url": "https://exemple.com",
    "ecoScore": 85,
    "ranking": "A",
    "carbon": {
      "gramsCO2PerView": 0.52
    },
    "hosting": {
      "isGreen": true
    }
  }
}