PlagiarismSearch API: Questions and Answers

API (Application programming interface) is a set of routines, protocols, and tools for building software applications. It is created to help organizations to check large amounts of text through their system. Our API gives the customers a unique opportunity to integrate our software into their own systems to make plagiarism check an automated process. Since the API integration requires specific knowledge and is usually completed by technical specialists, many questions arise about its particular features to ensure efficient operation. In the article we gathered the most popular questions-answers about our API performance, and solutions to the most frequent problems that our customers face during the process of integration.

Additionally, the API integration gives our clients an opportunity to take advantage of the personal Storage. Customers may upload their own archives into the Storage system and save the texts checked for plagiarism through our API, thus creating an individual Storage. Checking texts for plagiarism against the personal Storage allows our customers to detect and prevent self-plagiarism. Read more about the functionalities of the personal storage in our guide https://plagiarismsearch.com/plagiarism-database.html.

What features are available through the API?

  1. Checking texts and document for plagiarism
  2. Access to plagiarism reports (history of plagiarism checks)
  3. Ability to upload client’s database into the storage and view the documents in the storage
  4. Resellers have the opportunity to create multiple user accounts and assign them with appropriate number of submissions/words. These options will give the possibility for each referral to use his/her account independently.

How can I get access to the API?

You can have access to our API for free for 30 days. You will also have 100 submissions and personal Storage to test all the benefits of our service. Please register using this link to receive access to free API:

https://plagiarismsearch.com/account/signup.html?from=%2Faccount%2Fapi.html

After you register, go to My Profile - API Settings, and you will see API User and Key provided personally for your use. Also, you will need to use our API documentation (click on API documentation section https://plagiarismsearch.com/docs/ in Your Profile to view it). Provide access to the above information for your technical specialist to start using our API.

How Does the plagiarism check API work?

The scheme of our API operation is as follows:

  1. The user creates a report (by submitting a text, uploading a file, or a public URL) https://plagiarismsearch.com/docs/reports/create
  2. If your balance is active – your document is added for checking
  3. If you check 1000-3000 words at once, it can take 30-60 seconds; more words take slightly longer
  4. After checking the document, the user gets a`callback_url` POST request https://plagiarismsearch.com/docs/reports/callback-request
  5. The sample of the API usage at PHP https://plagiarismsearch.com/files/sample-api.zip

Does the API ensure automatic text verification in real time?

Yes, the plagiarism check process is performed in real time. It takes 1-5 minutes to check a text, the time of plagiarism check depends on the size of the text.

Is it possible to prepare and download reports through the API?

Yes, you can download PDF or HTML report right after plagiarism check is completed. All reports are stored in our database, so you can access them at any time and download https://plagiarismsearch.com/docs/reports/view

Is it possible to create my own report template?

No. We have 2 available report templates. You can only insert your company's logo into our report template.

Does the API enable specific parts of the text verification?

Yes, if you are talking about including or excluding references or citations, whitelisting particular URLs.

Is it possible to view the history of text checking through the API?

Yes, all reports are saved in your database.

Is it REST API or plugin? Is it synchronous or asynchronous?

We provide RESTful API. The access to our API documentation is here: https://plagiarismsearch.com/docs/

Our API is asynchronous. When the plagiarism check is finished, we send a web_hook to user callback_url.

https://plagiarismsearch.com/docs/reports/callback-request

Is there any instruction on how to implement the API?

A more elaborate scheme of API implementation is as follows:

  1. A more elaborate scheme of API implementation is as follows:
  2. Your text is being checked for some time and after the scanning process is complete, you will get callback_url notification
  3. Then you synchronize the report's data according to the previously remembered report ID

One of the examples can be found here: https://plagiarismsearch.com/docs/reports/view

You can additionally specify the parameter `show_relations` to get more data.

For instance,

const RELATIONS_SOURCES = -2;
const RELATIONS_RAW = -1;
const RELATIONS_NONE = 0; // default
const RELATIONS_TREE = 1;

  1. show_relations = -2 => return list of sources ordered by plagiarism percent
    see `data.sources` response field
  2. show_relations = 1 => return all report data. Paragraphs, sentences and sources with highlight text.
    see `data.paragraphs` response field
  3. show_relations = 1 => return all report data. Paragraphs, sentences and sources with highlight text.
    see `data.paragraphs` response field

Do scripts need to wait for the result of the plagiarism test or is there a call back function that can be called at a later time to get the document processing result?

There is a callback hook POST URL request that we connect to the user. You can also indicate your (custom) callback_url in the settings when you submit your document.

https://plagiarismsearch.com/docs/reports/create

https://plagiarismsearch.com/docs/reports/callback-request

The report can be downloaded in several formats:

https://plagiarismsearch.com/docs/reports/view (See "Response")

{
"status": true,
"code": 200,
"data": {
"file": "https://plagiarismsearch.com/reports/download/100500.html?
key=54fba6bc7d765cab653f2185a83284a6", // public pdf report URL
"link": "https://plagiarismsearch.com/reports/100500.html?
key=54fba6bc7d765cab653f2185a83284a6", // public html report URL
"files": [
{ // public EN pdf report URL version 3
"url": "https://plagiarismsearch.com/r/download/100500.html?
key=54fba6bc7d765cab653f2185a83284a6",
"type": "application/pdf",
"language": "en",
"version": 3
},
{ // public ES pdf report URL version 3
"url": "https://plagiarismsearch.com/es/r/download/100500.html?
key=54fba6bc7d765cab653f2185a83284a6",
"type": "application/pdf",
"language": "es",
"version": 3
},
{ // public PL pdf report URL version 3
"url": "https://plagiarismsearch.com/pl/r/download/100500.html?
key=54fba6bc7d765cab653f2185a83284a6",
"type": "application/pdf",
"language": "pl",
"version": 3
},
{ // public EN pdf report URL version 1 (current)
"url": "https://plagiarismsearch.com/reports/download/100500.html?
key=54fba6bc7d765cab653f2185a83284a6",
"type": "application/pdf",
"language": "en",
"version": 1
}
]
}
}

How do I get a HTML report?

Here are the instructions to receive HTML report:

https://plagiarismsearch.com/docs/reports/view

There are 3 possible variants of HTML reports:

  1. https://plagiarismsearch.com/reports/100500.html?key=65jdgjhh7h452hjkh45k7535h24267f1
  2. https://plagiarismsearch.com/r/100500.html?key=65jdgjhh7h452hjkh45k7535h24267f1
  3. https://plagiarismsearch.com/reports/lite/100500.html?key=65jdgjhh7h452hjkh45k7535h24267f1

I am not able to find endpoints/details on how to generate access tokens.

The token will be in your account after you'll register

https://plagiarismsearch.com/account/api.html

It is necessary to transmit it using Authentication HTTP basic.

Php with CURL

// HTTP basic authentication

curl_setopt($curl, CURLOPT_USERPWD, $apiUser . ':' . $apiKey);

I would like to attach the files in DOCX, PDF and PPT to check. Is it possible?

You can attach files in multiple formats:

https://plagiarismsearch.com/docs/reports/create

file string Or upload file for check.

Besides, you can send files with name 'file'

For example:

curl -F 'file=@/home/petehouston/hello.txt' https://plagiarismsearch.com/api/v3/reports/create

How can I get the list of URLs where text was found?

You must use show_relations=1 or if you need only sources (links => percent of plagiarism) or call route (POST method) https://plagiarismsearch.com/api/v3/reports/sources/{reportId} (not documented now) and use data.sources field

How can I exclude my URL from this list?

How can I exclude my URL from this list?

a) POST['url'] = 'https://wikipedia.org' or

b) POST['source'] = {source.id} (for example data.sources[0].id (integer)) or

c) array of skipped urls

POST['urls'][] = 'https://wikipedia.org'

POST['urls'][] = 'https://plagiarismsearch.com'

array of skipped source ids

POST['sources'][] = {source.id} ;

POST['sources'][] = {source.id2} ;

If you call route twice - URLs will be included again, influencing the general percentage of plagiarism

For a more transparent usage, it’s better to use routes with the same parameters as were described above.

https://plagiarismsearch.com/api/v3/reports/exclude/{reportId}

https://plagiarismsearch.com/api/v3/reports/include/{reportId}

We also plan to complete a feature set that would allow excluding URL here: https://plagiarismsearch.com/api/v3/reports/create

How can I recalculate plagiarism percentage after exclusion?

The response to the request will include the general (altered) percentage of plagiarism data.plagiat

What are "filter_references" & "filter_quotes" good for?

filter_references=1 => exclude references. References text has no weight on total plagiarism percent

filter_quotes=1 => exclude in-text citation. Citation text has no weight on total plagiarism percent. Citation markers are

array('«', '»'),
array('"', '"'),
array('“', '”'),
array('《', '》'),
array('〈', '〉'),
array('{*', '*}'),

Is there a way to implement the API via CURL?

Here are the guidelines, which could ease your CURL implementation.

  1. Upload document for plagiarism check https://plagiarismsearch.com/docs/reports/create

curl --location --request POST 'https://plagiarismsearch.com/api/v3/reports/create' \
--header 'Authorization: Basic your_user_key_combination==' \
--form 'search_web="1"' \
--form 'search_storage="1"' \
--form 'file=@"test_file_plagiarism.txt"'

  1. View report https://plagiarismsearch.com/docs/reports/view

curl --location --request GET 'https://plagiarismsearch.com/api/v3/reports/3520470' \
--header 'Authorization: Basic your_user_key _combination=='

curl 1

curl 2

Why does the document have “Pending” status in Storage?

The document usually stays in Pending status not for a long time, from 0 to 6 minutes after it has been uploaded or reuploaded.

The document is instantly added to the Search index.

You can also check it in the program's code: if 6 minutes passed, the document has Active status.

It is possible to find out the document status using such a method:

GET https://plagiarismsearch.com//api/v3/storage/{id}

Field

data.is_in_index

How to upload documents to the storage via API?

You can upload your documents via API:

POST https://plagiarismsearch.com/api/v3/storage/create

with parameters, which are similar to https://plagiarismsearch.com/docs/reports/create

Upload to storage

Alternatively, you can upload documents in a list or an archive using the form https://plagiarismsearch.com/storage/upload.html

What are the possibilities of a reseller account? How do I integrate it in my own system?

The functionalities offered by our reseller account are:

  1. Each new user must be created through the API (you will need login and password to create each user account)
  2. You will have the opportunity to give out a particular number of words for each user through the reseller account.

These options will give the possibility for each client to use his/her account independently, and you will be able to add words necessary for every user

Technical documentation necessary for integration:

Create customer ( Customer email is required field)

curl --location --request POST 'https://plagiarismsearch.com/api/v3/reseller-customers/create' \
--header 'Authorization: Basic
gbEIYW62rGl0DFBnmTRpbC6hJ206hYpnNEniZu6eTLOp6HkgKIl568G9hgfTygl63TO49DQ=' \
--form 'email="testusermail@gmail.com"' \
--form 'name="User Name"' \
--form 'password="123456"'

Response

{
"status": true,
"code": 200,
"data": {
"id": 26784,
"email": "testusermail@gmail.com",
"name": "User Name",
"status": "active",
"password": "123456"
},
"version": "3.0.0"
}

List of customers

curl --location --request GET 'https://plagiarismsearch.com/api/v3/reseller-customers' \ --header 'Authorization: Basic
gbEIYW62rGl0DFBnmTRpbC6hJ206hYpnNEniZu6eTLOp6HkgKIl568G9hgfTygl63TO49DQ='

Show balances

GET https://plagiarismsearch.com/api/v3/reseller-customers/balance

Get your balance

 

GET https://plagiarismsearch.com/api/v3/reseller-customers/balance/{userId}

Get userId balance

Balance Response

{ "status": true, "code": 200, "data": { "is_solvable": true, "700": { "type": "Words", "amount": 6001, "expired": 1878542044, "is_valid": true, "is_solvable": true }, "300": { "type": "Submissions", "amount": 4, "expired": 1720878480, "is_valid": true, "is_solvable": true } }, "version": "3.0.0" }

Pay to customer balance (#26784 - customer id)

You can use `words` or `submissions` field

1 submissions = 1000 words

curl --location --request POST 'https://plagiarismsearch.com/api/v3/reseller-customers/pay/26784' \
--header 'Authorization: Basic gbEIYW62rGl0DFBnmTRpbC6hJ206hYpnNEniZu6eTLOp6HkgKIl568G9hgfTygl63TO49DQ=' \
--header 'Cookie: PHPSESSID=ctnjp41vvu3h11jssrdavnnmfq9tdkib' \
--form 'words="100"'
{
"status": true,
"code": 200,
"data": {
"payment_id": 1171,
"amount": 100,
"type": "Words"
},
"version": "3.0.0"
}

Error: 400 Bad Request

Request Method: PUT

Status Code: 400 Bad Request

Response: No instances available for plagiarismsearch.com

Plagiarism API used: https://plagiarismsearch.com/api/v3/reports/create

Sollution:

The customer should use POST Http method (not PUT) like on the screenshot

400 Bad Request

There is an authentication error while I am running the /report on GET using request module on Python.

You have to send the data regarding the authentication upon each new request.

We use Basic Authentication, such as

https://docs.python-requests.org/en/master/user/authentication/

from requests.auth import HTTPBasicAuth
>>> requests.get(' https://plagiarismsearch.com/api/v3/reports/{id}', auth=HTTPBasicAuth('apiUser', 'apiKey'))
Php using CURL
// HTTP basic authentication
curl_setopt($curl, CURLOPT_USERPWD, $apiUser . ':' . $apiKey);