API braite bradaíola: téacs a chur isteach, pobalbhreith a dhéanamh ar an tuarascáil.
Tá dornán de chríochphointí, bearer auth, praghsáil creidmheasa trédhearcach. Tógtha do ghníomhaireachtaí, píblínte eagarthóireachta agus uirlisí LMS-in aice láimhe.
Do eochair API
Logáil isteach chun do eochair API a fháil. Tagann eochracha le gach cuntas; déantar seiceálacha API a bhilleáil i gcreidmheasanna.
Cláraigh le haghaidh NuachtCríochphointí
POST /api/v1/check/
Seol téacs le seiceáil. Filltear 202 le check_ id. Body: JSON le réimse téacs, Boole domhain roghnach.
curl -X POST https://plagiarism.free/api/v1/check/ \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "The text you want to check..."}'
GET /api/v1/check/<check_id>/
Pobalbhreith le haghaidh stádas; nuair a dhéantar stádas, tá an tuarascáil iomlán san áireamh: scór, cineálacha comhoiriúnachta in aghaidh an abairt le muinín agus sleachta foinse, agus an liosta foinse.
curl https://plagiarism.free/api/v1/check/CHECK_ID/ \ -H "Authorization: Bearer YOUR_KEY"
GET /api/v1/checks/
Liosta do sheiceálacha le déanaí, an ceann is nua ar dtús. Paraiméadair roghnacha iarratais: teorainn (1- 100, réamhshocrú 20) agus stádas (cuir i gciú, críochnaithe, theip...). Comhcheangail aighneachtaí agus déan do phainéal féin a chúltaca gan gach check_ id a stóráil.
curl "https://plagiarism.free/api/v1/checks/?limit=20&status=done" \ -H "Authorization: Bearer YOUR_KEY"
DELETE /api/v1/check/<check_id>/
Delete a finished check: the submitted text and its report are removed for good. Use it to honour your own users' deletion requests. A check that is still queued or running answers 409; delete it once it is done or failed.
curl -X DELETE https://plagiarism.free/api/v1/check/CHECK_ID/ \ -H "Authorization: Bearer YOUR_KEY"
Sampla Python
import time
import requests
API = "https://plagiarism.free/api/v1/check/"
HEADERS = {"Authorization": "Bearer YOUR_KEY"}
r = requests.post(API, json={"text": open("essay.txt").read()}, headers=HEADERS)
check_id = r.json()["check_id"]
while True:
report = requests.get(f"{API}{check_id}/", headers=HEADERS).json()
if report["status"] in ("done", "failed"):
break
time.sleep(3)
print(report["score_pct"], "% matched")
for source in report["sources"]:
print(source["pct_of_document"], source["url"])
Sampla JavaScript
const API = "https://plagiarism.free/api/v1/check/";
const headers = { "Authorization": "Bearer YOUR_KEY", "Content-Type": "application/json" };
const { check_id } = await fetch(API, {
method: "POST", headers, body: JSON.stringify({ text })
}).then(r => r.json());
let report;
do {
await new Promise(res => setTimeout(res, 3000));
report = await fetch(`${API}${check_id}/`, { headers }).then(r => r.json());
} while (!["done", "failed"].includes(report.status));
Praghsáil
Comhionann leis an suíomh: 1 creidmheas = 1,000 focal scanta, cruinnithe suas in aghaidh an tseiceála; costas dúbailte ar sheiceálacha domhain. Tá pacáistí creidmheasa bailí 365 lá; athlíonann síntiúis gach mí agus áirítear API ag gach leibhéal. Níl aon API ar leithligh, níl aon táillí in aghaidh an tsuímh. Féach pleananna agus pacáistí
Checks run asynchronously: real, rate-limited web retrieval usually takes about a minute once a check starts, longer for long documents and at busy times. Poll the status endpoint rather than holding the connection open. HTTP 402 means insufficient credits; the response includes what the check would cost.