https://mosschecker.com/api/v1
X-API-Key: your_key
application/json
Endpoints
Authentication
All API endpoints require authentication using an API key. Include your API key in the request header.
Method 1: X-API-Key Header (Recommended)
Method 2: Bearer Token
💡 Getting Your API Key: Navigate to Dashboard → API Keys and generate a new key.
/v1/check
Submit files for plagiarism detection. This is the primary endpoint for running MOSS checks.
Request Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
language |
string | Yes | Programming language code (e.g., python, java, javascript) |
files |
array | Yes | Array of file objects (minimum 2 files required) |
files[].name |
string | Yes | Name of the file (e.g., student1.py) |
files[].content |
string | Yes | Base64-encoded file content |
Example Request
-H "X-API-Key: moss_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"language": "python",
"files": [
{
"name": "student1.py",
"content": "cHJpbnQoIkhlbGxvIHdvcmxkIik="
},
{
"name": "student2.py",
"content": "cHJpbnQoIkhlbGxvIHdvcmxkIik="
}
]
}'
Success Response (200 OK)
"id": 12345,
"status": "completed",
"result_url": "https://mosschecker.com/moss_results/abc123/index.html",
"matches_found": 5
}
Error Response (400 Bad Request)
"error": "Validation failed",
"message": "The language field is required."
}
/v1/check/{id}
Get the status and basic information about a specific plagiarism check.
URL Parameters
| Parameter | Type | Description |
|---|---|---|
id |
integer | The check ID returned from POST /v1/check |
Example Request
-H "X-API-Key: moss_your_api_key"
Success Response (200 OK)
"id": 12345,
"status": "completed",
"language": "python",
"files_count": 10,
"matches_found": 5,
"created_at": "2024-01-15T10:30:00Z",
"completed_at": "2024-01-15T10:31:45Z"
}
Status Values: processing, completed, or failed
/v1/check/{id}/results
Get detailed results including all matches and similarity percentages.
Example Request
-H "X-API-Key: moss_your_api_key"
Success Response (200 OK)
"id": 12345,
"status": "completed",
"result_url": "https://mosschecker.com/moss_results/abc123/index.html",
"matches_found": 2,
"results": {
"matches": [
{
"file1": "student1.py",
"file1_percent": 85,
"file2": "student2.py",
"file2_percent": 78,
"percentage": 85,
"url": "https://mosschecker.com/moss_results/abc123/match0.html"
},
{
"file1": "student3.py",
"file1_percent": 62,
"file2": "student4.py",
"file2_percent": 59,
"percentage": 62,
"url": "https://mosschecker.com/moss_results/abc123/match1.html"
}
]
}
}
/v1/languages
Get a list of all supported programming languages. No authentication required.
Example Request
Success Response (200 OK)
"languages": {
"c": "C",
"cc": "C++",
"java": "Java",
"python": "Python",
"javascript": "JavaScript",
// ... more languages
}
}
/v1/usage
Get your current API usage statistics and plan limits.
Example Request
-H "X-API-Key: moss_your_api_key"
Success Response (200 OK)
"plan": "pure",
"checks_today": 15,
"checks_this_month": 234,
"limits": {
"daily_limit": 50,
"storage_days": 7
}
}
Error Codes
The API uses standard HTTP status codes to indicate success or failure.
| Code | Status | Description |
|---|---|---|
200 |
OK | Request successful |
400 |
Bad Request | Invalid request parameters or missing required fields |
401 |
Unauthorized | Invalid or missing API key |
404 |
Not Found | Check ID not found or does not belong to your account |
429 |
Too Many Requests | Rate limit exceeded - wait before retrying |
500 |
Server Error | Something went wrong on our end - contact support if persistent |
Error Response Format
"error": "Error type",
"message": "Detailed error message"
}
Rate Limits
Rate limits vary by subscription plan:
| Plan | Daily Limit | Monthly Limit |
|---|---|---|
| Free | 10 checks total | 10 checks total |
| Pure Unlimited | 50 checks/day | Unlimited |
| Ultimate Unlimited | 500 checks/day | Unlimited |
| Enterprise Unlimited | Unlimited | Unlimited |
⚠️ Rate Limit Response: When you exceed your rate limit, you'll receive a 429 Too Many Requests response. Implement exponential backoff in your client.
Need Help with the API?
Check out our comprehensive documentation with code examples in multiple languages, or contact our support team for integration assistance.