Skip to content

Copyleaks detects online plagiarism and checks content distribution. Use Copyleaks to find out if textual content is original and if it has been used online. This example in NodeJs shows how to integrate with the Copyleaks cloud to search for copyright infringement.

Notifications You must be signed in to change notification settings

Israel4Ever/NodeJS-Plagiarism-Checker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Copyleaks NodeJs SDK

Copyleaks SDK enables you to scan text for plagiarism and detect content distribution online, using the Copyleaks plagiarism checker cloud.

Using Copyleaks SDK you can check for plagiarism in:

Integration

Integrate with the Copyleaks SDK in one of two options:

  • Recommended: Use the Package Manager - NPM.
    When integrating that way you will automatically be able to update the SDK to its latest version:
    npm i plagiarism-checker
    
    Following that, in order to use the SDK, add this to your code:
    var CopyleaksCloud = require('plagiarism-checker');
    var clCloud = new CopyleaksCloud();
    var config = clCloud.getConfig();
    
  • Download the code from this repository and add it to your project.

Register and Get Your API Key

To use the Copyleaks API you need to first be a registered user. The registration to Copyleaks takes a minute and is free of charge. Signup and make sure to confirm your account.

As a signed user you can generate your personal API key. Do so on your dashboard (Businesses dashboard/Academic dashboard/Websites dashboard) under 'Access Keys'.

For more information check out our API guide.

Example

local_tests.js will show you how to check for plagiarism in the URL: 'https://www.copyleaks.com'. All you have to do is to update the following two lines with your email and API key:

var email = 'YOUR-EMAIL';
var apikey = 'YOUR-API-KEY';

This example shows how to scan a URL using the following code:

 clCloud.createByURL(url,_customHeaders,function(resp,err){
    	//check if we have credits
    	if(resp && resp.ProcessId){
    		console.log('API: create-by-url');
    		console.log('Process has been created: '+resp.ProcessId);
    	}
    }); </pre>

You can change 'createByURL' with 'createByFile' to scan local files:

  clCloud.createByFile(_file,_customHeaders,function(resp,err){
	    	//check if we have credits
	    	if(resp && resp.ProcessId){
	    		console.log('API: create-by-file');
	    		console.log('Process has been created: '+resp.ProcessId);
	    	}
	    }); 

or with 'createByOCR to scan local images containing text:

 clCloud.createByFileOCR(_ocrFile,_customHeaders,language,function(resp,err){
    	//check if we have credits
    	if(resp && resp.ProcessId){
    		console.log('API: create-by-file-ocr');
    		console.log('Process has been created: '+resp.ProcessId);
    	}
    });</pre>

Read More

About

Copyleaks detects online plagiarism and checks content distribution. Use Copyleaks to find out if textual content is original and if it has been used online. This example in NodeJs shows how to integrate with the Copyleaks cloud to search for copyright infringement.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%