nuxt.care Logo

nuxt.care

Docs 0
v1.0.0-beta.13

Health Badge

Add a nuxt.care health badge to your module's README to show its quality score.

Important Update: The Badge API has moved to /api/v1/badge. The old /api/badge/{module} endpoint is deprecated and will be removed in a future version. Please update your badges!

Quick Start

Add this to your README.md:

[![nuxt.care](https://img.shields.io/endpoint?url=https://nuxt.care/api/v1/badge?module=YOUR-MODULE)](https://nuxt.care/?search=YOUR-MODULE)

Replace YOUR-MODULE with your module's name as shown on nuxt.care.

Examples

Nuxt Icon:

[![nuxt.care](https://img.shields.io/endpoint?url=https://nuxt.care/api/v1/badge?module=icon)](https://nuxt.care/?search=icon)

Pinia (by npm package):

[![nuxt.care](https://img.shields.io/endpoint?url=https://nuxt.care/api/v1/badge?package=@pinia/nuxt)](https://nuxt.care/?search=pinia)

API Reference

Endpoint

GET https://nuxt.care/api/v1/badge

Query Parameters

ParameterRequiredDescription
module*Module name as shown on nuxt.care
package*npm package name (alternative to module)
modescore (default) = "85/100", status = "stable"

* Either module or package is required.

Response

{
  "schemaVersion": 1,
  "label": "nuxt.care",
  "message": "85/100",
  "color": "green"
}

Colors & Status

ScoreColorStatus
90+brightgreenoptimal
70-89greenstable
40-69yellowdegraded
<40redcritical

Display Modes

Score (default): Shows numeric score

/api/v1/badge?module=icon → "85/100"

Status: Shows status label

/api/v1/badge?module=icon&mode=status → "stable"

Badge Styles

Customize with shields.io parameters:

<!-- Flat (default) -->
![](https://img.shields.io/endpoint?url=https://nuxt.care/api/v1/badge?module=icon)

<!-- Flat square -->
![](https://img.shields.io/endpoint?url=https://nuxt.care/api/v1/badge?module=icon&style=flat-square)

<!-- For the badge -->
![](https://img.shields.io/endpoint?url=https://nuxt.care/api/v1/badge?module=icon&style=for-the-badge)

See shields.io styles for more options.


Migration from Old API

DEPRECATED:/api/badge/{module} is deprecated and will be removed!

If you're using the old format, update your badges:

Old (deprecated)New
/api/badge/icon/api/v1/badge?module=icon
/api/badge/pinia/api/v1/badge?module=pinia
/api/badge/@pinia/nuxt/api/v1/badge?package=@pinia/nuxt

Before:

![](https://img.shields.io/endpoint?url=https://nuxt.care/api/badge/icon)

After:

![](https://img.shields.io/endpoint?url=https://nuxt.care/api/v1/badge?module=icon)