Noplag API Access

Noplag’s API (Application Programming Interface) makes it possible to integrate Noplag Plagiarism checker into your Website, Admin or any other Application where you need to check your files or text for similarities. Webmasters and Developers can write scripts on your server that will post request to Noplag and receive results in the form of JSON script. To view Plagiarism Report within your application you can use iFrame. To request access, please contact support or submit Request Access form on this page.

Using the API

To begin using the API, you need to write a script that will send data to the server and receive a response.

To send data to a server you need to write Ajax.

You will need to send the following information:

Parameter Explanation Value Required?
"api_secret_token" Your API secret key secret_npdnwle12qwe12 Yes
"sources" Select one or more sources to check your text. Values separated by a coma. internet, database, publication, library Yes
"data" Here you should enter your text or upload your files to transfer. (text/file(s)) Yes

Here is an example of the Post Request:

                        
                        {
                            'api_secret_token' : 'secret_npdnwle12qwe12',
                            'sources' : 'internet, database, publication, library',
                            'data' : (files/texts)
                        }
                        
                    

You may only send one type of the data: file(s) or text.

URL Search Request

To check for similarities in your file(s) or text via the Noplag API, send an HTTP POST request to this URL:

Example: https://api.noplag.com/v1/text

In order to receive results from the Noplag API, please make sure the following steps are set and ready:

  1. Your Current Balance - Before sending the API data, make sure that your account balance is sufficient for the operation. Otherwise, you will get the following error "Your balance is too low to check the file(s)".
  2. API Secret Token - This unique key will allow you to use the Noplag API. In order to receive the secret token, please sign with Noplag and fill out this form to request for the API. (Noplag account email address, Company, Website or Institution Name, please, explain your needs for API? )

After sending your files, or text, everything will pass in 3 stages:

  1. First, you will get the status of conversion of your files/text;
  2. Second, the system will check your balance. If it is less important for the successful execution of testing, then you get an error.
  3. Finally, you will get the check status of your material at the specified resources.

Monitoring conversion status.

You can get the following conversion statuses:

Status name Explanation
Queued Text has been placed in the queue for checking.
Converting Your text is converting at the moment.
Finished Your text has been successfully converted.
Failed Failure to check the text. Please contact support or try again.

Monitoring checking status.

You can get the following check statuses:

Status name Explanation
Queued Text has been placed in the queue for checking.
Internet Text has been successfully checked via Web.
Database Text has been successfully checked via Database.
Publication Text has been successfully checked via Publications.
Library Text has been successfully checked via Library.
Finished Text has been successfully checked via all chosen sources.
Failed Failure to check the text. Please contact support or try again.
  • For the most comfortable and quick check on the status of the text by the user server using sockets.
  • In the code example above, has written a small script to get the information from the socket server.
  • By default given the following options on client side:
  • 'maxRetries': 10 // The number of attempts to connect to the server socket.
  • 'retryDelay': 10000 // The time interval between attempts to connect.

Receiving data from the server

The server response returns JSON script with results of the check.

Conversion

Parameter Value Type Explanation
"api_secret_token" secret_abc123def456 text Your API secret key
"stage" conversion text Shows the stage at which is the file on the server.
"status" queued/converting/finished/failed text Shows the status of the file at this stage.
"amountPages" 1 integer Shows the number of pages in the document.
"wordsAmount" 274 integer Shows the number of words in the document.
"characters" 1551 integer Shows the number of characters in the document.
"conversionError" null null/text Shows the text of the error conversion. If there is no error, then it will be null.
"textId" 11 integer The ID of your text.
"title" Warcraft null/text The title of your document.
"uploadedBy" Larry Page text It displays the name of the owner of the secret token.

An example of server response during conversion

                        
                            {
                                'secret_token' : "secret_abc123def456",
                                'amountPages' : 2,
                                'characters' : 1551,
                                'conversionError' : null,
                                'stage' : "conversion",
                                'status' : "finished",
                                'textId' : 11,
                                'title' : "Warcraft",
                                'uploadedBy' : "Larry  Page",
                                'wordsAmount' : 274
                            }
                        
                    

Checking

Parameter Value Type Explanation
"api_secret_token" secret_abc123def456 text Your API secret key
"stage" checking text Shows the stage at which to be a file on the server.
"status" queued/internet/database/publication/library/finished/failed text Shows the status of the file at this stage.
"textId" 11 integer The ID of your text.

An example of server response during checking

                        
                            {
                                'secret_token' : "secret_abc123def456"
                                'stage' : "checking"
                                'status' : "internet"
                                'text_id' : 11
                            }
                        
                    

When the scan is completed, you will get the following answer:

                        
                            {
                                'secret_token' : "secret_abc123def456",
                                'stage' : "checking",
                                'status' : "finished",
                                'language' : "en",
                                'matches' : 51,
                                'pagesAmount' : 2,
                                'report_link' : "http://co.noplag.local/reports/shared?k=eyJpdiI6IkZUaWpFNmV4ZXhvamRoMW9oR0RoVHc9PS
                                IsInZhbHVlIjoiU2g0TFlNTzI4cFRNam12aG1jN0NHS3lHSzVYWXRyWGdOZ2x5...",
                                'similarityPercent' : 100,
                                'text_id' : 11
                            }
                        
                    

Example that demonstrates how to use the API

Download Example

Important! In example, there is the following line of code:

                        
                            var secret_token = 'secret_abc123def456';   // Insert your secret token here
                        
                    
Be sure to enter your secret token here. Thanks to him, you will be able to connect by the socket and receive data in your browser.

Handling errors

Checking balance

Parameter Value Type Explanation
"error" Darn! Your balance is too low to check the file(s) text The error message. The balance in your account is not enough for a successful operation.
"api_secret_token" secret_abc123def456 text Your API secret key
"stage" checking text Shows the stage at which to be a file on the server.
"status" queued/internet/database/publication/library/finished/failed text Shows the status of the file at this stage.
"textId" 11 integer The ID of your text.

If your account balance is less than required for successful verification of documents, then you get the following response:

                        
                            {
                                'error' : "Darn! Your balance is too low to check the file(s)",
                                'secret_token' : "secret_abc123def456",
                                'stage' : "checking_balance",
                                'status' : "failed",
                                'textId' : 11
                            }
                        
                    
Status code Description
422 The check failed because of a conversion error. Most likely the input file is corrupt or some parameters are wrong. "Message" contains the error description.
503 The conversion failed because there is currently no conversion host available or the conversion host had an internal error.

How to view the report within your website or admin:

If you want tp view the report within your website or admin, you can use iframe and display the report on your site.

Here is an example of how it will look:

Request API Access

Have you also experienced what it means to have a plagiarized content on the website?

The Application Programming Interface (API) from Noplag.uk is used for quick plagiarism detection thanks to the most powerful methods and the biggest number of functions offered in the today’s app market. If you also got exhausted because of numerous problems that are consequences of plagiarized texts, opt for Noplag.uk API.

It is a useful thing for application development process as well as can be installed to the third-party CMS for it to be completely secured from not unique texts – choose a suitable alternative exactly for you. There is one great benefit you will receive undoubtedly – a comprehensive plagiarism checker of every text with a detailed report that can be easily integrated and used.

Wait a moment...