API v3

https://api.plagium.com/300/document/create
ArgumentRequiredDescription
keyyesYour API Key
data.textyesText
data.titlenoDocument title
data.descriptionnoDocument description
data.authornoDocument author
data.keywordsnoDocument keywords
data.sourcenoScope of the search.
Possible values:
web: search over the web
file: compare with my documents
Default is: [“web”].
data.typenoSearch type. Possible values:
quick: for a quick search (only available with data.source=web)
deep: for a deep search
Default is: “deep”.
data.import_idnoThe id of your document for consolidation usage
data.min_ranknoMinimum amount percentage (0 to 100) of common meaningful words between two sentences.
Default is: 45.0.
data.min_relationnoMinimum similarity (0.0 to 1.0) between two sentences. Default is: 0.4.
data.webhook.urlnoThe webhook will make an HTTP POST request to your app with information about your search.
data.webhook.formatnoWebhook data format. Possible values:
simple: only send search and cost information
document: send information about document, search, and cost
Default is: simple.
data.webhook.metadatanoWebhook metadata. User data, can be anything JSON object. Metadata is returned with the webhook callback.
data.user_idnoSub account user id. If set, search will be processed under sub account user.
const http = require("http");

const options = {
    "method": "POST",
    "hostname": "https://api.plagium.com",
    "port": "3000",
    "path": "/300/document/create",
    "headers": {
        "Content-Type": "application/json",
    }
};

const req = http.request(options, function (res) {
    const chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function () {
        const body = Buffer.concat(chunks);
        console.log(body.toString());
    });
});

req.write(JSON.stringify({
        key: '[YOUR API KEY]',
        data: {
        text: 'While Wolfgang was young, his family made several European journeys in which he and Nannerl performed as child prodigies. These began with an exhibition in 1762 at the court of Prince-elector Maximilian III of Bavaria in Munich, and at the Imperial Courts in Vienna and Prague.',
        read: 'public'
    }
}));
req.end();

https://api.plagium.com/300/document/upload
ArgumentRequiredDescription
keyyesYour API Key
data.titlenoDocument title
data.descriptionnoDocument description
data.authornoDocument author
data.keywordsnoDocument keywords
data.sourcenoScope of the search.
Possible values:
web: search over the web
file: compare with my documents
Default is: [“web”].
data.typenoSearch type. Possible values:
quick: for a quick search (only available with data.source=web)
deep: for a deep search
Default is: “deep”.
data.import_idnoThe id of your document for consolidation usage
data.min_ranknoMinimum amount percentage (0 to 100) of common meaningful words between two sentences.
Default is: 45.0.
data.min_relationnoMinimum similarity (0.0 to 1.0) between two sentences. Default is: 0.4.
data.webhook.urlnoThe webhook will make an HTTP POST request to your app with information about your search.
data.webhook.formatnoWebhook data format. Possible values:
simple: only send search and cost information
document: send information about document, search, and cost
Default is: simple.
data.webhook.metadatanoWebhook metadata. User data, can be anything JSON object. Metadata is returned with the webhook callback.
data.user_idnoSub account user id. If set, search will be processed under sub account user.
const http = require("http");

const boundary = '011000010111000001101001';

const options = {
    "method": "POST",
    "hostname": "https://api.plagium.com",
    "port": "3000",
    "path": "/300/document/upload",
    "headers": {
        "Content-Type": `multipart/form-data; boundary=---${boundary}`,
    }
};

const req = http.request(options, function (res) {
    const chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function () {
        const body = Buffer.concat(chunks);
        console.log(body.toString());
    });
});

req.write(`-----${boundary}\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example.pdf\"\r\nContent-Type: application/pdf\r\n\r\n\r\n-----${boundary}\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\n{\n\t\"title\": \"Example of document\",\n\t\"read\": \"public\"\n}\r\n-----${boundary}\r\nContent-Disposition: form-data; name=\"key\"\r\n\r\n75B9C398F5B42A3229E1F9FFBAF63CCB4A0F5C981548834C962C4941DB3956880F781F951C78E8FF\r\n-----${boundary}--\r\n`);
req.end();
https://api.plagium.com/300/document/get
ArgumentRequiredDescription
keyyesYour API Key
data.idyesDocument ID GUID
data.user_idnoSub account user id
const http = require("http");

const options = {
    "method": "POST",
    "hostname": "https://api.plagium.com",
    "port": "3000",
    "path": "/300/document/get",
    "headers": {
        "Content-Type": "application/json",
    }
};

const req = http.request(options, function (res) {
    const chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function () {
        const body = Buffer.concat(chunks);
        console.log(body.toString());
    });
});

req.write(JSON.stringify({
    key: '[YOUR API KEY]',
    data: {
        id: '[DOCUMENT ID]',
    },
}));
req.end();
https://api.plagium.com/300/document/results
ArgumentRequiredDescription
keyyesYour API Key
data.idyesDocument ID GUID
data.user_idnoSub account user id
const http = require("http");

const options = {
    "method": "POST",
    "hostname": "https://api.plagium.com",
    "port": "3000",
    "path": "/300/document/results",
    "headers": {
        "Content-Type": "application/json",
    }
};

const req = http.request(options, function (res) {
    const chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function () {
        const body = Buffer.concat(chunks);
        console.log(body.toString());
    });
});

req.write(JSON.stringify({
    key: '[YOUR API KEY]',
    data: {id: '[DOCUMENT ID]'}
}));
req.end();
https://api.plagium.com/300/account/remaining_credits
ArgumentRequiredDescription
keyyesYour API Key
https://api.plagium.com/300/sub_account/list
ArgumentRequiredDescription
keyyesYour API Key
https://api.plagium.com/300/sub_account/create
ArgumentRequiredDescription
keyyesYour API Key
data.firstnamenoUser firstname
data.lastnamenoUser lastname
data.emailnoUser email, must be unique, if email already exists, will fail(a unique suffix is applied to the email when email is set)
data.usernamenoEmail or unique username, if not provided, a GUID is created.(a unique suffix is applied to the username when username is set)
data.passwordnoIf not provided, password is generated automatically
data.productyesProduct code provided by Plagium
https://api.plagium.com/300/sub_account/add_credit
ArgumentRequiredDescription
keyyesYour API Key
data.user_idyesUser ID GUID
data.productyesProduct code provided by Plagium
https://api.plagium.com/300/sub_account/remaining_credits
ArgumentRequiredDescription
keyyesYour API Key
data.user_idyesUser ID GUID
data.productyesProduct code provided by Plagium
https://api.plagium.com/300/search/quick
ArgumentRequiredDescription
keyyesYour API Key
data.textyesText to search
data.user_idnoUser ID GUID on behalf search should be done
data.productyesProduct code provided by Plagium
const http = require("http");

const options = {
  "method": "POST",
  "hostname": "https://api.plagium.com",
  "port": "3000",
  "path": "/300/search/quick",
  "headers": {
    "Content-Type": "application/json",
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  key: '[YOUR API KEY]',
  data: {
    text: 'Albert Einstein was a German-born theoretical physicist, widely acknowledged to be one of the greatest and most influential physicists of all time. Einstein is best known for developing the theory of relativity, but he also made important contributions to the development of the theory of quantum mechanics.'
  }
}));
req.end();
https://api.plagium.com/300/ai/check
ArgumentRequiredDescription
keyyesYour API Key
data.textyesText to search
data.user_idnoUser ID GUID on behalf search should be done
data.productyesProduct code provided by Plagium
const http = require("http");

const options = {
    "method": "POST",
    "hostname": "https://api.plagium.com",
    "port": "3000",
    "path": "/300/ai/check",
    "headers": {
        "Content-Type": "application/json",
    }
};

const req = http.request(options, function (res) {
    const chunks = [];

    res.on("data", function (chunk) {
    chunks.push(chunk);
    });

    res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
    });
});

req.write(JSON.stringify({
    key: '[YOUR API KEY]',
    data: {
    text: 'Albert Einstein was a German-born theoretical physicist, widely acknowledged to be one of the greatest and most influential physicists of all time. Einstein is best known for developing the theory of relativity, but he also made important contributions to the development of the theory of quantum mechanics.'
    }
}));
req.end();

Comment pouvons nous aider?