---
schema_version: "1"
id: 8b26715e46abed1b570a532c36038b51071a3179602fe0b0c233581dd85d7edf
title: Detect Text and Tables
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/einstein-vision-language/einstein/guides/Detect-Text-in-Images/detect-text-and-tables.md
canonical_url: https://developer.salesforce.com/docs/analytics/einstein-vision-language/guide/detect-text-and-tables.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 6a497666712259b8a37d45738830c949d85899a237ee03a8de6e82a1ae6940d7
products:
  - Einstein Vision and Language
  - Einstein Vision and Language Repo
---

# Detect Text and Tables

Some images contain tabular data. To return the table data for each text element, specify the `tabulatev2` model and a `task` parameter value of `table`.

![TableOriginal](https://developer.salesforce.com/media/table_original.png)

The cURL call looks like this.

```cURL
curl -X POST -H "Authorization: Bearer <TOKEN>" -F sampleContent="@/filepath/table.png" -F task="table" -F modelId="tabulatev2" https://api.einstein.ai/v2/vision/ocr
```

The response looks like this JSON.

```json
{
    "task": "table",
    "probabilities": [
        {
            "probability": 0.9952141,
            "label": "City",
            "boundingBox": {
                "minX": 158,
                "minY": 50,
                "maxX": 214,
                "maxY": 82
            },
            "attributes": {
                "cellLocation": {
                    "rowIndex": 1,
                    "colIndex": 1
                },
                "pageNumber": "1"
            }
        },
        {
            "probability": 0.99889404,
            "label": "Number of Events",
            "boundingBox": {
                "minX": 405,
                "minY": 50,
                "maxX": 659,
                "maxY": 75
            },
            "attributes": {
                "cellLocation": {
                    "rowIndex": 1,
                    "colIndex": 2
                },
                "pageNumber": "1"
            }
        },
        {
            "probability": 0.9988783,
            "label": "Number of Stations",
            "boundingBox": {
                "minX": 773,
                "minY": 51,
                "maxX": 1048,
                "maxY": 75
            },
            "attributes": {
                "cellLocation": {
                    "rowIndex": 1,
                    "colIndex": 3
                },
                "pageNumber": "1"
            }
        },
        {
            "probability": 0.99629766,
            "label": "San Francisco",
            "boundingBox": {
                "minX": 91,
                "minY": 115,
                "maxX": 282,
                "maxY": 140
            },
            "attributes": {
                "cellLocation": {
                    "rowIndex": 2,
                    "colIndex": 1
                },
                "pageNumber": "1"
            }
        },
        {
            "probability": 0.9942451,
            "label": "100",
            "boundingBox": {
                "minX": 511,
                "minY": 116,
                "maxX": 557,
                "maxY": 140
            },
            "attributes": {
                "cellLocation": {
                    "rowIndex": 2,
                    "colIndex": 2
                },
                "pageNumber": "1"
            }
        },
        {
            "probability": 0.97811675,
            "label": "21",
            "boundingBox": {
                "minX": 894,
                "minY": 116,
                "maxX": 924,
                "maxY": 139
            },
            "attributes": {
                "cellLocation": {
                    "rowIndex": 2,
                    "colIndex": 3
                },
                "pageNumber": "1"
            }
        },
        {
            "probability": 0.9973557,
            "label": "San Diego",
            "boundingBox": {
                "minX": 117,
                "minY": 180,
                "maxX": 256,
                "maxY": 213
            },
            "attributes": {
                "cellLocation": {
                    "rowIndex": 3,
                    "colIndex": 1
                },
                "pageNumber": "1"
            }
        },
        {
            "probability": 0.99561936,
            "label": "123",
            "boundingBox": {
                "minX": 510,
                "minY": 182,
                "maxX": 558,
                "maxY": 206
            },
            "attributes": {
                "cellLocation": {
                    "rowIndex": 3,
                    "colIndex": 2
                },
                "pageNumber": "1"
            }
        },
        {
            "probability": 0.9816425,
            "label": "18",
            "boundingBox": {
                "minX": 896,
                "minY": 181,
                "maxX": 926,
                "maxY": 206
            },
            "attributes": {
                "cellLocation": {
                    "rowIndex": 3,
                    "colIndex": 3
                },
                "pageNumber": "1"
            }
        },
        {
            "probability": 0.9973557,
            "label": "San Jose",
            "boundingBox": {
                "minX": 125,
                "minY": 246,
                "maxX": 248,
                "maxY": 271
            },
            "attributes": {
                "cellLocation": {
                    "rowIndex": 4,
                    "colIndex": 1
                },
                "pageNumber": "1"
            }
        },
        {
            "probability": 0.9696964,
            "label": "53",
            "boundingBox": {
                "minX": 517,
                "minY": 247,
                "maxX": 549,
                "maxY": 270
            },
            "attributes": {
                "cellLocation": {
                    "rowIndex": 4,
                    "colIndex": 2
                },
                "pageNumber": "1"
            }
        },
        {
            "probability": 0.9926605,
            "label": "189",
            "boundingBox": {
                "minX": 888,
                "minY": 247,
                "maxX": 935,
                "maxY": 271
            },
            "attributes": {
                "cellLocation": {
                    "rowIndex": 4,
                    "colIndex": 3
                },
                "pageNumber": "1"
            }
        }
    ],
    "object": "predictresponse"
}
```

The above JSON describes Einstein's detection of the table elements, and is depicted below:

![TableWithOCRCallouts](https://developer.salesforce.com/media/table_ocr_with_caps.png)

## Multiple Tables on a Page

When an image contains more than one table, Einstein returns tabular data for each table in the image. The following image depicts how the tables and fields are denoted in the JSON. (The JSON is not provided). With this example, three tables are identified: One 3x2, one 2x5, and one 2x2. The values in the second row of the 2x2 table cells will be identified separately, resulting in a 2x6 JSON table definition.

![MultiTableExample](https://developer.salesforce.com/media/multi-table-example.png)

**note:** We currently support only the content confined within the individual tables. Free text in the image which lies outside of a table border is not processed.
