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!
LIMITS & SECURITY

API Limits & Security

Understanding API usage limits, security measures, and best practices to ensure optimal performance and compliance with Codequiry's fair usage policies.

API Usage Limits

Codequiry implements intelligent rate limiting and usage quotas to ensure stable service for all users while preventing abuse.

Grow Plan Limits

120 checks, 50 submissions/check, 10MB/file, 60 req/min, Standard priority

Premium Plan Limits

Unlimited checks, 500 submissions/check, 10MB/file, 300 req/min, High priority

Security & Authentication

API Key Security

Best Practices:

  • Store API keys in environment variables
  • Never commit keys to version control
  • Rotate keys regularly (monthly)
  • Use different keys for dev/staging/prod
  • Implement key rotation in CI/CD
Example Implementation:
                # Environment variables
CODEQUIRY_API_KEY=your-production-key
CODEQUIRY_DEV_API_KEY=your-development-key

# .gitignore
.env
.env.local
*.key
                
Security
Data Protection

Security Measures:

  • HTTPS/TLS 1.3 - All API communication encrypted
  • SOC 2 Infrastructure - Enterprise security standards
  • GDPR Compliant - EU data protection
  • Data Retention - Configurable retention policies
  • Access Logging - Complete audit trails
Headers Required:
                apikey: your-api-key-here
Accept: application/json
Content-Type: application/json
User-Agent: YourApp/1.0
                
Headers

Rate Limiting Details

Codequiry uses a token bucket algorithm with sliding windows to ensure fair access while allowing burst usage.

Plan Type Requests/Minute Burst Limit Concurrent Checks Queue Priority
Grow 60 100 2 Standard
Basic 120 200 5 Standard
Premium 300 500 10 High
Enterprise 1000 2000 25 Highest
Rate Limit Headers: API responses include `X-RateLimit-Remaining`, `X-RateLimit-Reset`, and `X-RateLimit-Limit` headers to help you manage usage.

Abuse Prevention

Automated systems monitor usage patterns to prevent abuse while maintaining service quality for legitimate users.

Usage Monitoring

Monitored Patterns:

  • Abnormal request volumes
  • Repeated failed requests
  • Unusual upload patterns
  • Resource-intensive operations
  • Suspicious API key usage
Progressive Actions

Response Sequence:

  1. Warning - Email notification
  2. Throttling - Reduced rate limits
  3. Queue Priority - Lower processing priority
  4. Temporary Suspension - 24-48 hour cooldown
  5. Account Review - Manual investigation
Best Practices

Avoid Issues:

  • Implement exponential backoff
  • Cache results when possible
  • Batch operations efficiently
  • Monitor rate limit headers
  • Use appropriate timeouts

Processing Time Guidelines

Understanding typical processing times helps with application design and user expectations.

Check Size File Count Standard Queue Priority Queue Factors
Small 1-10 files 2-5 minutes 1-3 minutes File size, language complexity
Medium 11-50 files 5-15 minutes 3-10 minutes Peer comparisons, web search depth
Large 51-200 files 15-45 minutes 10-30 minutes Database size, analysis thoroughness
Enterprise 200+ files 45+ minutes 30+ minutes Custom processing, detailed analysis
Timeout Recommendations: Set client timeouts to at least 60 minutes for large checks. Use polling with 30-second intervals to monitor progress.

Implementation Guidelines

Error Handling
        // Robust error handling
async function makeApiRequest(url, options) {
    const maxRetries = 3;
    let attempt = 0;

    while (attempt < maxRetries) {
        try {
            const response = await fetch(url, options);

            if (response.status === 429) {
                // Rate limited - exponential backoff
                const delay = Math.pow(2, attempt) * 1000;
                await new Promise(resolve => setTimeout(resolve, delay));
                attempt++;
                continue;
            }

            if (!response.ok) {
                throw new Error(`HTTP ${response.status}: ${response.statusText}`);
            }

            return await response.json();

        } catch (error) {
            attempt++;
            if (attempt === maxRetries) {
                throw error;
            }

            // Linear backoff for other errors
            await new Promise(resolve => setTimeout(resolve, 2000 * attempt));
        }
    }
}
        
Error Handling
Rate Limit Monitoring
        # Monitor rate limits
class RateLimitMonitor:
    def __init__(self):
        self.remaining = None
        self.reset_time = None

    def update_from_headers(self, headers):
        self.remaining = int(headers.get('X-RateLimit-Remaining', 0))
        self.reset_time = int(headers.get('X-RateLimit-Reset', 0))

        # Warn when approaching limit
        if self.remaining < 10:
            print(f"⚠️ Rate limit warning: {self.remaining} requests remaining")

        # Pause if rate limited
        if self.remaining <= 0:
            wait_time = self.reset_time - time.time()
            if wait_time > 0:
                print(f"Rate limited. Waiting {wait_time:.0f} seconds...")
                time.sleep(wait_time)

    def should_throttle(self):
        return self.remaining is not None and self.remaining < 5
        
Monitoring

Support & Resources

Technical Resources
Support Channels