GET /v3/downloads/my-custom-id

Get the text you submitted for a scan, as it was crawled by the Copyleaks servers.

The crawled version is available in textual format, and if properties.includeHtml field (in submit method) is set to true also in html format.

You need to login with a user and api key in order to access this method.
Add this HTTP header to your request:
Authorization: Bearer <Your-Login-Token>
Not sure how to generate your login token? Read here.

Request

Request Example

curl -XGET -H 'Authorization: Bearer YOUR-LOGIN-TOKEN' 'https://api.copyleaks.com/v3/downloads/my-custom-id'
GET https://api.copyleaks.com/v3/downloads/my-custom-id

Authorization: Bearer YOUR-LOGIN-TOKEN;
import requests

headers = {
    'Authorization': 'Bearer YOUR-LOGIN-TOKEN',
}

response = requests.get('https://api.copyleaks.com/v3/downloads/my-custom-id', headers=headers)

using (var httpClient = new HttpClient())
{
    using (var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.copyleaks.com/v3/downloads/my-custom-id"))
    {
        request.Headers.TryAddWithoutValidation("Authorization", "Bearer YOUR-LOGIN-TOKEN"); 

        var response = await httpClient.SendAsync(request);
    }
}
var request = require('request');

var headers = {
    'Authorization': 'Bearer YOUR-LOGIN-TOKEN'
};

var options = {
    url: 'https://api.copyleaks.com/v3/downloads/my-custom-id',
    headers: headers
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
    'Authorization' => 'Bearer YOUR-LOGIN-TOKEN'
);
$response = Requests::get('https://api.copyleaks.com/v3/downloads/my-custom-id', $headers);

Response

Codes

Status Code Description
200

The command was executed. See the JSON body response. Description in the table below.

401

Authorization has been denied for this request

Example

{
	"metadata": {
		"words": 30,
		"excluded": 2
	},
	"html": {
		"value": "<html><body><h1>Example Domain</h1><p>This domain is established to be used for illustrative examples in documents.</body></html>",
		"exclude": {
			"starts": [16],
			"lengths": [14],
			"reasons": [3],
			"groupIds": [1]
		}
	},
	"text": {
		"value": "Example Domain This domain is established to be used for illustrative examples in documents.",
		"exclude": {
			"starts": [0],
			"lengths": [14],
			"reasons": [3]
		},
		"pages": {
			"startPosition": [
				0
			]
		}
	}
}

Description

Name Description

metadata.words

Number of words in the text.

Unsigned Integer

metadata.excluded

Number of excluded words in the text.

Unsigned Integer

text.value

The crawled version of the submitted text.

String

text.exclude.starts

The start position of the section to exclude.

Unsigned Integer Array

text.exclude.lengths

The length, in characters, of the section to exclude.

Unsigned Integer Array

text.exclude.reasons

The reason why this section was excluded.

Unsigned Integer Array (enum)

Possible values:
1: Quotation
2: Reference
3: Header
4: Footer
5: HtmlTemplate

text.pages.startPosition

A list of pages start positions of the text, the first startPostion is the start position of the first page.

Integer Array

html.value

The HTML version of the submitted file.

String

html.exclude.starts

The start position of the section to exclude.

Unsigned Integer Array

html.exclude.lengths

The length, in characters, of the section to exclude.

Unsigned Integer Array

html.exclude.reasons

The reason why this section was excluded.

Integer Array (enum)

Possible values:
1: Quotation
2: Reference
3: Header
4: Footer
5: HtmlTemplate

html.exclude.groupIds

HTML contains design and visual elements, on top of the actual text. These elements may be placed in the middle of an excluded section (for example html tags).

Since in this case only the text should be excluded, and the the html tags should remain in place, we will split the excluded sections to sub sections, that will be under the same group Id.

Unsigned Integer Array