BOOK A DEMO
LOGIN
Homekeyboard_arrow_rightDocumentationkeyboard_arrow_rightVersion 3keyboard_arrow_rightEducationkeyboard_arrow_rightSubmit a file OCR
PUT

/v3/education/submit/ocr/{scanId}

Scan images with textual content to find where the content has been used before and check its originality. Using submit-ocr you can scan various image file types for plagiarism and identify infringed content. Only the textual content in the picture will be scanned and not the graphics. See supported formats.

lock You need to login with a user and api key in order to access this method.
Add this HTTP header to your request:
Authorization: Bearer <Your-Login-Token>
Not sure how to generate your login token? Read here.

For integration testing purposes, use sandbox mode - for free.

Request

URL Parameters

Name
Description
scanId REQUIRED
A unique scan id provided by you.

We recommend you use the same id in your database to represent the scan in the Copyleaks database. This will help you to debug incidents.

Using the same ID for the same file will help you to avoid network problems that may lead to multiple scans for the same file.

String
Length: 3-36 characters.

Allowed characters are [a-zA-Z0-9] and the following symobols: [email protected]$^&-+%=_(){}<>';:/.",~`|

Body Parameters

Name
Description
base64 REQUIRED
A base64 data string of a file. If you would like to scan plain text, encode it as base64 and submit it.
String
Example: aGVsbG8gd29ybGQ=
filename REQUIRED
The name of the file as it will appear in the Copyleaks scan report Make sure to include the right extension for your filetype.
String
Example: image.jpg Max length: 255 characters.
langCode REQUIRED
The language code of your content. The selected language should be on the OCR supported languages list.
String
Example: en
properties.webhooks.status REQUIRED
This webhook event is triggered once the scan status changes.

Use the special token {STATUS} to track the current scan status. This special token will automatically be replaced by the Copyleaks servers with the optional values: completed, error, creditsChecked and indexed.

Read more about webhooks.

String (uri)
Example: https://yoursite.com/webhook/{STATUS}

Request Example

cURL
RAW
Python
C#
Node.js
PHP
PUT https://api.copyleaks.com/v3/education/submit/ocr/my-custom-id

Content-Type: application/json;
Authorization: Bearer YOUR-LOGIN-TOKEN;

{
  "base64": "YOUR BASE64 HERE",
  "filename": "image.jpg",
  "langCode": "en",
  "properties": {
    "action": 0,
    "includeHtml": false,
    "developerPayload": "Custom developer payload",
    "sandbox": true,
    "expiration": 480,
    "author": {
      "id": "Author id"
    },
    "webhooks": {
      "newResult": "https://yoursite.com/webhook/new-result",
      "status": "https://yoursite.com/webhook/{STATUS}/my-custom-id"
    },
    "filters": {
      "identicalEnabled": true,
      "minorChangesEnabled": true,
      "relatedMeaningEnabled": true,
      "minCopiedWords": 10,
      "safeSearch": false,
      "domains": [
        "www.example.com"
      ],
      "domainsMode": 1
    },
    "scanning": {
      "internet": true
    },
    "exclude": {
      "quotes": false,
      "titles": false,
      "htmlTemplate": false
    },
    "sensitivityLevel": 3
  }
}
			

Response

Codes

Status Code
Description
Example
201
The scan was Created.
400
Bad request.
{
  "properties.webhooks.status": [
    "The field is required."
  ]
}
401
Unauthorized

Authorization has been denied for this request.

409
A scan with the same Id already exists in the system.
429
Too many requests. The request was rejected.

This method has a maximum call limit of 12 calls within 15 minutes.

Other resources:

  • Performance ConsiderationsImportant! - How to improve your scan performance.
  • Exponential Backoff - Algorithm that helps applications define a retry strategy for consuming a network service.
  • Technical Specifications - See API's limits and supported formats.
stack-overflow_icon.png

Do you have a technical question?

Use stackoverflow.com to get help from our development team and other Copyleaks users.

Ask a Question

PRODUCTS

Education
Businesses
Pricing
Copyleaks.com

RESOURCES

Help Center
Documentation
Plagiarism Report
System Status
Security

ABOUT

About us
Careers
Terms of Use
Privacy Policy
Sitemap

Copyleaks Technologies, LTD.

700 Canal St.
Stamford, CT 06902 USA

[email protected]

Copyleaks Technologies LTD. All rights reserved. Use of this website signifies your agreement to the Terms of Use.