API

The PlagSpotter API (Application Programming Interface) allows web developers to check URLs or offline text for originality or duplicate content that is posted on the web.

Programmers can write their server-side scripts that query the PlagSpotter service and receive output results in XML or HTML formats.

To get an idea of how our duplicate content detection and monitoring service works, try out one of our subscription plans.

To use our duplicate content detection API as well as get the required documentation and support, please email: api@plagspotter.com.

How to Use Our API

To use our API service, download the API client script which you can run on your server to send texts/URLs for checking.

Our Checking Process:

  1. Send the request with the text (taken from your URL) to check; in response, you will get a unique hash-code.
  2. To get the check progress, send check status requests at stated intervals using the received hash-code.
  3. Once the check is completed, send getResult request to receive the results.

Receiving API Access

We can manually setup your free API account. You will be provided with a username and password as well as the API client file. Testing the API is free with our sample text but any other text/URLs won’t be checked without the money in your account. After you deposit the money in your account to buy API calls, you can start using the API to check any text/URLs you’d like.

API Client Functions

URL Check Request

To send the URL for checking, use addURLForChecking method.

Method: addURLForChecking
ParametersDescriptionExample
urlweb page address (required)http://34.238.42.154
ResultsDescriptionExample
hashunique hash-codebecd22a50d3a457edd42f6f37cbe81fe

Code Example

include_once(‘API-client.php’);

$api = new \Plagtool\Rest\V2\Client(‘demo@demo.com’, ‘pass’);

$result = $api->addURLForChecking(‘http://site.com/page-1/’);

Text Check Request

To send texts for checking, use addTextForChecking method.

Method: addTextForChecking
ParametersDescriptionExample
texttext to be checked (required)In this technological age, a plagiarism checker is essential for protecting your written work…
ResultsDescriptionExample
hashunique hash-codebecd22a50d3a457edd42f6f37cbe81fe

File Check Request

To send text files for checking, use addFileForChecking method.

Method: addFileForChecking
ParametersDescriptionExample
file_pathLocal path to the file on your server (required)c:\mydocs\textexample.txt (for Windows)
ResultsDescriptionExample
hashunique hash-codebecd22a50d3a457edd42f6f37cbe81fe

Request the Status of Your Check

To get the checking status for particular text, use getTextStatus method.

Method: getTextStatus
ParametersDescriptionExample
hashunique hash-code of the text (required)becd22a50d3a457edd42f6f37cbe81fe
ResultsDescriptionExample
number from 0 to 100percentage of completion, if 100 – the check is complete42

Getting Results

To get the result report of duplicate content checking request, use getResult method.

Method: getResult
ParametersDescriptionExample
hashunique hash-code of the text (required)becd22a50d3a457edd42f6f37cbe81fe
ResultsDescriptionExample
array of n-grams with list of duplicate sourcesresults are in JSON formatsee Check result data format

To get the percentage of the duplicate content, use getPlagiarismPercent method.

Method: getPlagiarismPercent
ParametersDescriptionExample
hashunique hash-code of the text (required)becd22a50d3a457edd42f6f37cbe81fe
ResultsDescriptionExample
number from 0 to 100% of duplicate content33

To get the checking results with the quotations from search engines, use getResultWithQuotes method.

Method: getResultWithQuotes
ParametersDescriptionExample
hashunique hash-code of the text (required)becd22a50d3a457edd42f6f37cbe81fe
ResultsDescriptionExample
array of n-grams with list of duplicate sources and quotationsresults are array mapped in JSON formatsee Check result data format

Here is an example of the query for sending the text for checking:

$client = new Client(‘login’, ‘password’);

$client->addTextForChecking($text);

$result = $client->getResponse();

API Response Format

All results received by the API client have the same JSON format with the following elements:

NameDescriptionExample
“data”actual method response data (can include JSON subelements)“becd22a50d3a457edd42f6f37cbe81fe”
“message”contains error messages if an error appears. See list of error messages.“Wrong login or password”
“status”http response code. See list of response codes.403

The whole response may look like:

{ “data”: null,

“message”: “Wrong login or password”

“status”: 403}

Check Results Data Format

The “data” element for getResult method includes arrays of additional sub-elements described below:

NameDescriptionExample
“text”part of text, which was searched and might have duplicates“guarantees that anything you write can be thoroughly checked by our online plagiarism software”
“links”array of links for duplicate sources[“http:\/\/www.plagspotter.com\/”,”http:\/\/www.ideasforteachers.org\/teacher-resources.html”,”http:\/\/www.seocert.net\/analyzer.plagtracker.com”]

Example of results response:

{ “data”: [

{“text”: “guarantees that anything you write can be thoroughly checked by our online plagiarism software”,

“links”: [“http:\/\/www.plagspotter.com\/”,”http:\/\/www.ideasforteachers.org\/teacher-resources.html”,”http:\/\/www.seocert.net\/analyzer.plagtracker.com”]},

{“text”: “to ensure that your texts are unique”,

“links”: [“http:\/\/100kresources.com\/miscellaneous-everything-else\/”, “http:\/\/www.ideasforteachers.org\/teacher-resources.html”, “https:\/\/edshelf.com\/tool\/plagtracker”]}],

“message”: “”,

“status”: 200}

For getResultWithQuotes method, the “data” element has different set of sub-elements:

NameDescriptionExample
“text”part of text, which was searched and might have duplicates“guarantees that anything you write can be thoroughly checked by our online plagiarism software”
“links”array of links and quotes
“link”link for duplicate source“http:\/\/www.plagspotter.com\/”
“quote”the quotation from search engine“Our detector guarantees that anything you write can be thoroughly checked by our online plagiarism software to ensure that your texts are unique. The process …”

An example of the result response:

{ “data”:[

{“text”:”guarantees that anything you write can be thoroughly checked by our online plagiarism software”,

“links”:[{“link”:”http:\/\/www.plagspotter.com\/”,”quote”: “Our detector guarantees that anything you write can be thoroughly checked by our online plagiarism software to ensure that your texts are unique. The process …”},

{“link”:”http:\/\/www.ideasforteachers.org\/teacher-resources.html”,”quote”:” Our detector guarantees that anything you write can be thoroughly checked by our online plagiarism software to ensure that your texts are unique. The process …”},

{“link”:”http:\/\/www.seocert.net\/analyzer.plagtracker.com”,”quote”:” Our detector guarantees that anything you write can be thoroughly checked by our online plagiarism software to ensure that your texts are …”}]}],

“message”: “”,

“status”: 200}

*NOTE: Receiving results using getResultgetPlagiarismPercent cannot be done until your text is completely checked. The status is determined by the getTextStatus query.

Error Messages

  • ‘Wrong login or password’ 
  • ‘URL not found’
  • ‘Https have to be used’ 
  • ‘Add text error’
  • ‘Text not found’ 
  • ‘Text is not checked yet’  
  • ‘Limit of checks at the same time is exceeded’ 
  • ‘Wrong subscription type’ 
  • ‘Limit of checks is exceeded’ 
  • ‘Subscription is not active’

Http Response Codes

  • OK = 200;
  • UNAUTHORIZED = 401;
  • FORBIDDEN = 403;
  • NOT_FOUND = 404;
  • INTERNAL_SERVER_ERROR = 500;
  • SERVICE_UNAVAILABLE = 503;