Get a page image

Render a single page of a document as a PNG image. Page numbers are 1-indexed. The rendered image is the canonical PDF page (for Excel documents, all sheets are rendered onto a single composite page).

The response is cacheable: the rendered image for a given (document_id, page_number) pair never changes once the document has been parsed, so callers may safely cache it indefinitely.

On this page

HTTP request

GET https://api.parsewise.ai/api/v1/projects/{project_id}/documents/{document_id}/pages/{page_number}/image/

URI Parameters

Name In Required Type Description
document_id path Yes string (uuid)  
page_number path Yes integer  
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 string (binary) (image/png)

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"

document_id = "<uuid>"
page_number = 0
project_id = "<uuid>"

resp = requests.get(
    f"{BASE_URL}/projects/{project_id}/documents/{document_id}/pages/{page_number}/image/",
    headers={"X-API-Key": API_KEY},
)
resp.raise_for_status()
with open("response.bin", "wb") as f:
    f.write(resp.content)