Developer's API

Thanks for checking out the API for DuplicateCheck.net. This API enables developers to use our plagiarism detection software on their own sites.

This API enables you to make HTTP POST requests to our server.

What's Required To Get Started?

  1. A server capable of making POST request.
  2. A programmer capable of writing a program that can use our API.
  3. The ability to read and understand JSON (our method of response).

Getting Started

To use our API you need to have an account, have an API key (available in "My Account"), and at least one token.

Address to access the API is: http://duplicatecheck.net/api/

Example function in PHP accessing the API

<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://duplicatecheck.net/api/");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, true);

$data = array(
'key' => 'API KEY HERE',
'request' => 'check',
'ip' => $_SERVER['REMOTE_ADDR'],
'text' => 'The time is right to buy a new laptop computer.'
);

curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$output = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);

$r = json_decode($output);
echo "<pre>";
print_r($r);

API Functions

To get a "success" response from our server every request needs the following POSTed variables: "request" and "key" in addition to the other variables required for the request.

"request" = The name of the requested function (ie "check")

"key" = The valid API key for your account

Request: "check"

Required variables: "request", "key", "ip", and "text" (without quotes)

"ip" = IP address of the sender. This is required for the Google search API

"text" = The text you would like to check for duplicate content. It cannot be more than 1000 words

Response

When you get a response from the server it will be in JSON format.

If the status is "success" and the response is blank that indicates that there was no duplicate content detected.



Copyright 2010 | Draanor | Contact Us