List relevant pages for an agent

Return document pages that have been classified as relevant for this agent. Pages classified as irrelevant or not yet classified are omitted.

On this page

HTTP request

GET https://api.parsewise.ai/api/v1/projects/{project_id}/agents/{agent_id}/relevant-pages/

URI Parameters

Name In Required Type Description
agent_id path Yes string (uuid)  
limit query No integer Maximum pages to return. Defaults to 100 and is capped at 1000.
offset query No integer Zero-indexed offset into the ordered relevant pages. Defaults to 0. Increase by limit until a response contains fewer items than requested.
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<V1AgentRelevantPage>

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"

agent_id = "<uuid>"
project_id = "<uuid>"

params = {
    # "limit": 0,  # Maximum pages to return
    # "offset": 0,  # Zero-indexed offset into the ordered relevant pages
}

resp = requests.get(
    f"{BASE_URL}/projects/{project_id}/agents/{agent_id}/relevant-pages/",
    headers={"X-API-Key": API_KEY},
    params=params,
)
resp.raise_for_status()
print(resp.json() if resp.content else None)

Definitions

V1AgentRelevantPage

Name Required Type Description
document_id Yes string (uuid) Stable identifier of the document.
document_name Yes string Original filename of the document.
page_number Yes integer 1-indexed page number within the document.