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!
QUICK CHECK API

Quick Check API - All-in-One Endpoint

The most efficient way to run plagiarism checks. Create a check, upload files, and start analysis—all in a single API call. Built for modern applications that need speed, simplicity, and reliability.

3x Faster

One API call instead of three. Get results faster with optimized request handling.

Less Code

Simplified integration with fewer lines of code and reduced complexity.

Pro Only

Exclusive feature for Pro subscribers with enhanced rate limits.

Atomic Operations

Database transactions ensure data consistency. Either everything succeeds or nothing changes.

API Endpoint

POST https://codequiry.com/api/v1/check/quick
Pro Subscription Required: This endpoint is available exclusively to Pro and Enterprise users. Upgrade your plan to access this feature.

Authentication

Include your API key in the request header:

apikey: YOUR_API_KEY_HERE

Get your API key from your API Keys Dashboard. Keep your key secure and never commit it to version control.

Request Parameters

Parameter Type Required Description
name string Required Name of your plagiarism check (3-255 characters)
language integer Required Programming language ID (see supported languages)
files[] array Required Array of ZIP files to upload (max 10MB each, at least 1 file required)
test_type integer Optional Check type (1-14). Default: 1 (Full Check). See test types
webcheck boolean Optional Enable web search (0 or 1). Overridden by test_type if provided
dbcheck boolean Optional Enable database search (0 or 1). Overridden by test_type if provided
Supported Programming Languages
  • 13 - Java
  • 14 - Python
  • 17 - C/C++
  • 18 - C#
  • 21 - PHP
  • 39 - JavaScript
  • 41 - Plain Text
  • 51 - Rust
  • 55 - TypeScript
  • 60 - Go
  • 62 - Swift
  • 63 - Kotlin
Test Types
Test Type Values:
  • 1 - Full Check (Database + Web + GitHub + StackOverflow)
  • 9 - Group Similarity Only (Compares submissions against each other)
  • 2-14 - Various specialized check types (contact support for details)

Success Response

HTTP Status: 201 Created

{
  "success": true,
  "message": "Check created, files uploaded, and analysis started successfully.",
  "data": {
    "check_id": 12345,
    "check_name": "Assignment 1 - Fall 2024",
    "language": "Python",
    "language_id": 14,
    "status": "Processing",
    "status_id": 7,
    "test_type": 1,
    "submissions": {
      "uploaded": 25,
      "failed": 0,
      "total": 25,
      "details": [...]
    },
    "detection_settings": {
      "web_check": true,
      "github_check": true,
      "stackoverflow_check": true,
      "gist_check": true
    },
    "check_url": "https://dashboard.codequiry.com/home/course/123/check/12345",
    "execution_time_ms": 1250.45
  },
  "next_steps": {
    "poll_status": "Use GET /check/get with check_id=12345 to monitor progress",
    "get_results": "Once status is 'Completed', use POST /check/overview with check_id=12345"
  }
}

Error Responses

401 Unauthorized

Invalid or missing API key in request header.

403 Forbidden

Pro subscription required or free checks exhausted.

422 Validation Error

Invalid parameters, missing required fields, or file validation failed.

503 Service Unavailable

Plagiarism checking engine is temporarily offline for maintenance.

Code Examples

Complete, production-ready examples in every major programming language.

Python
import requests

# Your API key from dashboard
API_KEY = "your_api_key_here"
API_URL = "https://codequiry.com/api/v1/check/quick"

# Prepare the request
headers = {
    "apikey": API_KEY
}

data = {
    "name": "Assignment 1 - Fall 2024",
    "language": 14,  # Python
    "test_type": 1   # Full check
}

# Open and upload multiple files
files = [
    ("files[]", ("student1.zip", open("student1.zip", "rb"), "application/zip")),
    ("files[]", ("student2.zip", open("student2.zip", "rb"), "application/zip")),
    ("files[]", ("student3.zip", open("student3.zip", "rb"), "application/zip"))
]

# Make the request
try:
    response = requests.post(API_URL, headers=headers, data=data, files=files)
    response.raise_for_status()
    
    result = response.json()
    
    if result["success"]:
        print(f"✅ Check created successfully!")
        print(f"Check ID: {result['data']['check_id']}")
        print(f"Uploaded: {result['data']['submissions']['uploaded']} files")
        print(f"Status: {result['data']['status']}")
        print(f"Execution time: {result['data']['execution_time_ms']}ms")
        print(f"\nView results: {result['data']['check_url']}")
    else:
        print(f"❌ Error: {result.get('error', 'Unknown error')}")
        
except requests.exceptions.RequestException as e:
    print(f"❌ Request failed: {e}")

finally:
    # Close all file handles
    for _, file_tuple in files:
        file_tuple[1].close()
Node.js / JavaScript
const axios = require('axios');
const FormData = require('form-data');
const fs = require('fs');

// Your API key from dashboard
const API_KEY = 'your_api_key_here';
const API_URL = 'https://codequiry.com/api/v1/check/quick';

async function runQuickCheck() {
    try {
        // Create form data
        const formData = new FormData();
        formData.append('name', 'Assignment 1 - Fall 2024');
        formData.append('language', 14); // Python
        formData.append('test_type', 1);  // Full check
        
        // Add multiple files
        formData.append('files[]', fs.createReadStream('student1.zip'));
        formData.append('files[]', fs.createReadStream('student2.zip'));
        formData.append('files[]', fs.createReadStream('student3.zip'));
        
        // Make the request
        const response = await axios.post(API_URL, formData, {
            headers: {
                'apikey': API_KEY,
                ...formData.getHeaders()
            }
        });
        
        const result = response.data;
        
        if (result.success) {
            console.log('✅ Check created successfully!');
            console.log(`Check ID: ${result.data.check_id}`);
            console.log(`Uploaded: ${result.data.submissions.uploaded} files`);
            console.log(`Status: ${result.data.status}`);
            console.log(`Execution time: ${result.data.execution_time_ms}ms`);
            console.log(`\nView results: ${result.data.check_url}`);
        } else {
            console.error(`❌ Error: ${result.error}`);
        }
        
    } catch (error) {
        if (error.response) {
            console.error(`❌ API Error: ${error.response.data.error || error.response.statusText}`);
        } else {
            console.error(`❌ Request failed: ${error.message}`);
        }
    }
}

runQuickCheck();
PHP
<?php

// Your API key from dashboard
$apiKey = 'your_api_key_here';
$apiUrl = 'https://codequiry.com/api/v1/check/quick';

// Prepare the data
$data = [
    'name' => 'Assignment 1 - Fall 2024',
    'language' => 14,  // Python
    'test_type' => 1   // Full check
];

// Prepare files to upload
$files = [
    new CURLFile('student1.zip', 'application/zip', 'student1.zip'),
    new CURLFile('student2.zip', 'application/zip', 'student2.zip'),
    new CURLFile('student3.zip', 'application/zip', 'student3.zip')
];

// Add files to data array
foreach ($files as $index => $file) {
    $data["files[$index]"] = $file;
}

// Initialize cURL
$ch = curl_init($apiUrl);

// Set cURL options
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "apikey: $apiKey"
    ]
]);

// Execute request
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$error = curl_error($ch);
curl_close($ch);

// Handle response
if ($error) {
    echo "❌ Request failed: $error\n";
    exit(1);
}

$result = json_decode($response, true);

if ($httpCode === 201 && $result['success']) {
    echo "✅ Check created successfully!\n";
    echo "Check ID: {$result['data']['check_id']}\n";
    echo "Uploaded: {$result['data']['submissions']['uploaded']} files\n";
    echo "Status: {$result['data']['status']}\n";
    echo "Execution time: {$result['data']['execution_time_ms']}ms\n";
    echo "\nView results: {$result['data']['check_url']}\n";
} else {
    echo "❌ Error: " . ($result['error'] ?? 'Unknown error') . "\n";
}
?>
Java
import java.io.File;
import java.io.IOException;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
import java.nio.file.Files;
import org.json.JSONObject;

public class QuickCheckExample {
    
    private static final String API_KEY = "your_api_key_here";
    private static final String API_URL = "https://codequiry.com/api/v1/check/quick";
    
    public static void main(String[] args) {
        try {
            // Create multipart form data
            String boundary = "----CodequiryBoundary" + System.currentTimeMillis();
            
            StringBuilder formData = new StringBuilder();
            
            // Add text fields
            formData.append("--").append(boundary).append("\r\n");
            formData.append("Content-Disposition: form-data; name=\"name\"\r\n\r\n");
            formData.append("Assignment 1 - Fall 2024\r\n");
            
            formData.append("--").append(boundary).append("\r\n");
            formData.append("Content-Disposition: form-data; name=\"language\"\r\n\r\n");
            formData.append("14\r\n");
            
            formData.append("--").append(boundary).append("\r\n");
            formData.append("Content-Disposition: form-data; name=\"test_type\"\r\n\r\n");
            formData.append("1\r\n");
            
            // Add files (simplified - in production use a proper multipart library)
            File[] files = {
                new File("student1.zip"),
                new File("student2.zip"),
                new File("student3.zip")
            };
            
            for (File file : files) {
                formData.append("--").append(boundary).append("\r\n");
                formData.append("Content-Disposition: form-data; name=\"files[]\"; filename=\"")
                        .append(file.getName()).append("\"\r\n");
                formData.append("Content-Type: application/zip\r\n\r\n");
                // In production, add actual file bytes here
                formData.append("\r\n");
            }
            
            formData.append("--").append(boundary).append("--\r\n");
            
            // Create HTTP client and request
            HttpClient client = HttpClient.newHttpClient();
            
            HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create(API_URL))
                .header("apikey", API_KEY)
                .header("Content-Type", "multipart/form-data; boundary=" + boundary)
                .POST(HttpRequest.BodyPublishers.ofString(formData.toString()))
                .build();
            
            // Send request
            HttpResponse response = client.send(
                request, 
                HttpResponse.BodyHandlers.ofString()
            );
            
            // Parse response
            JSONObject result = new JSONObject(response.body());
            
            if (response.statusCode() == 201 && result.getBoolean("success")) {
                JSONObject data = result.getJSONObject("data");
                
                System.out.println("✅ Check created successfully!");
                System.out.println("Check ID: " + data.getInt("check_id"));
                System.out.println("Uploaded: " + data.getJSONObject("submissions").getInt("uploaded") + " files");
                System.out.println("Status: " + data.getString("status"));
                System.out.println("Execution time: " + data.getDouble("execution_time_ms") + "ms");
                System.out.println("\nView results: " + data.getString("check_url"));
            } else {
                System.err.println("❌ Error: " + result.optString("error", "Unknown error"));
            }
            
        } catch (IOException | InterruptedException e) {
            System.err.println("❌ Request failed: " + e.getMessage());
        }
    }
}
Ruby
require 'net/http'
require 'uri'
require 'json'

# Your API key from dashboard
API_KEY = 'your_api_key_here'
API_URL = 'https://codequiry.com/api/v1/check/quick'

def run_quick_check
  uri = URI.parse(API_URL)
  
  # Create multipart form data
  boundary = "----CodequiryBoundary#{Time.now.to_i}"
  
  # Prepare form data
  form_data = []
  
  # Add text fields
  form_data << "--#{boundary}\r\n"
  form_data << "Content-Disposition: form-data; name=\"name\"\r\n\r\n"
  form_data << "Assignment 1 - Fall 2024\r\n"
  
  form_data << "--#{boundary}\r\n"
  form_data << "Content-Disposition: form-data; name=\"language\"\r\n\r\n"
  form_data << "14\r\n"
  
  form_data << "--#{boundary}\r\n"
  form_data << "Content-Disposition: form-data; name=\"test_type\"\r\n\r\n"
  form_data << "1\r\n"
  
  # Add files
  ['student1.zip', 'student2.zip', 'student3.zip'].each do |filename|
    form_data << "--#{boundary}\r\n"
    form_data << "Content-Disposition: form-data; name=\"files[]\"; filename=\"#{filename}\"\r\n"
    form_data << "Content-Type: application/zip\r\n\r\n"
    form_data << File.read(filename, mode: 'rb')
    form_data << "\r\n"
  end
  
  form_data << "--#{boundary}--\r\n"
  
  # Create request
  request = Net::HTTP::Post.new(uri.path)
  request['apikey'] = API_KEY
  request['Content-Type'] = "multipart/form-data; boundary=#{boundary}"
  request.body = form_data.join
  
  # Send request
  response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
    http.request(request)
  end
  
  # Parse response
  result = JSON.parse(response.body)
  
  if response.code == '201' && result['success']
    data = result['data']
    
    puts "✅ Check created successfully!"
    puts "Check ID: #{data['check_id']}"
    puts "Uploaded: #{data['submissions']['uploaded']} files"
    puts "Status: #{data['status']}"
    puts "Execution time: #{data['execution_time_ms']}ms"
    puts "\nView results: #{data['check_url']}"
  else
    puts "❌ Error: #{result['error'] || 'Unknown error'}"
  end
  
rescue StandardError => e
  puts "❌ Request failed: #{e.message}"
end

run_quick_check
Go
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "io"
    "mime/multipart"
    "net/http"
    "os"
)

const (
    APIKey = "your_api_key_here"
    APIURL = "https://codequiry.com/api/v1/check/quick"
)

type Response struct {
    Success bool   `json:"success"`
    Message string `json:"message"`
    Data    struct {
        CheckID         int    `json:"check_id"`
        CheckName       string `json:"check_name"`
        Language        string `json:"language"`
        Status          string `json:"status"`
        ExecutionTimeMs float64 `json:"execution_time_ms"`
        CheckURL        string `json:"check_url"`
        Submissions     struct {
            Uploaded int `json:"uploaded"`
            Failed   int `json:"failed"`
        } `json:"submissions"`
    } `json:"data"`
    Error string `json:"error"`
}

func main() {
    // Create a buffer to write our multipart form data
    var requestBody bytes.Buffer
    multipartWriter := multipart.NewWriter(&requestBody)
    
    // Add form fields
    multipartWriter.WriteField("name", "Assignment 1 - Fall 2024")
    multipartWriter.WriteField("language", "14")
    multipartWriter.WriteField("test_type", "1")
    
    // Add files
    files := []string{"student1.zip", "student2.zip", "student3.zip"}
    
    for _, filename := range files {
        file, err := os.Open(filename)
        if err != nil {
            fmt.Printf("❌ Error opening file %s: %v\n", filename, err)
            continue
        }
        defer file.Close()
        
        part, err := multipartWriter.CreateFormFile("files[]", filename)
        if err != nil {
            fmt.Printf("❌ Error creating form file: %v\n", err)
            continue
        }
        
        _, err = io.Copy(part, file)
        if err != nil {
            fmt.Printf("❌ Error copying file content: %v\n", err)
            continue
        }
    }
    
    // Close multipart writer
    multipartWriter.Close()
    
    // Create HTTP request
    req, err := http.NewRequest("POST", APIURL, &requestBody)
    if err != nil {
        fmt.Printf("❌ Error creating request: %v\n", err)
        return
    }
    
    // Set headers
    req.Header.Set("apikey", APIKey)
    req.Header.Set("Content-Type", multipartWriter.FormDataContentType())
    
    // Send request
    client := &http.Client{}
    resp, err := client.Do(req)
    if err != nil {
        fmt.Printf("❌ Error sending request: %v\n", err)
        return
    }
    defer resp.Body.Close()
    
    // Parse response
    var result Response
    err = json.NewDecoder(resp.Body).Decode(&result)
    if err != nil {
        fmt.Printf("❌ Error parsing response: %v\n", err)
        return
    }
    
    // Handle response
    if resp.StatusCode == 201 && result.Success {
        fmt.Println("✅ Check created successfully!")
        fmt.Printf("Check ID: %d\n", result.Data.CheckID)
        fmt.Printf("Uploaded: %d files\n", result.Data.Submissions.Uploaded)
        fmt.Printf("Status: %s\n", result.Data.Status)
        fmt.Printf("Execution time: %.2fms\n", result.Data.ExecutionTimeMs)
        fmt.Printf("\nView results: %s\n", result.Data.CheckURL)
    } else {
        fmt.Printf("❌ Error: %s\n", result.Error)
    }
}
C# / .NET
using System;
using System.IO;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;

class QuickCheckExample
{
    private const string API_KEY = "your_api_key_here";
    private const string API_URL = "https://codequiry.com/api/v1/check/quick";
    
    static async Task Main(string[] args)
    {
        try
        {
            using var httpClient = new HttpClient();
            using var form = new MultipartFormDataContent();
            
            // Add API key header
            httpClient.DefaultRequestHeaders.Add("apikey", API_KEY);
            
            // Add form fields
            form.Add(new StringContent("Assignment 1 - Fall 2024"), "name");
            form.Add(new StringContent("14"), "language");
            form.Add(new StringContent("1"), "test_type");
            
            // Add files
            string[] files = { "student1.zip", "student2.zip", "student3.zip" };
            
            foreach (var filePath in files)
            {
                var fileStream = File.OpenRead(filePath);
                var fileContent = new StreamContent(fileStream);
                fileContent.Headers.ContentType = new MediaTypeHeaderValue("application/zip");
                form.Add(fileContent, "files[]", Path.GetFileName(filePath));
            }
            
            // Send request
            var response = await httpClient.PostAsync(API_URL, form);
            var responseContent = await response.Content.ReadAsStringAsync();
            
            // Parse JSON response
            var result = JObject.Parse(responseContent);
            
            if (response.StatusCode == System.Net.HttpStatusCode.Created && 
                result["success"]?.Value() == true)
            {
                var data = result["data"];
                
                Console.WriteLine("✅ Check created successfully!");
                Console.WriteLine($"Check ID: {data["check_id"]}");
                Console.WriteLine($"Uploaded: {data["submissions"]["uploaded"]} files");
                Console.WriteLine($"Status: {data["status"]}");
                Console.WriteLine($"Execution time: {data["execution_time_ms"]}ms");
                Console.WriteLine($"\nView results: {data["check_url"]}");
            }
            else
            {
                Console.WriteLine($"❌ Error: {result["error"]}");
            }
        }
        catch (Exception ex)
        {
            Console.WriteLine($"❌ Request failed: {ex.Message}");
        }
    }
}
cURL (Command Line)
curl -X POST "https://codequiry.com/api/v1/check/quick" \
  -H "apikey: your_api_key_here" \
  -F "name=Assignment 1 - Fall 2024" \
  -F "language=14" \
  -F "test_type=1" \
  -F "files[][email protected]" \
  -F "files[][email protected]" \
  -F "files[][email protected]"

Best Practices

Secure Your API Key

Never commit your API key to version control. Use environment variables or secure key management.

Poll for Status

Use the check_id to poll /check/get every 5-10 seconds until status is "Completed".

Handle Errors Gracefully

Always check for errors and implement retry logic with exponential backoff for transient failures.

Optimize File Sizes

Keep ZIP files under 5MB when possible. Remove unnecessary files like .git, node_modules, etc.

Frequently Asked Questions

How long does a check take?

Most checks complete in 2-10 minutes depending on the number of files and test type selected. Checks with web search enabled may take longer.

Can I use this endpoint without a Pro subscription?

No, the Quick Check API is exclusive to Pro and Enterprise subscribers. Upgrade your plan to access this feature.

What's the maximum number of files I can upload?

There's no hard limit on file count, but each file must be under 10MB and we recommend batches of 100 files or less for optimal performance.

What file formats are supported?

Only ZIP archives are supported. Each ZIP should contain the source code files you want to analyze.

How is this different from the standard API?

The standard API requires 3 separate calls (create, upload, start). The Quick Check API combines all three into one atomic operation, reducing latency and code complexity by ~70%.

What happens if some files fail to upload?

The check will proceed with successfully uploaded files. Failed uploads are reported in the response under failed_uploads with error details.

Need Help? Our support team is here to assist you. Contact us at [email protected] or visit our support center.