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!
EXPORT RESULTS API
Export Check Results
Export plagiarism check results in CSV or JSON format. Ideal for integrating results into external systems, generating reports, or performing additional analysis.
API Endpoint
POST https://codequiry.com/api/v1/check/export
Authentication
Include your API key in the request header:
apikey: YOUR_API_KEY_HERE
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
check_id |
Integer | Required | The unique identifier of the check to export |
format |
String | Optional | Export format: csv or json. Defaults to csv |
JSON Export Response
HTTP Status: 200 OK (when format=json)
{
"check_id": 2810,
"check_name": "Python Assignment - Week 5",
"export_date": "2024-01-15T15:30:00Z",
"submissions": [
{
"submission_id": 45001,
"filename": "student1_solution.zip",
"status": "analyzed",
"plagiarism_local": 45.2,
"plagiarism_web": 12.8,
"plagiarism_total": 52.3,
"matches_local": 3,
"matches_web": 2,
"ai_detection_avg": 15.4,
"ai_detection_max": 32.1,
"code_quality_avg": 72.5,
"file_size": 24576,
"created_at": "2024-01-15 14:31:00",
"updated_at": "2024-01-15 14:32:47"
},
{
"submission_id": 45002,
"filename": "student2_solution.zip",
"status": "analyzed",
"plagiarism_local": 78.9,
"plagiarism_web": 5.2,
"plagiarism_total": 82.1,
"matches_local": 5,
"matches_web": 1,
"ai_detection_avg": 68.7,
"ai_detection_max": 85.3,
"code_quality_avg": 45.2,
"file_size": 18432,
"created_at": "2024-01-15 14:31:05",
"updated_at": "2024-01-15 14:32:47"
}
]
}
Submission Fields
- submission_id — Unique identifier for the submission
- filename — Original uploaded filename
- plagiarism_local — Similarity percentage against other submissions in the check (%)
- plagiarism_web — Similarity percentage against web sources (%)
- plagiarism_total — Combined overall plagiarism score (%)
- matches_local — Number of matching peer submissions
- matches_web — Number of matching web sources
- ai_detection_avg — Average AI-generated code probability (%)
- ai_detection_max — Maximum AI-generated code probability across files (%)
- code_quality_avg — Average code quality score (%)
- file_size — Size of the uploaded file in bytes
CSV Export Response
When format=csv (default), the API returns a direct file download with Content-Type: text/csv.
submission_id,filename,plagiarism_local,plagiarism_web,plagiarism_total,matches_local,matches_web,ai_detection_avg,ai_detection_max
45001,student1_solution.zip,45.2,12.8,52.3,3,2,15.4,32.1
45002,student2_solution.zip,78.9,5.2,82.1,5,1,68.7,85.3
Error Responses
401 Unauthorized
Invalid or missing API key.
404 Not Found
Check not found or does not belong to your account.
409 Conflict
Check is still being processed. Export is only available for completed checks.
Code Examples
cURL - JSON Export
curl -X POST "https://codequiry.com/api/v1/check/export" \
-H "apikey: YOUR_API_KEY_HERE" \
-d "check_id=2810" \
-d "format=json"
cURL - CSV Download
curl -X POST "https://codequiry.com/api/v1/check/export" \
-H "apikey: YOUR_API_KEY_HERE" \
-d "check_id=2810" \
-d "format=csv" \
-o results.csv
JavaScript
// JSON export
const response = await fetch('https://codequiry.com/api/v1/check/export', {
method: 'POST',
headers: {
'apikey': 'YOUR_API_KEY_HERE',
'Content-Type': 'application/json'
},
body: JSON.stringify({ check_id: 2810, format: 'json' })
});
const data = await response.json();
console.log(`Exported ${data.submissions.length} submissions`);
// Sort by plagiarism score (highest first)
const flagged = data.submissions
.filter(s => s.plagiarism_total > 50)
.sort((a, b) => b.plagiarism_total - a.plagiarism_total);
flagged.forEach(s => {
console.log(`${s.filename}: ${s.plagiarism_total}% plagiarism`);
});