Fileverity API docs
Plagiarism checks
Find passages of a plain text that match public web pages and Wikipedia with POST /text/plagiarism. Request and response fields, sources, matches, exclusions, scope, limits and billing.
POST /text/plagiarism checks one text with plagiarism-1. It searches public web pages and Wikipedia for passages that match the text and returns the matching passages, the sources they match and the share of matching text. It is synchronous and usually takes 20 to 60 seconds: hold the connection open.
It works for English, Spanish, French and Arabic. Save a text of 50 words or more as essay.txt to run the examples.
curl https://api.fileverity.com/v1/text/plagiarism \ -H "Authorization: Bearer $FILEVERITY_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 3e8d1c1e-3b0f-4c0a-9a53-2d1c9d6b7e31" \ --max-time 120 \ -d "$(jq -Rs '{text: ., language: "en"}' essay.txt)"import { readFile } from "node:fs/promises";import { randomUUID } from "node:crypto"; const response = await fetch("https://api.fileverity.com/v1/text/plagiarism", { method: "POST", headers: { Authorization: "Bearer " + process.env.FILEVERITY_API_KEY, "Content-Type": "application/json", "Idempotency-Key": randomUUID(), }, body: JSON.stringify({ text: await readFile("essay.txt", "utf8"), language: "en" }), signal: AbortSignal.timeout(120_000),});const check = await response.json();import osimport uuidimport requests response = requests.post( "https://api.fileverity.com/v1/text/plagiarism", headers={ "Authorization": "Bearer " + os.environ["FILEVERITY_API_KEY"], "Idempotency-Key": str(uuid.uuid4()), }, json={"text": open("essay.txt", encoding="utf-8").read(), "language": "en"}, timeout=120,)check = response.json()Request body
| Field | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Plain text of at least 50 words and at most 30,000 characters. |
model | string | No | Default plagiarism-1. Accepts the model ID or its snapshot ID plagiarism-1-2026-11-16. |
language | string or null | No | ISO 639-1 code: en, es, fr, ar. Detected automatically when omitted. It chooses the Wikipedia edition and the search language. |
Unknown fields are rejected with invalid_parameter. A text in another language, or whose language cannot be recognized, returns unsupported_language.
Response
{ "id": "tpl_8Hk2pQ4vN9sL1xR7cW3mY6zB", "object": "text.plagiarism", "created": 1794787200, "model": "plagiarism-1-2026-11-16", "livemode": true, "language": "en", "words": 812, "scored_words": 744, "excluded_words": { "quoted": 23, "reference": 45 }, "matched_words": 61, "similarity": 0.082, "sources": [ { "id": 1, "url": "https://en.wikipedia.org/wiki/Photosynthesis", "title": "Photosynthesis", "host": "en.wikipedia.org", "words": 38, "share": 0.051, "partial": false }, { "id": 2, "url": "https://example.org/biology/light-reactions", "title": "The light reactions of photosynthesis", "host": "example.org", "words": 23, "share": 0.031, "partial": false } ], "matches": [ { "start": 1022, "end": 1288, "words": 38, "source": 1, "excerpt": "Photosynthesis is a system of biological processes by which photopigment-bearing autotrophic organisms, such as most plants, algae and cyanobacteria, convert light energy into the chemical energy necessary to fuel their metabolism.", "quoted": false, "reference": false, "exact": true }, { "start": 2410, "end": 2566, "words": 23, "source": 2, "excerpt": "In the light-dependent reactions, one molecule of the pigment chlorophyll absorbs one photon and loses one electron.", "quoted": false, "reference": false, "exact": false }, { "start": 3105, "end": 3230, "words": 19, "source": 1, "excerpt": "The term photosynthesis usually refers to oxygenic photosynthesis, a process that releases oxygen as a byproduct.", "quoted": true, "reference": false, "exact": true } ], "queries": 12, "pages": 9, "version": "2026.11-p1", "usage": { "characters": 5120, "billed_units": 6, "credits": 6 }}| Field | Type | Description |
|---|---|---|
id | string | Check ID, prefixed tpl_. |
object | string | Always text.plagiarism. |
created | integer | Unix timestamp. |
model | string | Snapshot that produced the result. |
livemode | boolean | false for test keys. |
language | string | The language used: the one you sent, or the detected one. |
words | integer | Words in the text. |
scored_words | integer | Words outside quotation marks and the reference list. The denominator of similarity. |
excluded_words | object | quoted words inside quotation marks and reference words in the reference list, so you can recompute the share with other exclusions. |
matched_words | integer | Scored words inside matching passages, each word counted once. |
similarity | number | From 0 to 1: matched_words divided by scored_words. A share of matching text, not a verdict. |
sources | array | Sources with at least one matching passage, largest first. Each has id, url, title, host, words, share and partial, which is true when only the search excerpt of the page could be compared. |
matches | array | Matching passages in text order. Each has start, end (exclusive), words, source (the source id), excerpt (the matching text in the source, up to 300 characters), quoted, reference and exact. |
queries | integer | Phrases searched. |
pages | integer | Pages compared. |
version | string | Version of the matching method. Compare results only within one version. |
usage | object | characters evaluated, billed_units charged and credits charged. |
Matching text is not a verdict. Quotations, common phrases and properly cited passages also match, and a low share does not show that a text is original. Show the passages with their sources to a person who decides in context.
How the check works and what it covers
- Distinctive phrases of the text are searched as exact phrases on the public web and in the Wikipedia edition of the text's language. The pages that come back are fetched and compared with the text word by word, so a match needs several words in the same order; a few changed or inserted words still match, and the passage is then reported with
exactset tofalse. - Sources searched: public web pages and Wikipedia. Books, paywalled journals, other students' papers, learning platforms and private databases are not visible to the check. Pages that refuse automated access are compared through their search excerpt only (
partial). - Not found: paraphrased text, translated text and text whose source is not public. A text can be copied and still return no match.
- Exclusions: passages inside quotation marks have
quotedset totrue, and passages after a heading such as References, Bibliography, Références, Referencias or المراجع havereferenceset totrue. Both are left out ofsimilarity; useexcluded_wordsto include them. - Phrases of the text are sent to Brave Search and to Wikipedia to find candidate pages. The full text is never sent to them, and nothing is added to any database.
Offsets
start and end of each match are offsets into the text you submitted, counted in Unicode code points, not bytes and not UTF-16 units. JavaScript strings index by UTF-16, so split into code points first:
const points = Array.from(text);for (const { start, end, source } of check.matches) { console.log(source, points.slice(start, end).join(""));}for match in check["matches"]: print(match["source"], text[match["start"]:match["end"]])Billing
- A plagiarism check costs 1 credit per 1,000 characters, counted in Unicode code points. Each request is rounded up to whole units, with a minimum of one unit.
usage.billed_unitsis the number of units charged andusage.creditsthe credits charged. Example: 5,120 characters bill 6 units, 6 credits.- A check that finds no matching source is still charged: the search was run. Requests rejected before evaluation are not charged, and a check that fails inside the service (
service_unavailable) is released and not charged. - Not enough credits return
insufficient_balance(402). Through the API, plagiarism checks are open to workspaces that have purchased credits and always use credits; on the website and in the Console they are part of the Pro plan.
What is stored
A copy of the text is kept encrypted for up to 3 years to train and evaluate Fileverity's detection models; see Data retention and security. Fileverity keeps the result (sources, match offsets with short source excerpts, counts and usage) for 7 days, so the Console can show it and usage can be billed and audited. Fetched pages are compared in memory and not kept. A retried request with the same Idempotency-Key gets the saved result for 24 hours. Plagiarism checks are synchronous: they do not appear in GET /analyses and do not send webhook events. Test keys record nothing. See Data retention and security.
Errors
| Code | Status | Cause |
|---|---|---|
text_too_short | 400 | Fewer than 50 words. |
text_too_long | 413 | More than 30,000 characters. Split the text into several requests. |
unsupported_language | 400 | The text is not in English, Spanish, French or Arabic, or its language could not be recognized. Send language to choose one. |
unsupported_media_type | 415 | The body is not sent as application/json. |
invalid_json, missing_parameter, invalid_parameter | 400 | The body is not a JSON object, text is missing, a field has the wrong type or an unknown field was sent. |
model_not_found | 404 | The model is unknown. |
plan_required | 403 | The workspace has not purchased credits yet. Buy a credit pack in the Console. |
insufficient_balance | 402 | The balance cannot cover the request. |
spend_limit_reached | 402 | The key reached its monthly spend limit. |
idempotency_mismatch, idempotency_in_progress | 409 | The Idempotency-Key was used with a different body, or its first request is still running. |
service_unavailable, analysis_failed | 503, 502 | The search or comparison could not be completed. Not charged; retry. service_unavailable carries a retry-after header. |
Send an Idempotency-Key so that retrying after a timeout does not bill twice. See Idempotency.