Skip to content

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.

View as MarkdownUpdated 2026-11-16

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)"

Request body

FieldTypeRequiredDescription
textstringYesPlain text of at least 50 words and at most 30,000 characters.
modelstringNoDefault plagiarism-1. Accepts the model ID or its snapshot ID plagiarism-1-2026-11-16.
languagestring or nullNoISO 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  }}
FieldTypeDescription
idstringCheck ID, prefixed tpl_.
objectstringAlways text.plagiarism.
createdintegerUnix timestamp.
modelstringSnapshot that produced the result.
livemodebooleanfalse for test keys.
languagestringThe language used: the one you sent, or the detected one.
wordsintegerWords in the text.
scored_wordsintegerWords outside quotation marks and the reference list. The denominator of similarity.
excluded_wordsobjectquoted words inside quotation marks and reference words in the reference list, so you can recompute the share with other exclusions.
matched_wordsintegerScored words inside matching passages, each word counted once.
similaritynumberFrom 0 to 1: matched_words divided by scored_words. A share of matching text, not a verdict.
sourcesarraySources 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.
matchesarrayMatching 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.
queriesintegerPhrases searched.
pagesintegerPages compared.
versionstringVersion of the matching method. Compare results only within one version.
usageobjectcharacters 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 exact set to false.
  • 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 quoted set to true, and passages after a heading such as References, Bibliography, Références, Referencias or المراجع have reference set to true. Both are left out of similarity; use excluded_words to 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(""));}

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_units is the number of units charged and usage.credits the 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

CodeStatusCause
text_too_short400Fewer than 50 words.
text_too_long413More than 30,000 characters. Split the text into several requests.
unsupported_language400The text is not in English, Spanish, French or Arabic, or its language could not be recognized. Send language to choose one.
unsupported_media_type415The body is not sent as application/json.
invalid_json, missing_parameter, invalid_parameter400The body is not a JSON object, text is missing, a field has the wrong type or an unknown field was sent.
model_not_found404The model is unknown.
plan_required403The workspace has not purchased credits yet. Buy a credit pack in the Console.
insufficient_balance402The balance cannot cover the request.
spend_limit_reached402The key reached its monthly spend limit.
idempotency_mismatch, idempotency_in_progress409The Idempotency-Key was used with a different body, or its first request is still running.
service_unavailable, analysis_failed503, 502The 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.