Get bounding boxes for an extraction

Bounding boxes highlighting the region of the document page that contains the extracted value, in 0-1000 normalized page coordinates. Returns an empty list for web-sourced extractions (which have no page to highlight). Bounding boxes are generated lazily on first access; cached responses are returned on subsequent requests.

On this page

HTTP request

GET https://api.parsewise.ai/api/v1/projects/{project_id}/extractions/{extraction_id}/bounding-boxes/

URI Parameters

Name In Required Type Description
extraction_id path Yes string (uuid)  
project_id path Yes string (uuid)  

Request Header

Name Required Type Description
X-API-Key Yes string API key with the pw_live_ prefix. See Authentication.

Responses

Status Type Description
200 array<V1BoundingBox>

Security

  • ApiKeyAuth — apiKey — in X-API-Key header. API key with pw_live_ prefix.

Python example

import os
import requests

API_KEY = os.environ["PARSEWISE_API_KEY"]
BASE_URL = "https://api.parsewise.ai/api/v1"

extraction_id = "<uuid>"
project_id = "<uuid>"

resp = requests.get(
    f"{BASE_URL}/projects/{project_id}/extractions/{extraction_id}/bounding-boxes/",
    headers={"X-API-Key": API_KEY},
)
resp.raise_for_status()
print(resp.json() if resp.content else None)

Definitions

V1BoundingBox

A single bounding box highlighting where on a page an extraction was found.

Coordinates use a 0-1000 normalized page coordinate space (independent of the page’s pixel dimensions): (0, 0) is the top-left corner of the page and (1000, 1000) is the bottom-right corner. To overlay a box on a rendered page image, scale by the rendered image’s width and height.

Name Required Type Description
x0 Yes integer Left edge in 0-1000 normalized page coordinates (0 = left edge of page, 1000 = right edge).
y0 Yes integer Top edge in 0-1000 normalized page coordinates (0 = top of page, 1000 = bottom).
x1 Yes integer Right edge in 0-1000 normalized page coordinates (0 = left edge of page, 1000 = right edge).
y1 Yes integer Bottom edge in 0-1000 normalized page coordinates (0 = top of page, 1000 = bottom).