API Reference

Explore the API and inspect its OpenAPI specification.

Integration guide

Try /api/v1/check

OpenAPI specification
{
  "openapi": "3.0.0",
  "info": {
    "title": "PlagiarismGuard API",
    "version": "1.0.0",
    "description": "\nThe PlagiarismGuard API allows you to programmatically check text for plagiarism. \nIntegrate our powerful plagiarism detection into your applications, websites, or workflows.\n\n## Authentication\nAll API requests require authentication using a Bearer token in the Authorization header.\n\n```\nAuthorization: Bearer YOUR_API_KEY\n```\n\nGet your API key from the [Dashboard](/dashboard/api-keys).\n\n## Rate Limits\nPlans have no per-day check cap. Monthly word and API allowances, per-check word limits, and short-term abuse-protection rate limits still apply.\n\n## Word-Based Usage\nEach check consumes its word count from your monthly word allowance. Page counts (1 page = 250 words) are historical reporting only.\n\n## Processing Speed\nHigher tier plans have faster parallel processing for quicker plagiarism checks.\n    ",
    "contact": {
      "name": "PlagiarismGuard Support",
      "email": "support@plagiarismguardpro.com"
    }
  },
  "servers": [
    {
      "url": "/api/v1",
      "description": "API v1"
    }
  ],
  "tags": [
    {
      "name": "Plagiarism Checks",
      "description": "Endpoints for checking text for plagiarism"
    },
    {
      "name": "Usage",
      "description": "Endpoints for viewing API usage statistics"
    }
  ],
  "paths": {
    "/check": {
      "post": {
        "tags": [
          "Plagiarism Checks"
        ],
        "summary": "Check text for plagiarism",
        "description": "Submit text to be checked for plagiarism. Returns a plagiarism score and matched sources.",
        "operationId": "checkPlagiarism",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 50,
                    "description": "The text to check for plagiarism (minimum 50 characters)",
                    "example": "This is the text that will be checked for plagiarism. It should be at least 50 characters long for accurate results."
                  },
                  "title": {
                    "type": "string",
                    "description": "Optional title for the document",
                    "example": "My Research Paper"
                  },
                  "excludeUrls": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "URLs to exclude from plagiarism matching",
                    "example": [
                      "https://mywebsite.com/original-content"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Plagiarism check completed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "clx1234567890"
                        },
                        "plagiarismScore": {
                          "type": "number",
                          "example": 15.5
                        },
                        "uniqueScore": {
                          "type": "number",
                          "example": 84.5
                        },
                        "wordCount": {
                          "type": "integer",
                          "example": 250
                        },
                        "sentenceCount": {
                          "type": "integer",
                          "example": 12
                        },
                        "status": {
                          "type": "string",
                          "example": "completed"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "sources": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": "string"
                              },
                              "title": {
                                "type": "string"
                              },
                              "matchPercentage": {
                                "type": "number"
                              },
                              "matchedText": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "pageUsage": {
                          "type": "object",
                          "description": "Page usage information for this check",
                          "properties": {
                            "pagesUsed": {
                              "type": "integer",
                              "example": 4
                            },
                            "totalPagesUsedThisMonth": {
                              "type": "integer",
                              "example": 150
                            },
                            "pagesRemaining": {
                              "type": "integer",
                              "example": -1
                            },
                            "monthlyPageLimit": {
                              "type": "integer",
                              "example": -1,
                              "description": "Legacy field. Pages do not limit checks."
                            },
                            "isUnlimited": {
                              "type": "boolean",
                              "example": true
                            },
                            "resetDate": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "wordsPerPage": {
                              "type": "integer",
                              "example": 250
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Plagiarism Checks"
        ],
        "summary": "List plagiarism checks",
        "description": "Get a list of all plagiarism checks for the authenticated user",
        "operationId": "listChecks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "description": "Optional check ID to get a specific check",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of plagiarism checks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "checks": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "title": {
                                "type": "string"
                              },
                              "plagiarismScore": {
                                "type": "number"
                              },
                              "uniqueScore": {
                                "type": "number"
                              },
                              "wordCount": {
                                "type": "integer"
                              },
                              "status": {
                                "type": "string"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            }
                          }
                        },
                        "pagination": {
                          "type": "object",
                          "properties": {
                            "page": {
                              "type": "integer"
                            },
                            "limit": {
                              "type": "integer"
                            },
                            "total": {
                              "type": "integer"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/usage": {
      "get": {
        "tags": [
          "Usage"
        ],
        "summary": "Get API usage statistics",
        "description": "Get the current API usage statistics for the authenticated user",
        "operationId": "getUsage",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Usage statistics",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "plan": {
                          "type": "string",
                          "example": "Professional"
                        },
                        "pagesUsed": {
                          "type": "integer",
                          "example": 150
                        },
                        "pagesLimit": {
                          "type": "integer",
                          "example": -1,
                          "description": "Legacy field. Pages do not limit checks."
                        },
                        "pagesRemaining": {
                          "type": "integer",
                          "example": -1
                        },
                        "isUnlimited": {
                          "type": "boolean",
                          "example": true
                        },
                        "wordsPerPage": {
                          "type": "integer",
                          "example": 250
                        },
                        "resetDate": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API Key",
        "description": "Enter your API key (e.g., pg_xxxxxxxxxxxx)"
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": false
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "example": "INVALID_API_KEY"
              },
              "message": {
                "type": "string",
                "example": "The provided API key is invalid"
              }
            }
          }
        }
      }
    }
  }
}