API to identify fonts from image

Endpoint
https://www.whatfontis.com/api2/
Method
POST
Format
JSON
Minimal request (curl)
curl -X POST "https://www.whatfontis.com/api2/" 
  -H "Content-Type: application/x-www-form-urlencoded" 
  --data-urlencode "API_KEY=YOUR_KEY" 
  --data-urlencode "IMAGEBASE64=0" 
  --data-urlencode "urlimage=https://www.whatfontis.com/img16/A/B/FF_Abril-FatfaceA.png" 
  --data-urlencode "limit=5"

Welcome to the WhatFontis.com API 2.0 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 13 years of experience to incorporate that knowledge and experience into your own projects.

You can do it by submitting an image and getting a list of up to 20 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 200 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 420 Api ERROR - The API is down
  • HTTP error 409 No API key - Include the API key in the JSON payload
  • HTTP error 429 Too Many Requests - You are limited to 200 requests per day
  • HTTP error 422 MySQL Server Error - There was an error with MySQL
  • HTTP error 422 Save Image Error - The image cannot be saved
  • HTTP error 4221 Image Type Error - This image type is not yet supported
  • HTTP error 4222 Image Size Error - The image is too large
  • HTTP error 4223 Textbox Error - No text box detected
  • HTTP error 422 No Characters Found - No characters detected in your image. If characters touch or overlap, please separate them.
  • HTTP error 422 Server Error - Unknown error

Example

Retrieving fonts using a simple image:

URL STRUCTURE

https://www.whatfontis.com/api2/
METHOD: POST

Parameters

API_KEY (required) str Your API key Please login to see your API key here.
IMAGEBASE64 int Accepted values: 0,1
0 - Use the urlimage
1 - Use the urlimagebase64, which contains the Base64-encoded image
NOTTEXTBOXSDETECTION int Accepted values: 0,1
0 - Attempt to locate a textbox containing text.
1 - Attempt to search for characters throughout the entire image.
FREEFONTS int Accepted values: 0,1
0 - All fonts in results
1 - Only free fonts in results
urlimage str Url path to an image
urlimagebase64 str The Base64-encoded image
limit int Determine the number of results.
Accepted values: 1 - 20
Default: 2

Response Example 1

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":"Didonesque Bold",
    "url":"https://www.whatfontis.com/NMY_Didonesque-Bold.font",
    "image":"https://www.whatfontis.com/img16/D/I/NMY_Didonesque-BoldA.png"
  }
]
Response keyDescription
titleFont title
urlFont page on WhatFontIs.com
imageFont image example from WhatFontIs.com

Good Examples

Good example: Grace
Grace
Good example: Lettering
Lettering
Good example: Days
Days
Good example: good weather
good weather

Bad Examples

Bad example: Mama
The characters are not separated
Bad examples to use when finding the font Mama
Bad example: Thick
The characters are not separated
Bad examples to use when finding the font Thick

Support

Request full API access to increase the rate limit.

Contact us if you have any questions about the API.

API v1 information



What Font Is the best font finder for you!