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:
- Send the request with the text (taken from your URL) to check; in response, you will get a unique hash-code.
- To get the check progress, send check status requests at stated intervals using the received hash-code.
- 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 | ||
Parameters | Description | Example |
url | web page address (required) | http://34.238.42.154 |
Results | Description | Example |
hash | unique hash-code | becd22a50d3a457edd42f6f37cbe81fe |
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 | ||
Parameters | Description | Example |
text | text to be checked (required) | In this technological age, a plagiarism checker is essential for protecting your written work… |
Results | Description | Example |
hash | unique hash-code | becd22a50d3a457edd42f6f37cbe81fe |
File Check Request
To send text files for checking, use addFileForChecking method.
Method: addFileForChecking | ||
Parameters | Description | Example |
file_path | Local path to the file on your server (required) | c:\mydocs\textexample.txt (for Windows) |
Results | Description | Example |
hash | unique hash-code | becd22a50d3a457edd42f6f37cbe81fe |
Request the Status of Your Check
To get the checking status for particular text, use getTextStatus method.
Method: getTextStatus | ||
Parameters | Description | Example |
hash | unique hash-code of the text (required) | becd22a50d3a457edd42f6f37cbe81fe |
Results | Description | Example |
number from 0 to 100 | percentage of completion, if 100 – the check is complete | 42 |
Getting Results
To get the result report of duplicate content checking request, use getResult method.
Method: getResult | ||
Parameters | Description | Example |
hash | unique hash-code of the text (required) | becd22a50d3a457edd42f6f37cbe81fe |
Results | Description | Example |
array of n-grams with list of duplicate sources | results are in JSON format | see Check result data format |
To get the percentage of the duplicate content, use getPlagiarismPercent method.
Method: getPlagiarismPercent | ||
Parameters | Description | Example |
hash | unique hash-code of the text (required) | becd22a50d3a457edd42f6f37cbe81fe |
Results | Description | Example |
number from 0 to 100 | % of duplicate content | 33 |
To get the checking results with the quotations from search engines, use getResultWithQuotes method.
Method: getResultWithQuotes | ||
Parameters | Description | Example |
hash | unique hash-code of the text (required) | becd22a50d3a457edd42f6f37cbe81fe |
Results | Description | Example |
array of n-grams with list of duplicate sources and quotations | results are array mapped in JSON format | see 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:
Name | Description | Example |
“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:
Name | Description | Example |
“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:
Name | Description | Example |
“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 getResult, getPlagiarismPercent 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;