Skip to content
Fontsource Logo
Documentation

Stats

The Stats endpoint provides download statistics for each font.

HTTP Request

  • GET https://api.fontsource.org/v1/stats/{id}

Response

The API response for the Stats endpoint is a JSON object that provides download statistics for each font.

Attributes

Returns an object with:

AttributeTypeDescription
totalDownloadStatsTotal download counts
staticDownloadStatsStatic download counts
variableOptional<DownloadStats>Variable download counts

DownloadStats

AttributeTypeDescription
npmDownloadTotalnumberTotal NPM download count
npmDownloadMonthlynumberMonthly NPM download count
jsDelivrHitsTotalnumberTotal jsDelivr hits
jsDelivrHitsMonthlynumberMonthly jsDelivr hits

Response example

{
  "total":{
    "npmDownloadTotal":8566215,
    "npmDownloadMonthly":731202,
    "jsDelivrHitsTotal":46488758,
    "jsDelivrHitsMonthly":8210654
  },
  "static":{
    "npmDownloadTotal":8288204,
    "npmDownloadMonthly":637495,
    "jsDelivrHitsTotal":46483427,
    "jsDelivrHitsMonthly":8207141
  },
  "variable":{
    "npmDownloadTotal":278011,
    "npmDownloadMonthly":93707,
    "jsDelivrHitsTotal":5331,
    "jsDelivrHitsMonthly":3513
  }
}
json

Example

  • GET https://api.fontsource.org/v1/stats/abel
  • GET https://api.fontsource.org/v1/stats/open-sans