Welcome to the WhatFontis.com API documentation - API identify fonts from image.
WhatFontIs is the largest independent font detector in the world, helping designers (famous or not) to identify a font regardless of the foundry it was published or the license (free or commercial).
We'd like to open the possibility of using 8 years of experience to incorporate that knowledge and experience into your own projects.
You can do it in two ways : A: Search for font alternatives (similar fonts) based on a font name you already know, or B: submit an image and get a list of 10 most similar fonts.
The API expects as input a JSON file and also returns a JSON formatted response.
The API is free for personal use, contact us for commercial use. If you use it for personal purposes we expect (and require) you to include a link to Whatfontis.com on your website.
So... start reading and building.
WhatFontIs.com If you make use of the API a link to WhatFontis.com is required and you may use our logo for this purpose.
The API returns JSON-encoded objects. Hash keys and values are case-sensitive and character encoding is in UTF-8. Hash keys may be returned in any random order and new keys may be added at any time. We will do our best to notify our users before removing hash keys from results or adding required parameters.
By default, you can make up to 50 requests per day. Requests are associated with the API key, and not with your IP address.
If an error occurs, a response with propper HTTP error status code is returned. The body of this response contains a description of the issue in plain text.
For example, once you go over the rate limit you will receive an HTTP error 429 ("Too Many Requests") with the message "API rate limit exceeded".
Errors:
HTTP error 429 Too Many Requests
HTTP error 409 No api key
HTTP error 422 Save image Error
HTTP error 422 Max 8 chars in json
HTTP error 422 No chars found
HTTP error 422 Internal server error
HTTP error 422 Server MYSQL error
HTTP error 422 Server Error
HTTP error 422 No chars found
file (required) | str | A URL path to a file with font name and chars information json encoded; |
---|---|---|
limit | int |
Determine the number of results.
Accepted values: 1 - 10 Default: 2 |
Retrieving fonts similar to ABRIL FATFACE:
Input file path_to_file.json for this request:
{ "FONT": { "API_KEY": "xxxxxxxxxxxxxxxxxxxxxxxxxx", "INFO": { "TITLE": "ABRIL FATFACE", "letters": [ { "letter": "A", "url": "https://www.whatfontis.com/api/img/A.png" }, { "letter": "B", "url": "https://www.whatfontis.com/api/img/B.png" }, { "letter": "C", "url": "https://www.whatfontis.com/api/img/C.png" }, { "letter": "D", "url": "https://www.whatfontis.com/api/img/D.png" }, { "letter": "E", "url": "https://www.whatfontis.com/api/img/E.png" }, { "letter": "F", "url": "https://www.whatfontis.com/api/img/F.png" } ] } } }
API_KEY (required) | str | Your API key Please login to see your API key here. Login | Sign up |
---|---|---|
TITLE (required) | str | Font title you are looking for; |
letter(required) - max 8 chars in json | str |
Accepted values: a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 $ ? & % @
Size 1 char |
url(required) | str | Url path to an image with the char |
Response for this request:
[ { "title":"Abril Fatface", "url":"https://www.whatfontis.com/FF_Abril-Fatface.font", "image":"https://www.whatfontis.com/img16/A/B/FF_Abril-FatfaceA.png" }, { "title":"Abril Fatface", "url":"https://www.whatfontis.com/NMY_Abril-Fatface.font", "image":"https://www.whatfontis.com/img16/A/B/NMY_Abril-FatfaceA.png" } ]
Response key | Description |
---|---|
title | Font title |
url | Font page on WhatFontIs.com |
image | Font image example from WhatFontIs.com |
file (required) | str | A URL path to a file with font name and chars information json encoded; |
---|---|---|
limit | int |
Determine the number of results.
Accepted values: 1 - 10 Default: 2 |
Retrieving fonts similar to an image:
Input file path_to_file.json for this request:
{ "FONT": { "API_KEY": "xxxxxxxxxxxxxxxxxxxxxxxxxx", "P": "1", "F": "0", "INFO": { "urlimage": "https://www.whatfontis.com/api/img/A.png" } } }
API_KEY (required) | str | Your API key Please login to see your API key here. Login | Sign up |
---|---|---|
P (required) | int | Accepted values: 1 |
F (required) | int |
Accepted values: 0,1 0 - display the letters found and letters 1 - try to recognize the letters and display the results If we can't recognize minimum one letter error results; |
urlimage(required) | str | Url path to an image |
Response for this request:
{ "FONT":{ "API_KEY":"xxxxxxxxxxxxxxxxxxxxxxxxxx", "INFO":{ "urlimage":"https://www.whatfontis.com/api/img/A.png", "TITLE":"9e305ea99a58b9b23d5c76174889f8", "letters":[ { "letter":"A", "url":"https://d1ly52g9wjvbd2.cloudfront.net/tmp1/9e305ea99a58b9b23d5c76174889f8-1.png" } ] } } }
Response key | Description | |
---|---|---|
API_KEY (required) | str | Your API key Please login to see your API key here. Login | Sign up |
TITLE (required) | str | Font title or a unique id; |
letter(required) - max 8 chars in json | str |
Accepted values: a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 $ ? & % @
Size 1 char |
url(required) | str | Url path to an image with the char |
Request full API access to increase the rate limit.
Contact us if you have any questions about the API.