Detect plagiarized and similar code across code sources on the web See what's new
Developer API

Download Files

Build plagiarism detection into your apps. Check code against 20+ billion sources.

const response = await fetch('https://codequiry.com/api/v1/check', { method: 'POST', headers: { 'apikey': 'YOUR_API_KEY' }, body: formData }); // Check created!
DOWNLOAD FILES

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.

POST https://codequiry.com/api/v1/check/getRemoteFile

Available Downloads

The Codequiry API provides access to source code files and external matches for offline analysis and manual review.

File Access: This endpoint allows you to download individual source code files that were flagged as potential matches during analysis.
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.
Pass both values through unchanged. They are looked up as an exact pair against the stored copy of the page, so a hand-built 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"
  }'
		
cURL

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"
  }
}
		
JSON Response
Testing Note: Replace the example location and source values with actual data from your check results. The location parameter should come from the match results in your plagiarism analysis.

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"
}
		
Error Response
401 Unauthorized

The apikey header is missing or does not match an account.

422 Validation Error

Missing location or source. Response includes error and a validation_errors object.

404 Not Found

{"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.

403 Forbidden

{"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.