https://api.plagium.com/300/document/create
Argument | Required | Description |
---|---|---|
key | yes | Your API Key |
data.text | yes | Text |
data.title | no | Document title |
data.description | no | Document description |
data.author | no | Document author |
data.keywords | no | Document keywords |
data.source | no | Scope of the search. Possible values: – web: search over the web – file: compare with my documents Default is: [“web”]. |
data.type | no | Search type. Possible values: – quick: for a quick search (only available with data.source=web) – deep: for a deep search Default is: “deep”. |
data.import_id | no | The id of your document for consolidation usage |
data.min_rank | no | Minimum amount percentage (0 to 100) of common meaningful words between two sentences. Default is: 45.0. |
data.min_relation | no | Minimum similarity (0.0 to 1.0) between two sentences. Default is: 0.4. |
data.webhook.url | no | The webhook will make an HTTP POST request to your app with information about your search. |
data.webhook.format | no | Webhook data format. Possible values: – simple: only send search and cost information – document: send information about document, search, and cost Default is: simple. |
data.webhook.metadata | no | Webhook metadata. User data, can be anything JSON object. Metadata is returned with the webhook callback. |
data.user_id | no | Sub 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
Argument | Required | Description |
---|---|---|
key | yes | Your API Key |
data.title | no | Document title |
data.description | no | Document description |
data.author | no | Document author |
data.keywords | no | Document keywords |
data.source | no | Scope of the search. Possible values: – web: search over the web – file: compare with my documents Default is: [“web”]. |
data.type | no | Search type. Possible values: – quick: for a quick search (only available with data.source=web) – deep: for a deep search Default is: “deep”. |
data.import_id | no | The id of your document for consolidation usage |
data.min_rank | no | Minimum amount percentage (0 to 100) of common meaningful words between two sentences. Default is: 45.0. |
data.min_relation | no | Minimum similarity (0.0 to 1.0) between two sentences. Default is: 0.4. |
data.webhook.url | no | The webhook will make an HTTP POST request to your app with information about your search. |
data.webhook.format | no | Webhook data format. Possible values: – simple: only send search and cost information – document: send information about document, search, and cost Default is: simple. |
data.webhook.metadata | no | Webhook metadata. User data, can be anything JSON object. Metadata is returned with the webhook callback. |
data.user_id | no | Sub 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
Argument | Required | Description |
---|---|---|
key | yes | Your API Key |
data.id | yes | Document ID GUID |
data.user_id | no | Sub 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
Argument | Required | Description |
---|---|---|
key | yes | Your API Key |
data.id | yes | Document ID GUID |
data.user_id | no | Sub 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
Argument | Required | Description |
---|---|---|
key | yes | Your API Key |
https://api.plagium.com/300/sub_account/list
Argument | Required | Description |
---|---|---|
key | yes | Your API Key |
https://api.plagium.com/300/sub_account/create
Argument | Required | Description |
---|---|---|
key | yes | Your API Key |
data.firstname | no | User firstname |
data.lastname | no | User lastname |
data.email | no | User email, must be unique, if email already exists, will fail(a unique suffix is applied to the email when email is set) |
data.username | no | Email or unique username, if not provided, a GUID is created.(a unique suffix is applied to the username when username is set) |
data.password | no | If not provided, password is generated automatically |
data.product | yes | Product code provided by Plagium |
https://api.plagium.com/300/sub_account/add_credit
Argument | Required | Description |
---|---|---|
key | yes | Your API Key |
data.user_id | yes | User ID GUID |
data.product | yes | Product code provided by Plagium |
https://api.plagium.com/300/sub_account/remaining_credits
Argument | Required | Description |
---|---|---|
key | yes | Your API Key |
data.user_id | yes | User ID GUID |
data.product | yes | Product code provided by Plagium |
https://api.plagium.com/300/search/quick
Argument | Required | Description |
---|---|---|
key | yes | Your API Key |
| yes | Text to search |
| no | User ID GUID on behalf search should be done |
data.product | yes | Product 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
Argument | Required | Description |
---|---|---|
key | yes | Your API Key |
| yes | Text to search |
| no | User ID GUID on behalf search should be done |
data.product | yes | Product 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();