Plagiarism ogaadaan API: qoraalka soo gudbiyaan, codbixinta warbixinta.
A faras of endpoints, bearer auth, qiimaha credit cad. Built for hay'adaha, warbaahinta iyo LMS-adjacent qalab.
Fudud API
Ku soo biir si aad u hesho API key. Keys la yimaadaan xisaab kasta; API tijaabooyinka waxaa lagu billaabay credits.
Ku soo biirDhammaan
POST /api/v1/check/
Soo gudbin qoraalka si loo hubiyo. 202 la check_id ku soo laabanaya. jirka: JSON la goobta qoraalka, doorasho deep boolean.
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>/
Doorashada xaaladda; marka xaaladda la sameeyo warbixinta oo dhan waxaa ku jira: dhibcood, per-jeer noocyada isku mid ah oo la kalsooni iyo soo jiidashada asalka, iyo liiska asalka.
curl https://plagiarism.free/api/v1/check/CHECK_ID/ \ -H "Authorization: Bearer YOUR_KEY"
GET /api/v1/checks/
Liiska aad baaritaanada ugu dambeeyay, ugu dambeeyay ee hore. Params su'aasha ikhtiyaariga ah: xaddidan (1-100, default 20) iyo xaaladda (dhacdo, la sameeyey, ku fashilmeen...). isku raaci soo gudbinta iyo dib aad dashboard aad u gaar ah iyada oo aan kaydin check_id kasta.
curl "https://plagiarism.free/api/v1/checks/?limit=20&status=done" \ -H "Authorization: Bearer YOUR_KEY"
Python tusaale
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"])
JavaScript tusaale
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));
Qiimaha
Isku mid ah goobta: 1 credit = 1,000 ereyada scanned, rounded up per check; tijaabooyinka qoto dheer ku kacaysaa laba jeer. Credit packs waa sharci 365 maalmood; subscriptions buuxiyaan bishii iyo API ku jira heer kasta. Ka eeg qorshayaasha iyo baakadaha
Tijaabooyinka ayaa la socda asynchronously (real, tirada-ka-dhiman web soo celinta qaadataa 20-45 ilbiriqsi) - tirakoobka xaaladda dhamaadka ka badan in ay haystaan xiriirka furan. HTTP 402 macnaheedu waa credits aan ku filan; jawaabta waxaa ka mid ah waxa tijaabada ku kacaysa.