Plate Scanner
An API that will allow you to detect vehicle license plates in photos and scanned documents.
Plate scanner detects vehicle license plates in images such as photographs and scanned documents. Plate Scanner's OCR technology specifically focused on license plate detection provides accurate results even under adverse imaging conditions.
API connection
Server and protocols involved.
Server: | https://zpk.systems |
---|---|
Scheme: | HTTPS, secure connections only. |
Protocol: |
JSON recommended
Sending a JSON in the request body, and specifying a Content-Type: application/json header in the request Files should be sent encoded as a base64 string. Form-Data not recommended
Format used in web forms, not recommended. When sending a form_data request you can send all the fields separately. However if the request is very large we recommend that you send the content of the request in a single text field called _json (with an underscore). This special parameter will be processed by our backend as if it were a regular JSON request. |
The server to send the requests to is https://zpk.systems, using a secure HTTPS connection.
The recommended communication type is JSON, in which case we will specify in the connection a Content-Type: application/json, and we will send the request body as a valid JSON string.
Endpoint & Parameters
Parameter | Description |
---|---|
application_id |
string required An application id. You can get the id of an application by clicking on 'details' in your panel |
api_key |
string required The API KEY of the application that makes the call to this API, you can obtain it in your panel, by clicking on the 'details' button of an application |
image |
file required The image that will be scanned to detect license plates. |
regions |
array optional A list of regions to be used as a guide to detect license plate. Specifying the region can be useful when the scanned license plate may be from different countries or geographic areas. Obtaining all regionsYou can get a list of all supported regions via the api. See: obtaining regions |
strict_regions |
boolean optional: false by default If strict_regions is set to true, the regions array will be used strictly. Discarding all license plates that are not from the specified regions in case of doubt. |
Responses
Success response
{
"success": true,
"results": {
"plate": "6765zzz",
"region": "es",
"score": 0.902,
"coords": {
"top_left": {
"x": 35,
"y": 177
},
"bottom_right": {
"x": 490,
"y": 339
}
}
},
"costs": {
"total_cost": 0.001
}
}
Error response
{
"success": false,
"errors": [
{
"id": "MISSING_REQUIRED_PARAMETER",
"message": "Required parameter 'image' not sent",
"on": "image"
}
]
}
Obtaining all regions
You can get all the regions and sub-regions (provinces or states) with a call to the following endpoint
Parameter | Description |
---|---|
application_id |
string required An application id. You can get the id of an application by clicking on 'details' in your panel |
api_key |
string required The API KEY of the application that makes the call to this API, you can obtain it in your panel, by clicking on the 'details' button of an application |
A list will be returned containing all the regions and subregions
{
"success": true,
"regions": {
"am": {
"name": "Armenia",
"code": "am"
},
"aw": {
"name": "Aruba",
"code": "aw"
},
"au": {
"name": "Australia",
"code": "au",
"subregions": {
"au-act": {
"code": "au-act",
"name": "Australian Capital Territory"
},
"au-nsw": {
"code": "au-nsw",
"name": "New South Wales"
},
"au-qld": {
"code": "au-qld",
"name": "Queensland"
},
"au-sa": {
"code": "au-sa",
"name": "South Australia"
},
"au-tas": {
"code": "au-tas",
"name": "Tasmania"
},
"au-vic": {
"code": "au-vic",
"name": "Victoria"
},
"au-wa": {
"code": "au-wa",
"name": "Western Australia"
}
}
},
"at": {
"name": "Austria",
"code": "at"
},
"az": {
"name": "Azerbaijan",
"code": "az"
},
"bs": {
"name": "Bahamas",
"code": "bs"
},
"bb": {
"name": "Barbados",
"code": "bb"
},
"by": {
"name": "Belarus",
"code": "by"
},
"...": {
"name": "... More regions here ...",
"code": "..."
}
}
}
PHP Integration
ZPK-PHP is an open source composer-installable library that will allow you to integrate our APIs into your PHP project with minimal effort.
Go to PHP SDKInstalling ZPK-PHP with composer
composer require zpksystems/phpzpk
PHP example scan
<?php
require 'vendor/autoload.php';
use zpksystems\phpzpk\zpkApplication;
use zpksystems\phpzpk\zpkPlateScanner;
$app = new zpkApplication('app_id','key');
$scanner = new zpkPlateScanner( $app );
// Add an image
$scanner->setImageFile('plate.png');
echo json_encode($scanner->scan(),
JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE);
Pricing
If you do not have credit in your account when making a request, the VinOCR API will return an error.