Download Files
Build plagiarism detection into your apps. Check code against 20+ billion sources.
Download Files & Reports
Access and download source code files that were matched during plagiarism analysis. This endpoint provides access to individual files from external sources and submitted content for detailed comparison.
Available Downloads
The Codequiry API provides access to source code files and external matches for offline analysis and manual review.
Download Types
External Match Files
Source code from web matches, GitHub repos, Stack Overflow, database content, and academic sources.
Submission Files
Original uploads, processed source code, individual file content in raw text format.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
location |
string | Required | Copy the location value verbatim from a match object in /check/results. It is a display label such as "github.com" or a page title, not a URL. |
source |
string | Required | Copy the source value verbatim from the same match object. This is the origin URL of the matched page. |
location (or the two
swapped around) returns a 404 even when the file is there.
Example Request
curl -X POST "https://codequiry.com/api/v1/check/getRemoteFile" \
-H "apikey: your-api-key-here" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"location": "github.com",
"source": "https://github.com/example/repo/blob/main/algorithm.py"
}'
Response Format
Success Response (200 OK)
{
"file": {
"id": 84213,
"filedir": "algorithm.py",
"filename": "Bubble Sort in Python",
"content": "def bubble_sort(arr):\n n = len(arr)\n for i in range(n):\n for j in range(0, n-i-1):\n if arr[j] > arr[j+1]:\n arr[j], arr[j+1] = arr[j+1], arr[j]\n return arr",
"language_id": 14,
"location": "github.com",
"source": "https://github.com/example/repo/blob/main/algorithm.py"
}
}
Response Structure
| Field | Type | Description |
|---|---|---|
file.id |
integer | Internal identifier of the stored file record |
file.filedir |
string | Path or name of the file within the stored source |
file.filename |
string | Human-readable title of the stored page, when one was captured |
file.content |
string | Raw source code content as plain text |
file.language_id |
integer | Detected language of the stored file |
file.location |
string | The location value you supplied in the request (echoed back) |
file.source |
string | The source value you supplied in the request (echoed back) |
Error Responses
File Not Found (404 Not Found)
{
"error": "Could not find file or file has expired"
}
The apikey header is missing or does not match an account.
Missing location or source. Response includes error and a validation_errors object.
{"error": "Could not find file or file has expired"} — no stored file matches that exact location and source pair. Check you copied both straight from the match object.
{"error": "Access denied. You do not own this file."} — the stored file exists, but none of your own submissions matched against it. The web corpus is shared across accounts, so you can only read a page your own check flagged.
Best Practices
File Handling
Cache locally to avoid repeated API calls. Check encoding before processing. Handle failures gracefully as external sources may become unavailable. Respect rate limits and sanitize content before display.
Security Considerations
Validate downloaded content is safe. Restrict file access to authorized users. Handle academic content responsibly. Track file access for audit purposes and remove temporary files after processing.