NAV Navbar
shell ruby python

Introduction

Welcome to the Plate recognizer API! You can use our API to access our API endpoints, which can read license plates from images.

We have multiple language bindings. You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

Authentication

Platerecognizer.com uses API keys to allow access to the API. You can register a new API key.

Platerecognizer.com expects for the API key to be included in all API requests to the server in a header that looks like the following:

Authorization: Token API_TOKEN

Plate Recognizer

Read number plates from an image

# gem install multipart-post
require 'net/http/post/multipart'

url = URI.parse('https://platerecognizer.com/plate-reader/')
path = '/path/to/car.jpg'
File.open(path) do |jpg|
  req = Net::HTTP::Post::Multipart.new url.path,
    "upload" => UploadIO.new(jpg, "image/jpeg", path)
  req['Authorization'] = 'Token API_TOKEN'
  res = Net::HTTP.start(url.host, url.port, use_ssl: true) do |http|
    http.request(req)
  end
end
# pip install requests
import requests
from pprint import pprint

with open('/path/to/car.jpg', 'rb') as fp:
    response = requests.post(
        'https://platerecognizer.com/plate-reader/',
        files=dict(upload=fp),
        headers={'Authorization': 'Token API_TOKEN'})
pprint(response.json())

curl -F 'upload=@/path/to/car.jpg' \
  -H 'Authorization: Token API_TOKEN' \
  https://platerecognizer.com/plate-reader/

The above command returns JSON structured like this:

[
  {
    "box": {
      "xmin": 159,
      "ymin": 169,
      "ymax": 194,
      "xmax": 203
    },
    "plate": "abc123",
    "score": 0.868,
    "dscore": 0.718
  }
]

This endpoint reads all license plates from an image.

HTTP Request

POST https://platerecognizer.com/plate-reader/

Query Parameters

Parameter Description
upload The file to be uploaded

Errors

Error Code Meaning
403 Forbidden -- Your API key is wrong.
413 Payload Too Large response status code indicates that the request entity is larger than limits defined by our server. See upload limits.