Skip to content
Fontsource Logo
Documentation

Font ID

The Font ID endpoint allows you to retrieve detailed information about a specific font supported by Fontsource.

HTTP Request

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

Response

The API response for the Font ID endpoint is a JSON object that provides comprehensive details about the font.

Attributes:

Returns an object with:

AttributeTypeDescription
idstringThe font ID
familystringThe font family
subsetsstring[]Language subsets
weightsnumber[]Font weights
stylesstring[]Font styles
unicodeRangeRecord<string, string>Unicode range
defSubsetstringDefault subset
variablebooleanIs the font variable
lastModifiedstringLast modified date
categorystringFont category
versionstringFont version
typestringFont type
variantsRecord<string, object>File variants

Variants is an object that creates records starting with weight, style, subset followed by a URL object containing each supported file format (woff2, woff, ttf).

Response example:

{
  "id": "abel",
  "family": "Abel",
  "subsets": ["latin"],
  "weights": [400],
  "styles": ["normal"],
  "unicodeRange": {
    "latin": "U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD"
  },
  "defSubset": "latin",
  "variable": false,
  "lastModified": "2020-09-10",
  "category": "sans-serif",
  "version": "v12",
  "type": "google",
  "variants": {
    "400": {
      "normal": {
        "latin": {
          "url": {
            "woff2": "https://cdn.jsdelivr.net/fontsource/fonts/abel@latest/latin-400-normal.woff2",
            "woff": "https://cdn.jsdelivr.net/fontsource/fonts/abel@latest/latin-400-normal.woff",
            "ttf": "https://cdn.jsdelivr.net/fontsource/fonts/abel@latest/latin-400-normal.ttf"
          }
        }
      }
    }
  }
}
json

Example:

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