# Image Plagiarism Detection

> Search the web for unauthorized copies of an image.

<RequestExample>

```bash cURL
curl --request POST \
  --url https://api.copyleaks.com/v1/image-plagiarism-detector/my-scan-1/check \
  --header 'Authorization: Bearer YOUR_LOGIN_TOKEN' \
  --form 'image=@/path/to/my-photo.jpg' \
  --form 'filename=my-photo.jpg' \
  --form 'sandbox=false'
```

```python Python
import requests

url = 'https://api.copyleaks.com/v1/image-plagiarism-detector/my-scan-1/check'
headers = {'Authorization': 'Bearer YOUR_LOGIN_TOKEN'}

with open('my-photo.jpg', 'rb') as image_file:
    files = {'image': ('my-photo.jpg', image_file, 'image/jpeg')}
    data = {'filename': 'my-photo.jpg', 'sandbox': 'false'}
    response = requests.post(url, files=files, data=data, headers=headers)

result = response.json()
print(f"Total matches: {result['matches']['score']['totalMatches']}")
print(f"Full matches: {result['matches']['score']['fullMatches']}")
print(f"Partial matches: {result['matches']['score']['partialMatches']}")
```

```javascript JavaScript
const imageFile = document.getElementById('fileInput').files[0];
const formData = new FormData();

formData.append('image', imageFile);
formData.append('filename', imageFile.name);
formData.append('sandbox', 'false');

const response = await fetch(
  'https://api.copyleaks.com/v1/image-plagiarism-detector/my-scan-1/check',
  {
    method: 'POST',
    headers: { 'Authorization': 'Bearer YOUR_LOGIN_TOKEN' },
    body: formData,
  }
);

const result = await response.json();
console.log('Total matches:', result.matches.score.totalMatches);
console.log('Matches:', result.matches.internet);
```

</RequestExample>

<ResponseExample>

```json 200 OK
{
  "developerPayload": "my-custom-data",
  "scannedImage": {
    "scanId": "my-scan-1",
    "expectedCredits": 1,
    "actualCredits": 1,
    "creationTime": "2026-05-24T10:00:00Z",
    "width": 1920,
    "height": 1080,
    "filename": "my-photo.jpg"
  },
  "matches": {
    "internet": [
      {
        "url": "https://example.com/images/photo.jpg",
        "matchType": 0,
        "webPages": [
          { "url": "https://example.com/blog/my-post" },
          { "url": "https://example.org/news/article" }
        ]
      },
      {
        "url": "https://example.com/thumbs/photo-thumb.jpg",
        "matchType": 1,
        "webPages": [
          { "url": "https://example.org/gallery" }
        ]
      },
      {
        "url": "https://example.org/gallery/photo-sm.jpg",
        "matchType": 1
      }
    ],
    "score": {
      "totalMatches": 3,
      "fullMatches": 1,
      "partialMatches": 2
    }
  }
}
```

</ResponseExample>

Search the web for copies of an image. Returns a list of full matches (exact or near-exact copies) and partial matches (cropped, resized, or modified versions), each with the web pages where the image was found - all in a single synchronous API call.

<Warning>
**Authentication Required.** You need to login with a user and API key in order to access this method. Add this HTTP header to your request:

**Authorization: Bearer &lt;Your-Login-Token&gt;**
</Warning>

<Warning title="Rate Limits">
Image Plagiarism Detection has a rate limit of **1,800 requests per 15 minutes** per user. If exceeded, requests will be rejected with a 429 status code until the rate limit window resets.
</Warning>

## Request

### Path Parameters

<ParamField path="scanId" type="string" required>
  A unique scan ID provided by you. We recommend you use the same ID in your database to represent the scan. Using the same ID for the same file helps avoid duplicate scans caused by network issues. Learn more about [the criteria for creating a Scan ID](/concepts/management/choosing-scan-id).

  `>= 3 characters` `<= 36 characters`
</ParamField>

### Supported Content Type

Submit images using **multipart/form-data**.

**Headers:**
```http
Content-Type: multipart/form-data
Authorization: Bearer YOUR_LOGIN_TOKEN
```

### Body Parameters

<ParamField body="image" type="file" required>
  Binary image file to check for plagiarism.

  **Requirements:**
  - **File size:** Less than 20MB
  - **Max resolution:** 75 megapixels (width × height ≤ 75,000,000)
  - **Formats:** JPG, JPEG, PNG, GIF, BMP, WebP, RAW, ICO
</ParamField>

<ParamField body="filename" type="string" required>
  The name of the image file including its extension.

  **Requirements:**
  - Allowed extensions: `.jpg`, `.jpeg`, `.png`, `.gif`, `.bmp`, `.webp`, `.ico`
  - `<= 255 characters`

  Example: `"my-photo.jpg"`
</ParamField>

<ParamField body="sandbox" type="boolean" default="false">
  Use sandbox mode to test your integration without consuming credits. Returns mock results.
</ParamField>

<ParamField body="developerPayload" type="string">
  An optional custom string you can attach to the request. It is echoed back unchanged in the response under `developerPayload`. Useful for correlating results with your own records.
</ParamField>

## Responses

<Tabs>
  <Tab title="200">
    <Check>**200 OK**  The image was successfully analyzed. See the [Image Plagiarism Response](/reference/data-types/authenticity/results/image-plagiarism-response) for the full response structure.</Check>

    ```json
    {
      "developerPayload": null,
      "scannedImage": {
        "scanId": "my-scan-1",
        "expectedCredits": 1,
        "actualCredits": 1,
        "creationTime": "2026-05-24T10:00:00Z",
        "width": 1920,
        "height": 1080,
        "filename": "my-photo.jpg"
      },
      "matches": {
        "internet": [
          {
            "url": "https://example.com/images/photo.jpg",
            "matchType": 0,
            "webPages": [
              { "url": "https://example.com/blog/my-post" }
            ]
          },
          {
            "url": "https://example.com/thumbs/photo.jpg",
            "matchType": 1
          }
        ],
        "score": {
          "totalMatches": 2,
          "fullMatches": 1,
          "partialMatches": 1
        }
      }
    }
    ```
  </Tab>
  <Tab title="400">
    <Warning>**400 Bad Request**  Invalid request parameters, unsupported file format, or image validation failure (e.g. file too large, resolution too high, corrupt file).</Warning>
  </Tab>
  <Tab title="401">
    <Warning>**401 Unauthorized**  Authentication or authorization issues.</Warning>
  </Tab>
  <Tab title="402">
    <Warning>**402 Payment Required**  Insufficient credits.</Warning>
  </Tab>
  <Tab title="429">
    <Warning>**429 Too Many Requests**  Rate limit exceeded. The request has been rejected.</Warning>
  </Tab>
  <Tab title="500">
    <Warning>**500 Internal Server Error**  The server encountered an internal error.</Warning>
  </Tab>
</Tabs>
