API v1: identify fonts from image

Legacy API documentation. API v1 is retired and no longer available. Please migrate to API v2.

API v1: identify fonts from image

Legacy API for font matching: search similar fonts by a known font name, or submit an image and get up to 10 results. JSON in, JSON out.

Endpoint
https://www.whatfontis.com/api/
Method
GET
Results
limit=1..10
Minimal request
https://www.whatfontis.com/api/?file=path_to_file.json&limit=2
Note: v1 expects a JSON file hosted at a public URL (the file= parameter). If you can, use API v2 for a simpler POST + Base64 flow.

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.


logo whatfontis 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.


Rate Limit

By default, you can make up to 50 requests per day. Requests are associated with the API key, and not with your IP address.


Error Handling

If an error occurs, a response with proper 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

Search for Fonts

URL
GET https://www.whatfontis.com/api/?file=path_to_file.json&limit=2

Parameters

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

Example 1

Retrieving fonts similar to ABRIL FATFACE:

Request
https://www.whatfontis.com/api/?file=path_to_file.json&limit=2

Input file path_to_file.json for this request:

JSON
{
  "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" }
      ]
    }
  }
}

Parameters for file

API_KEY (required) str Your API key Please login to see your API key here.
TITLE (required) str Font title you are looking for
letter (required) - max 8 chars str Accepted values: a-z A-Z 0-9 $ ? & % @
Size: 1 char
url (required) str URL path to an image with the char

Response Example 1

Response for this request:

JSON
[
  {
    "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 keyDescription
titleFont title
urlFont page on WhatFontIs.com
imageFont image example from WhatFontIs.com

Submit an image

URL
GET https://www.whatfontis.com/api/?file=path_to_file.json&limit=2

Parameters

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

Example 2

Retrieving fonts similar to an image:

Request
https://www.whatfontis.com/api/?file=path_to_file.json&limit=2

Input file path_to_file.json for this request:

JSON
{
  "FONT": {
    "API_KEY": "xxxxxxxxxxxxxxxxxxxxxxxxxx",
    "P": "1",
    "F": "0",
    "INFO": {
      "urlimage": "https://www.whatfontis.com/api/img/A.png"
    }
  }
}

Parameters for file

API_KEY (required) str Your API key Please login to see your API key here.
P (required) int Accepted values: 1
F (required) int Accepted values: 0,1
0 - display the letters found
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 Example 2

Response for this request:

JSON
{
  "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 keyDescription
API_KEY Your API key
TITLE Font title or a unique id
letters[].letter Detected character (max 8 chars in JSON input)
letters[].url URL path to an image with the char

Support

Request full API access to increase the rate limit.

Contact us if you have any questions about the API.



What Font Is the best font finder for you!