Documentation

Fonts

The Fonts endpoint provides an array of individual font objects.

HTTP Request

  • GET [https://api.fontsource.org/v1/fonts](https://api.fontsource.org/v1/fonts)
  • GET https://api.fontsource.org/v1/fonts?{query}

Response

The API response for the Fonts endpoint is an array of font objects. Each font object represents a specific font and provides detailed information about it.

Attributes:

Returns an array of:

AttributeTypeDescription
idstringThe font ID
familystringThe font family
subsetsstring[]Language subsets
weightsnumber[]Font weights
stylesstring[]Font styles
defSubsetstringDefault subset
variablebooleanIs the font variable
lastModifiedstringLast modified date
categorystringFont category
versionstringFont version
typestringFont type

Response example:

⬤⬤

[
{
"id": "abeezee",
"family": "ABeeZee",
"subsets": ["latin"],
"weights": [400],
"styles": ["italic", "normal"],
"defSubset": "latin",
"variable": false,
"lastModified": "2020-09-02",
"category": "sans-serif",
"version": "v14",
"type": "google"
}
...
]

json

Queries

The Fonts endpoint allows you to send queries to filter the list of fonts. Multiple queries can be combined using the & operator. Attributes in arrays can be separated using a comma separator , which acts as an AND operator.


You can include additional queries in the URL to filter the responses based on specific criteria. For example, api.fontsource.org/v1/fonts?subsets=latin,latin-ext&variable=true will return fonts that match subsets latin and latin-ext, as well as if it is a variable font.

Options

You can use the following queries to filter the list of fonts:

QueryTypeExample
idstringid=roboto
familystringfamily=Roboto
subsetsstringsubsets=latin,latin-ext
weightsnumber[]weights=100,900
stylesstring[]styles=normal,italic
defSubsetstringdefSubset=arabic
variablebooleanvariable=true
lastModifiedstringlastModified=2020-09-02
categorystringcategory=display
versionstringversion=v14
typestringtype=google

Example:

  • GET https://api.fontsource.org/v1/fonts?subsets=latin,latin-ext&variable=true
  • GET https://api.fontsource.org/v1/fonts?weights=400,900&styles=normal
  • GET https://api.fontsource.org/v1/fonts?lastModified=2022-09-22