Code Plagiarism Detection API
Build plagiarism detection into your applications with our powerful REST API. Detect copied code across 20+ billion sources with industry-leading accuracy.
API Playground
Not ConnectedConnect your API key to test endpoints in real-time
Start Plagiarism Detection Analysis
Trigger the plagiarism detection process on your uploaded files. This endpoint initiates the actual analysis that compares your code against other submissions in the check, external databases, and web sources to detect similarities and potential plagiarism.
API Endpoint
How Analysis Works
After uploading your source code files, this endpoint starts the plagiarism detection engine. The analysis compares your submissions against each other (peer comparison) and optionally against external sources (web and database checks). Processing typically completes in 1-5 minutes depending on file count and check type.
What Happens During Analysis
Peer Comparison
Your uploaded files are compared against each other to detect collaboration or code sharing
Database Search
Code compared against our plagiarism database of academic and historical submissions
Web Matching
Intelligent web search across 20+ billion sources including GitHub and Stack Overflow
Score Calculation
Plagiarism scores calculated and detailed reports generated with line-by-line comparisons
Request Parameters
Configure your analysis by specifying the check ID and optional parameters to customize the detection process.
| Parameter | Type | Required | Description |
|---|---|---|---|
check_id |
Integer | Required | ID of the check to start (must have uploaded files) |
dbcheck |
Integer | Optional | Enable database comparison: 1=on, 0=off (default: 1) |
webcheck |
Integer | Optional | Enable web search comparison: 1=on, 0=off (default: 1) |
test_type |
Integer | Optional | Analysis engine type (see reference below, default: 1) |
Example Requests
curl -X POST \ 'https://codequiry.com/api/v1/check/start?check_id=2810' \ -H 'Accept: application/json' \ -H 'apikey: YOUR_API_KEY_HERE '
Includes peer comparison, database, and web searches
curl -X POST \ 'https://codequiry.com/api/v1/check/start?check_id=2810&dbcheck=0&webcheck=0' \ -H 'Accept: application/json' \ -H 'apikey: YOUR_API_KEY_HERE '
Compares only uploaded submissions against each other
Success Response
{
"check": {
"id": 2810,
"name": "Python Assignment Check",
"created_at": "2024-01-15 14:30:22",
"updated_at": "2024-01-15 14:50:18",
"status_id": 2,
"job_id": 8860
},
"status": "Analysis in progress",
"dbcheck": true,
"webcheck": true,
"submission_count": 5,
"dashURL": "http://dashboard.codequiry.com/course/api/assignment/2810"
}
Understanding the Response
- check.status_id: 2 — Analysis has started and is currently processing
- check.job_id — Internal processing job identifier (non-zero indicates analysis started)
- status — Human-readable status description for display purposes
- dbcheck / webcheck — Confirms which analysis types are enabled for this run
- submission_count — Number of files being analyzed in this check
- dashURL — Direct link to view real-time progress in the Codequiry dashboard
Analysis Engine Types
Choose the appropriate analysis engine based on your use case. Each engine is optimized for different scenarios:
| ID | Engine Type | Best For | Description |
|---|---|---|---|
1 |
Web + Group Similarity | General Use | Complete analysis including web search and peer comparison (recommended default) |
9 |
Group Similarity Only | Student Assignments | Compare only uploaded files—free MOSS alternative for classroom use |
10 |
Group + Auto Base Code | Template Projects | Automatically detects and excludes common template code |
6 |
Large Volume Group | 100+ Files | Optimized for processing many submissions efficiently |
3 |
Small Files Checker | Code Snippets | Specialized for analyzing small code fragments under 100 lines |
12 |
Group (30% Tolerance) | Educational Use | More lenient similarity detection for learning environments |
9 (Group Similarity Only). This is faster and doesn't consume web/database search credits.
Error Responses & Troubleshooting
Invalid Check ID (422 Unprocessable Entity)
{
"error": "Invalid check_id provided"
}
Common Start Errors
Cause: Check has no files to analyze
Solution: Upload at least one ZIP file before starting analysis. Use the upload endpoint to add submissions.
Cause: Monthly check limit reached
Solution: Upgrade your plan or wait for next billing cycle. Check your usage in the dashboard.
Cause: Check is already being analyzed
Solution: Wait for current analysis to complete. Don't restart checks that are already processing (status_id = 2).
Cause: Invalid test_type or other parameters
Solution: Verify test_type is one of the valid engine IDs listed above. Ensure dbcheck/webcheck are 0 or 1.
Best Practices & Tips
Engine Selection
- Use engine 9 for student assignments
- Use engine 1 for comprehensive analysis
- Use engine 10 for template-based projects
- Test different engines for optimal results
Timing
- Start only when all files uploaded
- Monitor progress with Get Check Status
- Allow 1-5 minutes for completion
- Don't restart already running checks
Cost Optimization
- Use peer-only checks to save quota
- Group related files in single checks
- Test with small batches first
- Monitor usage in dashboard
Performance
- Smaller file sets process faster
- Peer-only is faster than full analysis
- Use appropriate engine for file count
- Poll status every 15-30 seconds
What's Next?
After starting your analysis, monitor progress and retrieve results when complete: