pl_get_document
Fetch the full content of Polish legal documents (judgments, acts, extracts) from various sources using a source-specific ID. Automatically paginates long documents.
Instructions
Fetch the full document (judgment, act text, register extract...) from a source.
document_id format depends on the source - numeric id (saos), hex doc_id
(nsa), ELI (isap), KRS number (krs), signature (kio, uodo)... - see the
document_id field in pl_list_sources. Long documents are paginated at
~5000 characters per page: response is JSON with content, page,
total_pages, has_more - iterate page while has_more (page is
1-based, exactly as in pl_search; page_number is a deprecated alias kept
for backward compatibility, and is echoed in the response for the same
reason). Sources that paginate the document themselves (isap) report
pagination: "native" and carry their own page footer inside content.
Some sources need extra (e.g. eu-compliance: {"regulation": "GDPR"}).
Errors: unknown_source, invalid_arg (missing required extra, page < 1,
conflicting page/page_number), source_unavailable, upstream_error
(e.g. connector's not_found - check the identifier or search first).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ||
| extra | No | ||
| source | Yes | ||
| document_id | Yes | ||
| page_number | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |