Our AI detection models just got upgraded. They now catch ChatGPT and Claude in student code more accurately than ever. See what's new
Developer API

Code Plagiarism
Detection API

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 The file's location value taken from your match results
source string Required The file's source value taken from your match results
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": "https://github.com/example/repo/blob/main/algorithm.py",
    "source": "web"
  }'
		
cURL

Response Format

Success Response (200 OK)
		{
  "file": {
    "id": 84213,
    "filedir": "abc123def456",
    "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",
    "location": "https://github.com/example/repo/blob/main/algorithm.py",
    "source": "web",
    "submission_id": 45001,
    "created_at": "2024-09-15T12:30:00.000000Z",
    "updated_at": "2024-09-15T12:30:00.000000Z"
  }
}
		
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 Internal storage reference for the file
file.content string Raw source code content as plain text
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)
file.submission_id integer ID of the submission this file is associated with
file.created_at / file.updated_at string Timestamps for the file record

Error Responses

File Not Found (404 Not Found)
		{
  "error": "Could not find file or file has expired"
}
		
Error Response
401 Unauthorized

{"error": "Invalid API key"} — 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 matching file row, or its parent submission no longer exists.

403 Forbidden

{"error": "Access denied. You do not own this file."} — the file belongs to a submission you do not own.

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.