How to make a request
Once you have the bearer token, you can send requests to the API using any programming language that can send HTTP requests. The base URL for all endpoints is https://api.monotype.com/v1.
Here are some examples:
curl -X GET "https://api.monotype.com/v1/fonts" \
--header "Authorization: Bearer $MONOTYPE_API_TOKEN"
$MONOTYPE_API_TOKEN: Put your OAuth token in this variable
How to pass parameters when calling the APIs
You can pass parameters to the API and filter based on the specific values. For instance, “classification” is one of the attributes that accepts one of these values:
“GEOMETRIC_SANS, SANS_SERIF, SLAB_SERIF, SERIF, SQUARE_SERIF, SYMBOL, MODERN_SERIF, NEOCLASSICAL, TRANSITIONAL_SERIF, INFORMAL_SCRIPT, SCRIPT, HUMANIST_SANS, FORMAL_SCRIPT, GROTESQUE_SANS, ITALIAN_OLD_STYLE SERIF, OLD_STYLE_SERIF, GLYPHIC, FRENCH_OLD_STYLE SERIF, CLARENDON_SERIF, BLACKLETTER, DUTCH_OLD_STYLE_SERIF, DISPLAY”
You can pass the parameter, as in this example:
curl -X GET "https://api.monotype.com/v1/fonts" \
--header "Authorization: Bearer $MONOTYPE_API_TOKEN" \
-G \
--data-urlencode "classification=SERIF"
$MONOTYPE_API_TOKEN: Put your OAuth token in this variable
Understanding the response
The API returns information in JSON format. Most programming languages have libraries that can accept and manipulate JSON data. In most cases, the API returns an array of “Fonts” objects with the details of the fonts. You also receive the metadata information, such as paging information, total number of results, and page size.
Here is an example of a response for a specific font family, passing the family name ("Alliance") as a parameter to filter the fonts by family:
curl -X GET "https://api.monotype.com/v1/fonts" \
--header "Authorization: Bearer $MONOTYPE_API_TOKEN" \
-G \
--data-urlencode "family=Alliance"
$MONOTYPE_API_TOKEN: Put your OAuth token in this variable
{
"fonts": [
{
"name": "Alliance No.1 Light",
"foundryId": 3358,
"foundry": "Degarism Studio",
"familyId": 26501,
"family": "Alliance",
"styleId": 113588,
"style": "Light",
"format": "OT-CFF",
"fileName": "AllianceNo.1-Light.otf",
"fontId": "705ca166e49679c8a48d795ec03b6bf0",
"classification": [
"GROTESQUE_SANS",
"SANS_SERIF"
],
"slope": "NORMAL",
"weight": "LIGHT",
"width": "NORMAL",
"design": "",
"weightCSS": 300,
"singleFamilyStyle": 0,
"sample": "https://sig.monotype.com/render/456/font/705ca166e49679c8a48d795ec03b6bf0?rt=Alliance+No.1+Light"
},
{
"name": "Alliance No.2 Light",
"foundryId": 3358,
"foundry": "Degarism Studio",
"familyId": 26501,
"family": "Alliance",
"styleId": 114908,
"style": "Light",
"format": "OT-CFF",
"fileName": "AllianceNo.2-Light.otf",
"fontId": "99d5e963b8ef4629144b347a034f89f4",
"classification": [
"GROTESQUE_SANS",
"SANS_SERIF"
],
"slope": "NORMAL",
"weight": "LIGHT",
"width": "NORMAL",
"design": "",
"weightCSS": 300,
"singleFamilyStyle": 0,
"sample": "https://sig.monotype.com/render/456/font/99d5e963b8ef4629144b347a034f89f4?rt=Alliance+No.2+Light"
}
],
"pageNumber": 1,
"itemCount": 2,
"pageSize": 10,
"total": 2
}
How to fetch details for specific fonts
Here is an example of code demonstrating how to use a separate API endpoint to retrieve detailed information about specific fonts. In this example, we fetch details on a font named "Alliance No. 2 Light":
curl -X GET https://api.monotype.com/v1/fonts/99d5e963b8ef4629144b347a034f89f4 --header "Authorization: Bearer $MONOTYPE_API_TOKEN"
{
"font": {
"name": "Alliance No.2 Light",
"foundryId": 3358,
"foundry": "Degarism Studio",
"familyId": 26501,
"family": "Alliance",
"styleId": 114908,
"style": "Light",
"format": "OT-CFF",
"fileName": "AllianceNo.2-Light.otf",
"fontId": "99d5e963b8ef4629144b347a034f89f4",
"classification": [
"GROTESQUE_SANS",
"SANS_SERIF"
],
"slope": "NORMAL",
"weight": "LIGHT",
"width": "NORMAL",
"design": "",
"weightCSS": 300,
"singleFamilyStyle": 0,
"sample": "https://sig.monotype.com/render/456/font/99d5e963b8ef4629144b347a034f89f4?rt=Alliance+No.2+Light"
}
}
More details about the API can be found on this page.
Developer support
If you are a developer building with Monotype APIs, the answers to most questions can be found here.
If you can't find an answer to your question in the docs, please contact us at [email protected].