---
title: Image Text Match
slug: api-marketplace/image-text-match
createdAt: 2025-09-29T10:40:43.478Z
---

## Introduction

The **Image Text Match API&#x20;**&#x69;s designed to verify whether specific text values appear within images or document files such as PDFs, scanned forms, or ID cards. It provides an automated and intelligent way to confirm textual information by performing OCR-based extraction and semantic text comparison.

***

### Endpoint

:::CodeblockTabs
UAT/Testing Endpoint

```text
POST https://api-preproduction.signzy.app/api/v3/text-match/forgeries
```
:::

:::CodeblockTabs
Production

```text
POST https://api.signzy.app/api/v3/text-match/forgeries
```
:::

***

### Request Headers

| Name          | Value            | Required  | Description                                                                                                |
| ------------- | ---------------- | --------- | ---------------------------------------------------------------------------------------------------------- |
| Content-Type  | application/json | Mandatory | The type of content that the request body contains.                                                        |
| Authorization | XXXXXXXXXXXXXXX  | Mandatory | An authentication token to authorize the request. Reach out to the Signzy support team to get one created. |

***

### Request body parameters

| **Parameter**   | **Data Type**    | **Description**                                                                                            | **Required** |
| --------------- | ---------------- | ---------------------------------------------------------------------------------------------------------- | ------------ |
| **Parameter**   | **Data Type**    | **Description**                                                                                            | **Required** |
| **images**      | Array of Strings | List of image or PDF URLs from which the API will extract and analyze text.                                | Mandatory    |
| **fields**      | Object           | Object containing key–value pairs of the text fields that need to be verified within the image.            | Mandatory    |
| **fields.name** | String           | The expected text value for the field name that will be checked against the extracted text from the image. | Mandatory    |

***

### Code samples

:::CodeblockTabs
```curl
curl --location 'https://api-preproduction.signzy.app/api/v3/text-match/forgeries' \
--header 'Content-Type: application/json' \
--header 'Authorization: <auth_key>' \
--data '{
    "images": [
        "https://persist.signzy.tech/api/files/645127873/download/8c017bdcbf4a40c4802a3467e339cd4ae7493f1f738e4c06940b45f2966379e5.pdf"
    ],
    "fields": {
        "name": "400063,CIN: U66010MH2008PLC183679"
    }
}'
```

```nodejs
const axios = require('axios');
let data = JSON.stringify({
  "images": [
    "https://persist.signzy.tech/api/files/645127873/download/8c017bdcbf4a40c4802a3467e339cd4ae7493f1f738e4c06940b45f2966379e5.pdf"
  ],
  "fields": {
    "name": "400063,CIN: U66010MH2008PLC183679"
  }
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api-preproduction.signzy.app/api/v3/text-match/forgeries',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': '<auth_key>'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

```python
import http.client
import json

conn = http.client.HTTPSConnection("api-preproduction.signzy.app")
payload = json.dumps({
  "images": [
    "https://persist.signzy.tech/api/files/645127873/download/8c017bdcbf4a40c4802a3467e339cd4ae7493f1f738e4c06940b45f2966379e5.pdf"
  ],
  "fields": {
    "name": "400063,CIN: U66010MH2008PLC183679"
  }
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': '<auth_key>'
}
conn.request("POST", "/api/v3/text-match/forgeries", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```

```go
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io"
)

func main() {

  url := "https://api-preproduction.signzy.app/api/v3/text-match/forgeries"
  method := "POST"

  payload := strings.NewReader(`{
    "images": [
        "https://persist.signzy.tech/api/files/645127873/download/8c017bdcbf4a40c4802a3467e339cd4ae7493f1f738e4c06940b45f2966379e5.pdf"
    ],
    "fields": {
        "name": "400063,CIN: U66010MH2008PLC183679"
    }
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")
  req.Header.Add("Authorization", "<auth_key>")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := io.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```
:::

***

### Response body parameters

| **Parameter**      | **Data Type** | **Description**                                                                                                  |
| ------------------ | ------------- | ---------------------------------------------------------------------------------------------------------------- |
| **name**           | Object        | Contains the match result details for the name field that was validated.                                         |
| **name.score**     | Float         | Similarity score between the provided field value and the closest extracted text. Ranges from **0.0 to 1.0**.    |
| **name.verb**      | String        | Indicates the match status. Possible values: **"MATCH"**, **"PARTIAL MATCH"**, **"NO MATCH"**.                   |
| **name.bestMatch** | String        | The closest text detected in the image related to the field. Returned only if best match information is enabled. |

:::CodeblockTabs
200

```json
{
    "name": {
        "score": 0.19,
        "verb": "NO MATCH",
        "bestMatch": "FINANCIAL IN PLAN"
    }
}
```

400

```json
// Incorrect image url
{
    "error": {
        "message": "Error in downloading file",
        "name": "error",
        "status": 400,
        "reason": "Error",
        "type": "Bad Request",
        "statusCode": 400
    }
}

// Incorrect threshold values
{
    "error": {
        "message": "\"threshold\" must be less than or equal to 0.95",
        "name": "error",
        "status": 400,
        "reason": "VALIDATION_ERROR",
        "type": "Bad Request",
        "statusCode": 400
    }
}

// file size greater than 5 mb
{
    "error": {
        "message": "File size is greater than 5.000 MB",
        "name": "error",
        "status": 400,
        "reason": "Error",
        "type": "Bad Request",
        "statusCode": 400
    }
}
```

401

```json
{
    "message": "Invalid authentication credentials"
}
```

409

```json
{
    "error": {
        "reason": "Error From Upstream",
        "status": 409,
        "message": "Upstream Down",
        "type": "Conflict",
        "statusCode": 409,
        "name": "error"
    }
}
```
:::

### Document related Constraints:

- Max Image size supported is 5 MB
- For best results, please make sure the image you use fits tightly in the camera view and is horizontally aligned.
- Don't pass the same URL in both the input images. it will throw a 400 error if the same URL is passed in both the first and second image.

***

**Contact Us for Any Assistance**

If you have any questions or need assistance, please reach out to our customer support team. You can contact us via email at <font color="#2166ae">**help\@signzy.com**</font>. We strive to provide prompt and reliable assistance, ensuring your queries are addressed effectively.

We value your feedback and are committed to making your experience smooth and enjoyable. Our team is dedicated to assisting you with any needs you may have. Thank you for choosing our services. We look forward to helping you!
