NAV Navbar
shell ruby python javascript

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 API is only available to registered users. You first have to register and get an API key. It has to be included in all API calls. The HTTP headers must contain:

Authorization: Token API_TOKEN

License Plate Recognition

Read number plates from an image

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

url = URI.parse('https://platerecognizer.com/api/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/api/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/api/plate-reader/
const fetch = require('node-fetch');
const FormData = require('form-data');
const fs = require('fs');

let image_path = '/path/to/car.jpg'
let body = new FormData();
body.append('upload', fs.createReadStream(image_path));

fetch("https://platerecognizer.com/api/plate-reader/", {
        method: 'POST',
        headers: {
            "Authorization": "Token API_TOKEN"
        },
        body: body
    }).then(res => res.json())
    .then(json => console.log(json))
    .catch((err) => {
        console.log(err);
    });

Return value

[
  {
    "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/api/plate-reader/

Query Parameters

Parameter Description
upload The file to be uploaded

Statistics

Get number of recognition calls done during the current month.

HTTP Request

GET https://platerecognizer.com/api/statistics/

curl -H 'Authorization: Token API_TOKEN' \
  https://platerecognizer.com/api/statistics/

Return value

{
  "usage": {
    "month": 1,
    "calls": 128,
    "year": 2019
  },
  "total_calls": 2500
}

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.