Skip to main content

Overview

When extracting content with layout information, Pulse API returns bounding box coordinates for text, tables, and images. This spatial data enables precise document understanding and region-based extraction.

Bounding Box Format

Bounding boxes are returned as normalized coordinates (0-1 range) in an 8-point format:
Where:
  • (x1, y1) = Top-left corner
  • (x2, y2) = Top-right corner
  • (x3, y3) = Bottom-right corner
  • (x4, y4) = Bottom-left corner
Coordinates are normalized to 0-1 range, making them resolution-independent. To convert to pixels, multiply by the page width/height.

Response Structure

The bounding_boxes object groups every detected layout element by its public category. Categories with no detected elements may be omitted.
Every detected layout element is routed into a public grouped category; list items, captions, footers, page numbers, formulas, and selection marks are not discarded. Clients do not need to parse provider-specific category names.

Markdown Fields

Use bounding_boxes.markdown_with_ids when you need to correlate text positions with bounding boxes. Use the top-level markdown for clean content display or export. In markdown_with_ids, each text element is wrapped in <div data-bb-text-id="txt-N">, tables carry data-bb-table-id, table cells carry data-bb-cell-id, and visuals carry data-bb-image-id.

Example Response

Here’s a real example of the bounding_boxes object from a workbook with an embedded chart, with figure_processing.show_images: true:

Field Descriptions

All page_number and location.page values are 1-indexed original document page numbers. This holds even when the request used a pages= subset: extracting pages="10-20" produces items labeled pages 10 through 20 across text items, tables, Words, and extension output.
Every element carries confidence — the extractor’s confidence (0-1) that the element was read correctly, or null when it could not score the element — and reading_order, its position in the document-wide reading order (see Reading Order). Responses from model: pulse-ultra-1 carry average_word_confidence (mean word confidence) instead, and no reading_order.

Text Array

Each text element contains:
  • id: Unique identifier (e.g., txt-1) that links to markdown_with_ids via data-bb-text-id
  • content: The extracted text with prefix (e.g., 0a-NCRI)
  • original_content: The clean extracted text without prefix
  • bounding_box: 8-point coordinate array (may be null for some document types)
  • page_number: Page where the text appears
  • confidence: the extractor’s confidence that the element was read correctly (0-1), or null when it could not score the element
  • reading_order: document-wide reading-order index, shared across categories
  • selected: Selection state when detect_selections was enabled and the item represents a detected form control or marked-choice region

Title Array

Each title element contains:
  • id: Unique identifier linking to markdown
  • content: The title text with prefix
  • original_content: The clean title text
  • bounding_box: 8-point coordinate array
  • page_number: Page where the title appears
  • confidence: the extractor’s confidence that the element was read correctly (0-1), or null when it could not score the element
  • reading_order: document-wide reading-order index, shared across categories

Header Array

Each header element contains:
  • id: Unique identifier linking to markdown
  • content: The header text with prefix
  • original_content: The clean header text
  • bounding_box: 8-point coordinate array
  • page_number: Page where the header appears
  • confidence: the extractor’s confidence that the element was read correctly (0-1), or null when it could not score the element
  • reading_order: document-wide reading-order index, shared across categories
Each footer element contains:
  • id: Unique identifier linking to markdown
  • content: The footer text with prefix
  • original_content: The clean footer text
  • bounding_box: 8-point coordinate array
  • page_number: Page where the footer appears
  • confidence: the extractor’s confidence that the element was read correctly (0-1), or null when it could not score the element
  • reading_order: document-wide reading-order index, shared across categories

Images Array

Each image element represents a detected chart or embedded image. For PDFs and image inputs, entries are populated when figure detection runs. For spreadsheets, entries are populated for embedded charts and images directly read from the workbook.

Fetching Visual Image Bytes

When you set figure_processing.show_images: true on /extract, every chart/image entry comes back with an image_url pointing at GET /results/{jobId}/images/{filename}. Fetch it with your API key to get the raw PNG/JPEG bytes:
See Get Result Image for the full auth contract — visual image fetches always require same-org x-api-key authentication; there is no anonymous access.

Tables Array

The extraction engine decides which table regions exist. Pulse then runs CPU-only cell geometry detection inside those exact table crops. It never creates extra tables from regions the extraction engine did not identify. Each Tables[] entry contains: Each cell_data[] item contains:

Words Array

Words[] is the standard word geometry collection used to preserve the extraction response contract. Each item contains content, page_number, confidence, and a polygon represented as [{"x": number, "y": number}, ...].

Selection Marks Array

When selection detection finds marked controls, SelectionMarks[] contains page_number, state (selected or unselected), confidence, and a normalized polygon.

Page Number Array

Each page number element contains:
  • id: Unique identifier
  • content: The page number text
  • original_content: The clean page number text
  • bounding_box: 8-point coordinate array
  • page_number: Page where it appears
  • confidence: the extractor’s confidence that the element was read correctly (0-1), or null when it could not score the element
  • reading_order: document-wide reading-order index, shared across categories
The id field allows you to link bounding box elements to specific locations in the markdown_with_ids field via data-bb-text-id attributes.

Reading Order

Grouping elements by category loses the order the page was read in. Every element carries reading_order, the extractor’s document-wide index: sort the union of Text, Title, Header, Footer, List Items, caption, Page Number, Formulas, Tables (table_info.reading_order) and Images by it to rebuild the document flow. Requests with model: pulse-ultra-2 also return the flow directly as bounding_boxes.ordered_elements, one entry per element in reading order: ordered_elements is not returned on the default profile; use reading_order there.

Footnote References

When you enable extensions.footnote_references in your extract request, the response includes an extensions.footnoteReferences array that links each footnote to the body text that cites it, using bounding box IDs and coordinates. Each entry contains:
  • symbol — the footnote marker as written in the footnote text (e.g. *, , , (1))
  • footnoteTextId, footnotePageNumber, footnoteText — where the footnote text lives and what it says
  • referenceTextIdsid values from the Text, Title, or Header arrays for body blocks that contain the marker
  • references — one entry per located marker occurrence, with the citing block (or table cell), its page, and the marker’s own bounding box when it could be pinned
Use footnoteTextId to look up the footnote’s position in bounding_boxes.Footer (or bounding_boxes.Text), and each references[] entry to highlight the exact marker: markerBoundingBox is in the same normalized coordinates as every other bounding_box, so it can be drawn directly on the page. Several footnotes can share one footnoteTextId when the extractor returned them as a single block; symbol plus footnoteTextId is the unique key.
Footnote references are available for PDFs and images. Text-based PDFs give the most precise marker positions. See the Extract endpoint for the full field reference and usage examples.

Converting Coordinates

To convert normalized coordinates to pixel coordinates:

Next Steps

Extract Endpoint

Enable bounding box extraction

Structured Output

Combine with structured data