- Excluding Parts of a Document from Scan Analysis: This allows you to refine the plagiarism scan by ignoring specific elements like quotes or code blocks.
- Preventing a Document from Being Indexed: This allows you to control whether the entire document is added to the Copyleaks Internal Database for future comparisons.
Exclude Options
Theexclude object can contain the following boolean properties:
quotes: If set totrue, all text within quotation marks will be ignored.citations: If set totrue, citations and references will be ignored.references: If set totrue, the bibliography or reference list will be ignored.tableOfContents: If set totrue, the table of contents will be ignored.titles: If set totrue, titles and headings will be ignored.code: An object controlling code exclusion. Set itscommentsfield totrueto ignore comments within code blocks (for example,"code": { "comments": true }).documentTemplateIds: An array of unique identifiers for predefined templates stored in your Private Cloud Hub or the Shared Data Hub. These templates’ content is then excluded from the document and won’t count towards plagiarism or AI analysis.
Use these options to customize your scans and focus on the most relevant content.
Using the Exclude
Theexclude property is a powerful feature with two primary uses:
-
Active Scans: When submitting a document for scanning, you can include the
excludeobject in the request payload to specify which parts of the document should be ignored during analysis, e.g., you can exclude quotes, citations, or code blocks to focus on the most relevant content. -
Exclude Template: The
excludetemplate allows you to refine the analysis of documents by excluding specific sections based on a predefined template. The template document could be located in either your Private Cloud Hub or the Shared Data Hub, e.g., excluding exam questions from a student’s filled out exam.
Get Started
Before you begin
Before you start, ensure you have the following:
- An active Copyleaks account. If you don’t have one, sign up for free.
- You can find your API key on the API Dashboard.
Installation
Choose your preferred method for making API calls.
HTTP needs no installation - call the API with any standard HTTP client, or import our Postman collection for a quicker start.
Login
To perform a scan, we first need to generate an access token. For that, we will use the login endpoint.
The API key can be found on the Copyleaks API Dashboard.Upon successful authentication, you will receive a token that must be attached to subsequent API calls via the Response
Authorization: Bearer <TOKEN> header.
This token remains valid for 48 hours.Save this token! It’s valid for 48 hours and can be reused for subsequent API calls.
Response Example
When the scan is processed, thescannedDocument object in the response will reflect the number of words that were excluded.
- 201
201 Created - The scan was successfully created and is now processing. The excluded word count is reflected in the response.
Next Steps
Webhooks Overview
Learn how to securely receive and process notifications from Copyleaks.
Viewing Scan Results
Understand the scan result format and how to display it to your users.

