API v2

https://api.plagium.com/v2/document
ArgumentoRequeridoDescripción
keySu clave API
passwordnoSu contraseña API si está configurada
data.textTexto
data.titlenoTitulo del documento
data.descriptionnoDescripción del documento
data.authornoAutor del documento
data.keywordsnoPalabras clave del documento
data.sourcenoAlcance de la búsqueda.
Valores posibles:
web: buscar en la web
file: comparar con mis documentos
El valor predeterminado es: [“web”].
data.typenoTipo de búsqueda. Valores posibles:
quick: para una búsqueda rápida (sólo disponible con data.source=web)
deep: para una búsqueda profunda
El valor predeterminado es: “deep”.
data.url_filternoDominio o URL que se excluirán de los resultados separados por espacios o avance de línea.
data.import_idnoLa identificación de su documento para uso de consolidación.
data.min_ranknoPorcentaje de cantidad mínima (0 a 100) de palabras significativas comunes entre dos oraciones.
El valor predeterminado es: 45.0.
data.min_relationnoSimilitud mínima (0,0 a 1,0) entre dos frases. El valor predeterminado es: 0.4.
data.webhook.urlnoEl webhook realizará una solicitud HTTP POST a su aplicación con información sobre su búsqueda.
data.webhook.formatnoWebhook data format. Possible values:
simple: enviar solo información de búsqueda y costos
document: envía información sobre documento, búsqueda y costo
El valor predeterminado es: simple.
data.webhook.metadatanoMetadatos de webhook. Los datos del usuario pueden ser cualquier objeto JSON. Los metadatos se devuelven con la devolución de llamada del webhook.
var request = require('request');

var body={
key:"YOUR API KEY",
data: {
    title:"Abraham Lincoln",
    text:"Abraham Lincoln was an American statesman and lawyer who served as the 16th President of the United States from March 1861 until his assassination in April 1865. Lincoln led the United States through the American Civil War—its bloodiest war and perhaps its greatest moral, constitutional, and political crisis.",
    import_id:"YOUR DOCUMENT ID",
    source:["web","file"],
    url_filter:"en.wikipedia.org\nfr.wikipedia.org/wiki/Thomas_Edison",
    read:"private",
    webhook: {
        url:"https://your_app_webhook_address",
        format:"document",
        metadata:{
            my_metadata:{}
        }
    }
}
};
            
request.post("https://api.plagium.com/v2/document", { json: true, body: body },
function(err, res, body) {
    if (err) console.error(err);
    else {
        console.log(body.obj._id);
    }
});

Use body.obj._id for future references.

{
"data": {
    "key": "YOUR API KEY",
    "type": "document",
    "data": {
    "import_id": "YOUR DOCUMENT ID",
    "text": "Abraham Lincoln was an American statesman and lawyer who served as the 16th President of the United States from March 1861 until his assassination in April 1865. Lincoln led the United States through the American Civil War—its bloodiest war and perhaps its greatest moral, constitutional, and political crisis.",
    "min_rank": 40,
    "min_relation": 0.33,
    "webhook": {
        "url": "https://your_app_webhook_address",
        "format": "document"
        } 
    }
},
"obj": {
    "_id": "12345678-1234-1234-1234-12345678",
    "obj": {
        "import_id": "YOUR DOCUMENT ID",
        "active": true,
        "data": {
            "profile": {
                "title": "Abraham Lincoln"
            },
            "privacy": {
                "read": "private"
            },
            "search": {
                "status": "waiting",
                "type": "deep",
                "source": ["web"],
                "from": "text",
                "text": "Abraham Lincoln was an American statesman and lawyer who served as the 16th President of the United States from March 1861 until his assassination in April 1865. Lincoln led the United States through the American Civil War—its bloodiest war and perhaps its greatest moral, constitutional, and political crisis.",
                "similarity": {
                    "min_relation": 0.33,
                    "min_rank": 40
                },
                "webhook": {
                    "url":"https://your_app_webhook_address",
                    "format":"document"
                },
                "version": 0
            },
            "urls": {
                "edit": "https://premium.plagium.com/admin/en/documents/id/12345678-1234-1234-1234-12345678",
                "report": "https://premium.plagium.com/admin/en/report/id/12345678-1234-1234-1234-12345678",
                "print": "https://premium.plagium.com/admin/en/print/report/12345678-1234-1234-1234-12345678"
            }
        },
        "type": "document",
        "rights": {
            "ownedby": "aaaaaaaa-aaaa-aaaa-aaaaaaaa,
            "createdby": "api",
            "created": 1554848878747,
            "modifiedby": "api",
            "modified": 1554848878747
        }
    }
},
"api": {
    "version": "2.0.5",
    "name": "api",
    "date": 1554848938125
}
}
{
"obj": {
    "_id": "12345678-1234-1234-1234-12345678",
    "obj": {
        "data": {
            "stats": {
                "time": {
                    "parse": 0,
                    "compare": 1350,
                    "search": 440,
                    "sort": 0,
                    "pct": 2,
                    "total": 1665,
                    "download": 319
                },
                "proximity": {
                    "sentence": 0,
                    "score": {
                        "document": 80,
                        "page": 80,
                        "paragraph": 80,
                        "sentence": 80
                    },
                    "page": 100,
                    "document": {
                        "pct_length": 100,
                        "pct_selected_queries": 100,
                        "pct_selected": 100,
                        "pct": 100,
                        "pct_selected_length": 100,
                        "pct_queries": 100
                    },
                    "paragraph": 100
                },
                "results": {
                    "kept": 5,
                    "downloaded": 8,
                    "found": 8
                },
                "steps": {
                    "search": 1,
                    "compare": 1,
                    "download": 1
                },
                "download_round": 1,
                "processor_version": 13,
                "compare_completed": true,
                "download_completed": true,
                "search_round": 1,
                "compare_round": 0,
                "search_completed": true
            },
            "file": {
                "key": "fcf52ae0-5b39-11e9-bb64-ad0e064387d9"
            },
            "search": {
                "version": 0,
                "similarity": { "min_relation": 0.33, "min_rank": 40 },
                "source": ["web"],
                "status_pct": null,
                "status_updated": 1554870223885,
                "from": "text",
                "text": "Abraham Lincoln was an American statesman and lawyer who served as the 16th President of the United States from March 1861 until his assassination in April 1865. Lincoln led the United States through the American Civil War—its bloodiest war and perhaps its greatest moral, constitutional, and political crisis.",
                "type": "deep",
                "webhook": {
                    "url":"https://your_app_webhook_address",
                    "format": "document"
                }
                "status": "ready"
            },
            "privacy": { "read": "private" },
            "profile": { 
                "title": "Abraham Lincoln" 
            },
            "urls": {
                "edit": "https://premium.plagium.com/admin/en/documents/id/12345678-1234-1234-1234-12345678",
                "report": "https://premium.plagium.com/admin/en/report/id/12345678-1234-1234-1234-12345678",
                "print": "https://premium.plagium.com/admin/en/print/report/12345678-1234-1234-1234-12345678"
            }
        },
        "rights": {
            "created": 1554864020611,
            "modifiedby": "lambda",
            "modified": 1554870223885,
            "createdby": "api",
            "ownedby": "aaaaaaaa-aaaa-aaaa-aaaaaaaa"
        },
        "active": true,
        "import_id": "my_import_id",
        "type": "document"
    }
},
"search": {
    "_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx",
    "obj": {
        "data": {
            "obj_id": "12345678-1234-1234-1234-12345678",
            "obj_type": "document",
            "obj_import_id": "my_import_id",
            "search": {
                "status": "ready",
                "type": "deep",
                "source": ["web"],
                "precision": 90,
                "similarity": {
                    "min_rank": 40,
                    "min_relation": 0.33
                }
            },
            "cost": {
                "size": 33,
                "length_queries": 32,
                "nb_sentences": 1,
                "nb_searchable_sentences": 1,
                "nb_queries": 1,
                "length_selected_queries": 32,
                "nb_selected_queries": 1,
                "nb_pages": 1,
                "nb_words": 5
            },
            "payment": {
                "no_credit": false,
                "no_charge": false,
                "charge_parent": false,
                "documents": 0,
                "pages": 0,
                "words": 0,
                "characters": 0,
                "currency": {
                    "usd": 0.08,
                    "eur": 0,
                    "brl": 0,
                    "mxn": 0,
                    "inr": 0
                },
                "need": {
                    "usd": 0.08,
                    "eur": 0.07,
                    "brl": 0.22,
                    "mxn": 0,
                    "inr": 4
                }
            },
            "stats": {
                "processor_version": 13,
                "search_completed": true,
                "search_round": 1,
                "download_completed": true,
                "download_round": 1,
                "compare_completed": true,
                "compare_round": 0,
                "results": {
                    "found": 8,
                    "kept": 5,
                    "downloaded": 8
                },
                "proximity": {
                    "document": {
                        "pct_queries": 100,
                        "pct_length": 100,
                        "pct": 100,
                        "pct_selected_queries": 100,
                        "pct_selected_length": 100,
                        "pct_selected": 100
                    },
                    "score": {
                        "document": 80,
                        "page": 80,
                        "paragraph": 80,
                        "sentence": 80
                    },
                    "page": 100,
                    "paragraph": 100,
                    "sentence": 0
                },
                "time": {
                    "total": 6619,
                    "parse": 0,
                    "search": 1674,
                    "sort": 0,
                    "pct": 2,
                    "download": 2614,
                    "compare": 2735
                },
                "steps": {
                    "search": 1,
                    "download": 1,
                    "compare": 1
                }
            }
        },
        "type": "search",
        "active": true,
        "rights": {
            "ownedby": "aaaaaaaa-aaaa-aaaa-aaaaaaaa",
            "createdby": "lambda",
            "created": 1554870330685,
            "modifiedby": "lambda",
            "modified": 1554870330685
        }
    }
}
}
https://api.plagium.com/v2/results
ArgumentoRequeridoDescripción
keySu clave API.
passwordnoSu contraseña de API, si está configurada.
data.idLa identificación de su documento: el _id campo.
var request = require('request');

var body={
key:"YOUR API KEY",
data: {
    id:"DOCUMENT ID"
}
};
            
request.post("https://api.plagium.com/v2/results", { json: true, body: body },
function(err, res, body) {
    if (err) console.error(err);
    else {
        if (body.results) {
            for (var r of body.results) {
                console.log(r.result.title);
                console.log(r.result.url);
                console.log(r.score);
            }
        }
    }
});
{
"data": {
    "key": "YOUR API KEY",
    "type": "results",
    "data": {
        "id": "12345678-1234-1234-1234-12345678"
    }
},
"obj": {
    "_id": "12345678-1234-1234-1234-12345678",
    "obj": {
        "data": {
            "stats": {
                "time": {
                    "parse": 0,
                    "compare": 8506,
                    "search": 81,
                    "sort": 0,
                    "pct": 0,
                    "total": 5220,
                    "download": 571
                },
                "proximity": {
                    "sentence": 0,
                    "score": {
                        "document": 100,
                        "page": 100,
                        "paragraph": 100,
                        "sentence": 100
                    },
                    "page": 100,
                    "document": {
                        "pct_length": 100,
                        "pct_selected_queries": 100,
                        "pct_selected": 100,
                        "pct": 100,
                        "pct_selected_length": 100,
                        "pct_queries": 100
                    },
                    "paragraph": 100
                },
                "results": {
                    "kept": 26,
                    "downloaded": 36,
                    "found": 36
                },
                "steps": {
                    "search": 1,
                    "compare": 1,
                    "download": 1
                },
                "download_round": 1,
                "processor_version": 13,
                "compare_completed": true,
                "download_completed": true,
                "search_round": 1,
                "compare_round": 0,
                "search_completed": true
            },
            "payment": {
                "pages": 0,
                "words": 0,
                "documents": 0,
                "no_charge": false,
                "characters": 0,
                "currency": {
                    "eur": 0,
                    "brl": 0,
                    "mxn": 0,
                    "inr": 0,
                    "usd": 0.08
                },
                "need": {
                    "inr": 4,
                    "mxn": 0,
                    "usd": 0.08,
                    "brl": 0.22,
                    "eur": 0.07
                },
                "charge_parent": false,
                "no_credit": false
            },
            "search": {
                "version": 0,
                "similarity": {
                    "min_relation": 0.33,
                    "min_rank": 45
                },
                "source": [
                    "web"
                ],
                "status_pct": null,
                "status_updated": 1554868124901,
                "from": "text",
                "text": "Abraham Lincoln was an American statesman and lawyer who served as the 16th President of the United States from March 1861 until his assassination in April 1865. Lincoln led the United States through the American Civil War—its bloodiest war and perhaps its greatest moral, constitutional, and political crisis.",
                "type": "deep",
                "webhook": {
                    "url": "https://your_app_webhook_address",
                    "format": "document"
                },
                "status": "ready"
            },
            "cost": {
                "nb_queries": 5,
                "nb_selected_queries": 5,
                "nb_sentences": 2,
                "nb_words": 48,
                "size": 310,
                "length_queries": 302,
                "length_selected_queries": 302,
                "nb_pages": 1,
                "nb_searchable_sentences": 2
            },
            "privacy": {
                "read": "public"
            },
            "profile": {
                "title": "Abraham Lincoln"
            },
            "urls": {
                "edit": "https://premium.plagium.com/admin/en/documents/id/12345678-1234-1234-1234-12345678",
                "report": "https://premium.plagium.com/admin/en/report/id/12345678-1234-1234-1234-12345678",
                "print": "https://premium.plagium.com/admin/en/print/report/12345678-1234-1234-1234-12345678",
                "public_report": "https://premium.plagium.com/admin/en/document/report/12345678-1234-1234-1234-12345678"
            }
        },
        "rights": {
            "created": 1554868084936,
            "modifiedby": "lambda",
            "modified": 1554868124901,
            "createdby": "api",
            "ownedby": "aaaaaaaa-aaaa-aaaa-aaaaaaaa"
        },
        "active": true,
        "import_id": "YOUR DOCUMENT ID",
        "type": "document"
    }
},
"results": [{
        "result": {
            "obj_type": "result",
            "url": "https://en.wikipedia.org/wiki/Abraham_Lincoln",
            "title": "Abraham Lincoln - Wikipedia",
            "description": "Abraham Lincoln (February 12, 1809 – April 15, 1865) was an American statesman, politician, and lawyer who served as the 16th president of the United States from 1861 until his assassination in April 1865."
        },
        "score": 0.2660360339939722,
        "max_page_score": 0.2660360339939722,
        "max_paragraph_score": 39.4230239311529,
        "max_sentence_score": 86.15384615384616,
        "queries": 5,
        "found": 1,
        "comparison": {
            "score": 80.45383729594255,
            "max_page_score": 80.45383729594255,
            "max_paragraph_score": 80.45383729594255,
            "max_sentence_score": 80.87719298245614
        },
        "checked": true
    },
    {
        "result": {
            "obj_type": "result",
            "url": "https://en.wikipedia.org/wiki/16th_President_of_the_United_States",
            "title": "Abraham Lincoln - Wikipedia",
            "description": "Abraham Lincoln (February 12, 1809 – April 15, 1865) was an American statesman, politician, and lawyer who served as the 16th president of the United States from 1861 until his assassination in April 1865."
        },
        "score": 0.26594427801507586,
        "max_page_score": 0.26594427801507586,
        "max_paragraph_score": 39.4230239311529,
        "max_sentence_score": 86.15384615384616,
        "queries": 5,
        "found": 1,
        "comparison": {
            "score": 80.45383729594255,
            "max_page_score": 80.45383729594255,
            "max_paragraph_score": 80.45383729594255,
            "max_sentence_score": 80.87719298245614
        },
        "checked": true
    }
],
"api": {
    "version": "2.0.7",
    "name": "results",
    "date": 1554871697745
}
}
https://api.plagium.com/v2/remaining_credits
ArgumentoRequeridoDescripción
keySu clave API.
passwordnoSu contraseña de API, si está configurada.
var request = require('request');

var body={
key:"YOUR API KEY"
};
            
request.post("https://api.plagium.com/v2/remaining_credits", { json: true, body: body },
function(err, res, body) {
    if (err) console.error(err);
    else  console.log(body);
});
{
"data":{
    "key":"YOUR API KEY",
    "type":"remaining_credits"
},
"remaining_credits":{
    "currency":{
        "usd":86.00,
        "eur":null,
        "brl":null,
        "inr":null},
    "documents":null,
    "pages":null,
    "words":null,
    "characters":null
},
"api":{
    "version":"2.0.10",
    "name":"remaining_credits",
    "date":1566219132762
}
}

¿Cómo podemos ayudarte?