v1

latestSwagger 2.02026-07-1371041.4 KB
Web Elements

Retrieve web-elements JSON from a completed async HTML→PDF job

For HTML→PDF jobs submitted with async=true AND pdf_web_elements_selectors set, the matched element positions are stored alongside the produced PDF. Use this endpoint to fetch them as a JSON array after the job completes.

Synchronous HTML→PDF requests instead receive web elements inline via the X-SelectPdf-Web-Elements response header (base64-encoded JSON, possibly chunked across *-Header-N headers).

post/api2/webelements

Request body

keystring uuid required
job_idstring uuid required

Job UUID of a completed async HTML→PDF call that supplied pdf_web_elements_selectors.

Response

JSON array of matched elements with bounding boxes.

selectorstring

The CSS selector that matched this element.

pageinteger

1-based page number on which the element appears.

xnumber float
ynumber float
widthnumber float
heightnumber float
textstring

Text content of the matched element (may be empty for non-text elements).

attributesobject

HTML attributes on the matched element.