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 & 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.
Primary Endpoint
📥 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 repository files
- Stack Overflow code snippets
- Database content matches
- Academic source files
📄 Submission Files
- Original uploaded submissions
- Processed source code
- Individual file content
- Raw text format
- Language-specific formatting
🔗 Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
location |
string | Yes | File location identifier or URL from match results |
source |
string | Yes | Source type identifier (e.g., "web", "database", "submission") |
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"
}'
📋 Response Format
Success Response (200 OK)
{
"success": true,
"file": {
"filename": "sorting_algorithms.py",
"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\n\ndef quick_sort(arr):\n if len(arr) <= 1:\n return arr\n pivot = arr[len(arr) // 2]\n left = [x for x in arr if x < pivot]\n middle = [x for x in arr if x == pivot]\n right = [x for x in arr if x > pivot]\n return quick_sort(left) + middle + quick_sort(right)",
"language_id": 14,
"file_size": 456,
"encoding": "utf-8",
"source_url": "https://github.com/example/repo/blob/main/sorting_algorithms.py"
}
}
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 |
|---|---|---|
filename |
string | Original or derived filename of the source code |
content |
string | Raw source code content as plain text |
language_id |
integer | Programming language identifier |
file_size |
integer | File size in bytes |
encoding |
string | Text encoding format (typically UTF-8) |
source_url |
string | Original URL or source location (if available) |
🚫 Error Responses
File Not Found (422 Unprocessable Entity)
{
"success": false,
"error": "File not found or no longer available",
"code": 422,
"details": {
"location": "https://example.com/missing-file.py",
"reason": "External source no longer accessible"
}
}
⚠️ File Not Found/Expired
This can occur when:
- External source has been removed
- Repository made private
- Link expired or changed
- Access permissions revoked
- Temporary network issues
🔐 Authentication Required
Ensure you have:
- Valid API key in header
- Sufficient quota remaining
- Access to the specific check
- Proper request formatting
- Correct endpoint URL
💡 Best Practices
File Handling
- Cache Locally: Store downloaded files to avoid repeated API calls
- Check Encoding: Verify text encoding before processing
- Handle Failures: Some external sources may become unavailable
- Respect Limits: Don't download files unnecessarily
- Security: Sanitize content before display
Security Considerations
- Validate Content: Ensure downloaded content is safe
- Access Control: Restrict file access to authorized users
- Data Privacy: Handle academic content responsibly
- Logging: Track file access for audit purposes
- Cleanup: Remove temporary files after processing
🔄 Next Steps
Detailed Analysis
Use downloaded files for side-by-side comparison and detailed investigation of plagiarism matches.
Analyze ResultsAPI Updates
Stay informed about new features and improvements to the file download capabilities.
View Changelog