Skip to content

Prudai Developer API: sources

The source catalogue, searching sources, fetching documents and checking citations.

Base URL https://api.prudai.com/v1. Logging in is in Login, scopes in Scopes and permissions, errors in Errors. Overview.

MethodPathWhat it doesState
POST/v1/citations/verifyVerify citations (phase 1)Coming soon
GET/v1/sourcesList sources (phase 1)In production
GET/v1/sources/{source_id}/documents/{document_id}Fetch a document’s full text (phase 1)In production
POST/v1/sources/searchSearch sources (phase 1)In production

Verify citations (phase 1)

POST /v1/citations/verify

Checks a list of citations, an ECLI, an article reference such as art. 6:162 BW, a CELEX number or a Kamerstuk reference, each with an optional quote. Per citation you get whether it exists, what it resolved to (source, document, URL, title, date, location), whether the quote matches (quote_match) and a reason. Use it to check the output of any model or author, not only Prudai’s.

It works for reference_only sources too: Prudai confirms that the document and location exist and, where Prudai holds the text, whether the quote matches, without passing the text on (matched_passage is only returned for full_text sources). Free at launch (request kind verify_citations, cost_credits: 0; fair-use limits apply), up to 50 citations per request.

  • State: coming soon, not in production yet.
  • Scope: prudai:citations:read
  • Approval: none, no extra step.

Parameters

  • X-Client-Request-Id header · string
    Your own correlation id. Stored as request metadata and echoed in usage exports; not used for idempotency. max length 128 · pattern ^[\x21-\x7E]+$

Body

JSON, required.

  • citations array<CitationToVerify> required
  • citations[].reference string required
    An ECLI, article reference, CELEX number or Kamerstuk reference as written. max length 300
  • citations[].kind string
    Type of reference; auto lets Prudai detect it. One of: auto, ecli, article, celex, kamerstuk · default: "auto"
  • citations[].quote string
    Optional text that is claimed to appear at that reference. max length 5000
  • citations[].client_ref string
    Your own id, echoed back. max length 100
  • citations[].as_of string (date)
    Overrides the request-level as_of for this citation.
  • jurisdictions array<string>
    Optional hint for ambiguous article references.
  • as_of string (date)
    Check each citation against the version in force on this date (“was this article in force, with this wording, on this date?”), where the source provides versions. Default today.

Responses

StatusMeaning
200One result per submitted citation, in request order.
400Malformed request or unsupported parameter (for example client-sent tools).
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution).
409A request with the same Idempotency-Key is still running.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
500Unexpected error on Prudai’s side. Not charged, except work that completed before the failure (reported in details.charged_credits).
502An upstream model provider or source failed. Not charged, except work that completed before the failure (reported in details.charged_credits).
503Temporarily unavailable (service_unavailable). Free operations never return credit_check_unavailable.

Fields in data (200)

  • object string
    citation_verification
  • request_id string
    pattern ^req_[A-Za-z0-9]{24}$
  • results array<CitationVerifyResult>
  • results[].index integer
    Position of the citation in the request. min 0
  • results[].client_ref string
    may be null
  • results[].reference string
    The reference as submitted.
  • results[].as_of string (date)
    The date the citation was checked against.
  • results[].in_force boolean
    Whether the resolved article was in force on as_of; null when the source provides no validity (case law, sources without versions). quote_match compares against the wording valid on as_of. may be null
  • results[].exists boolean
    True = found in a served source. False = not found where it should be (for example an ECLI that does not exist). Null = could not be checked (reason_code says why). may be null
  • results[].resolved object
    may be null
  • results[].quote_match string
    exact = the quote appears verbatim; normalized = it appears after normalising whitespace, punctuation, case and diacritics; not_found = it does not appear at the resolved location; not_checked = no quote was sent, or Prudai holds no text for that source (metadata-only licence). One of: exact, normalized, not_found, not_checked
  • results[].matched_passage object
    The matching passage, only for full_text sources; null otherwise. may be null
  • results[].reason_code string
    One of: found, not_found, ambiguous_reference, unsupported_reference, source_not_served, source_unavailable, quote_not_found, no_quote_sent, text_not_held, not_in_force_on_date, validity_unknown
  • results[].reason string
    Short human-readable explanation. Branch on reason_code, not on this text. max length 300
  • prudai SourcesPrudaiResult
  • prudai.request_id string
    pattern ^req_[A-Za-z0-9]{24}$
  • prudai.request_kind string
    One of: search, routed_search, fetch, references, elements, verify_citations, source_answer
  • prudai.cost_credits number
    Credit amount; 1 credit = EUR 0.01. Prudai rounds to at most three decimals (internally integer millicredits); do not rely on binary floating-point equality.
  • prudai.price_list_version string
    Version of the published price list this metered request was priced with (see the credits and billing guide), also for free operations (priced at 0). A new version is published with its effective date whenever a model or provider price changes. Treat the value as an opaque identifier.
curl
curl -s -X POST "https://api.prudai.com/v1/citations/verify" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"citations": [
{
"reference": "ECLI:NL:HR:…",
"kind": "auto",
"quote": "string",
"client_ref": "string",
"as_of": "2026-11-05"
}
],
"jurisdictions": [
"string"
],
"as_of": "2026-11-05"
}'
CLI (coming soon)
prudai leo citations verify

List sources (phase 1)

GET /v1/sources

Free at launch. The catalogue of sources this key may search, with jurisdiction, kind and licence. Sources whose redistribution status is none or unknown in Prudai’s licence register are not served at all and therefore never listed.

  • State: in production.
  • Scope: prudai:sources:read
  • Approval: none, no extra step.

Parameters

  • jurisdiction query · array<string>
    Filter on jurisdiction code, comma-separated (NL, EU, DE, FR, …).
  • kind query · array<string>
    One of: legislation, case_law, decisions, parliamentary, official_publications, register, guidance, literature, other
  • access query · string
    Only sources with this access level. full_text, the licence permits redistribution (doorleveren: ja in Prudai’s licence register): search snippets and fetch are available. reference_only, metadata and a link to the publisher only. One of: full_text, reference_only
  • limit query · integer
    default: 100 · min 1 · max 200
  • after query · string
    max length 200

Responses

StatusMeaning
200One page of sources.
400Malformed request or unsupported parameter (for example client-sent tools).
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution).
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
500Unexpected error on Prudai’s side. Not charged, except work that completed before the failure (reported in details.charged_credits).

Fields in data (200)

  • object string
    list
  • data array<Source>
  • data[].id string
    Public source id from the Prudai source catalogue. max length 80 · pattern ^[a-z0-9]+(-[a-z0-9]+)*$
  • data[].object string
    source
  • data[].name string
  • data[].jurisdiction string
    EU, INT (international bodies such as the European Patent Office) or an ISO 3166-1 alpha-2 country code. pattern ^(EU|INT|[A-Z]{2})$
  • data[].kind string
    One of: legislation, case_law, decisions, parliamentary, official_publications, register, guidance, literature, other
  • data[].publisher string
    may be null
  • data[].url string (uri)
    may be null
  • data[].access string
    full_text, the licence permits redistribution (doorleveren: ja in Prudai’s licence register): search snippets and fetch are available. reference_only, metadata and a link to the publisher only. One of: full_text, reference_only
  • data[].licence SourceLicence
  • data[].licence.name string
  • data[].licence.attribution string
    Attribution you must show when you display results from this source. may be null
  • data[].licence.terms_url string (uri)
    may be null
  • data[].licence.verified_on string (date)
    Date Prudai last verified the licence at the primary source.
  • has_more boolean
  • next_cursor string
    may be null
curl
curl -s "https://api.prudai.com/v1/sources" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (coming soon)
prudai leo sources list
Response 200
{
"object": "list",
"data": [
{
"id": "string",
"object": "source",
"name": "string",
"jurisdiction": "string",
"kind": "legislation",
"publisher": "string",
"url": "https://voorbeeld.nl",
"access": "full_text",
"licence": {
"name": "CC0 1.0",
"attribution": "string",
"terms_url": "https://voorbeeld.nl",
"verified_on": "2026-11-05"
}
}
],
"has_more": false,
"next_cursor": "string"
}

Fetch a document's full text (phase 1)

GET /v1/sources/{source_id}/documents/{document_id}

Returns the full text of one document, only for sources with access: full_text. For a reference_only source the response is 403 redistribution_not_permitted; use the url from the search hit instead. Free at launch (request kind fetch, cost_credits: 0; fair-use limits apply). Documents are bounded to 200,000 characters and the transport to 2 MiB; incomplete text has completeness.truncated: true. Wetten article identifiers accept BWBR.../artikel <number>; historical text is returned only when its validity period can be confirmed. Articles outside the bounded read are unavailable.

  • State: in production.
  • Scope: prudai:source_texts:read
  • Approval: none, no extra step.

Parameters

  • source_id path · string required
    Public source id from the Prudai source catalogue. max length 80 · pattern ^[a-z0-9]+(-[a-z0-9]+)*$
  • document_id path · string required
    Document id from a search hit (URL-encoded; ECLI and CELEX ids contain colons). max length 300
  • as_of query · string (date)
    The version in force on this date, where the source provides versions (legislation). Default today. A date in the future is refused (422). A document with no version in force on this date gives 404 with details.reason_code not_in_force_on_date.
  • format query · string
    Both formats return the standard JSON SourceDocument envelope. json (default) selects plain text in data.content; markdown selects Markdown there with data.content_format: markdown. Neither format drops the envelope metadata. One of: json, markdown · default: "json"

Responses

StatusMeaning
200The document.
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution).
404Unknown model, source or document.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
500Unexpected error on Prudai’s side. Not charged, except work that completed before the failure (reported in details.charged_credits).
502An upstream model provider or source failed. Not charged, except work that completed before the failure (reported in details.charged_credits).
503Temporarily unavailable (service_unavailable). Free operations never return credit_check_unavailable.
504Source deadline exceeded (timeout, details.reason_code upstream_timeout).

Fields in data (200)

  • object string
    source_document
  • source_id string
    Public source id from the Prudai source catalogue. max length 80 · pattern ^[a-z0-9]+(-[a-z0-9]+)*$
  • document_id string
  • title string
  • url string (uri)
    may be null
  • identifiers DocumentIdentifiers
  • identifiers.ecli string
    pattern ^ECLI:[A-Z]{2}:[A-Z0-9.]+:[0-9]{4}:[A-Z0-9.]+$ · may be null
  • identifiers.celex string
    max length 40 · may be null
  • identifiers.other string
    Another stable identifier (e.g. a BWB id or Kamerstuk number). max length 200 · may be null
  • date string (date)
    may be null
  • language string
    BCP 47 language tag of the text.
  • content_format string
    One of: text, markdown
  • content string
    The full text as published by the source (pseudonymised where the source pseudonymises).
  • attribution string
    may be null
  • retrieved_at string (date-time)
  • validity Validity
    Validity of legislation, where the source provides it. All three fields are null when the source does not publish validity (for example case law, or a source without versions).
  • validity.in_force boolean
    In force on the request’s as_of date (default today). may be null
  • validity.valid_from string (date)
    may be null
  • validity.valid_to string (date)
    Null while still in force, or when unknown. may be null
  • prudai SourcesPrudaiResult
  • prudai.request_id string
    pattern ^req_[A-Za-z0-9]{24}$
  • prudai.request_kind string
    One of: search, routed_search, fetch, references, elements, verify_citations, source_answer
  • prudai.cost_credits number
    Credit amount; 1 credit = EUR 0.01. Prudai rounds to at most three decimals (internally integer millicredits); do not rely on binary floating-point equality.
  • prudai.price_list_version string
    Version of the published price list this metered request was priced with (see the credits and billing guide), also for free operations (priced at 0). A new version is published with its effective date whenever a model or provider price changes. Treat the value as an opaque identifier.
curl
curl -s "https://api.prudai.com/v1/sources/<source_id>/documents/<document_id>" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (coming soon)
prudai leo sources-documents get
Response 200
{
"object": "source_document",
"source_id": "string",
"document_id": "string",
"title": "string",
"url": "https://voorbeeld.nl",
"identifiers": {
"ecli": "string",
"celex": "string",
"other": "string"
},
"date": "2026-11-05",
"language": "nl",
"content_format": "text",
"content": "string",
"attribution": "string",
"retrieved_at": "2026-11-05T09:30:00.000Z",
"validity": {
"in_force": false,
"valid_from": "2026-11-05",
"valid_to": "2026-11-05"
},
"prudai": {
"request_id": "string",
"request_kind": "search",
"cost_credits": 1,
"price_list_version": "2026-11-01"
}
}

Search sources (phase 1)

POST /v1/sources/search

Searches the sources. With mode: auto Prudai selects the sources (deterministic routing; no model fallback) and returns a context.routing block that explains the choice; envelope next proposes ready-made calls. With mode: explicit you name the sources in source_ids.

Free at launch (cost_credits: 0, request kind search or routed_search; fair-use limits apply, 429 fair_use_limited). Every hit carries passages[] (verified passages with location; quotes only for access: full_text). Snippets are only returned for sources with access: full_text. This release uses keyword and identifier search. With search_mode: hybrid (the default) a search over several sources asks every selected source for one page (at most four upstream calls at a time), ranks the hits on the query and on a source prior that follows the question (shown as confidence in context.routing), and fills the page from all sources; a source that is down or a text that cannot be fetched is a gap in notIncluded. With search_mode: keyword pages traverse sources in catalog order, one source per page. Date sorting and facets apply to the returned page. Only publication-date filtering is supported. Sources without an adapter are reported in notIncluded. There are no EU sources in the current licensed catalog. Upstream reads are limited to 2 MiB, documents to 200,000 characters, and excerpts to 2,000 characters. Retrieved excerpts use the document location unless an exact article is available; keyword excerpts select a literal matching term when present. Missing source text is reported instead of being marked verified.

  • State: in production.
  • Scope: prudai:sources:read
  • Approval: none, no extra step.
  • Idempotency: send Idempotency-Key; the same key with the same body does not run the action twice.

Parameters

  • Idempotency-Key header · string
    Client-chosen unique key (we suggest a UUID) to make retries safe. Stored for 24 hours per credential and organisation (service key or personal token). Same key and same body: stored result is replayed and charged once. The knowledge-base operations (createKnowledgeBase, uploadKnowledgeBaseDocument) work differently: the key is bound to the organisation or knowledge base and lives as long as the object; see their descriptions. min length 8 · max length 255 · pattern ^[\x21-\x7E]+$
  • X-Client-Request-Id header · string
    Your own correlation id. Stored as request metadata and echoed in usage exports; not used for idempotency. max length 128 · pattern ^[\x21-\x7E]+$

Body

JSON, required.

  • query string required
    max length 2000
  • mode string
    One of: auto, explicit · default: "auto"
  • source_ids array<string>
    Required with mode: explicit; explicit selections take precedence over identifier routing.
  • kind string
    One of: legislation, case_law, decisions, parliamentary, official_publications, register, guidance, literature, other
  • jurisdictions array<string>
  • date_from string (date)
  • date_to string (date)
  • search_mode string
    This release performs keyword and identifier search; semantic retrieval is not included and is reported in notIncluded. hybrid (default) ranks the keyword hits of all selected sources together; keyword traverses sources in catalog order, one source per page. One of: keyword, semantic, hybrid · default: "hybrid"
  • sort string
    Ordering within the returned source page. relevance with search_mode hybrid ranks across sources; date orderings apply within the page only. One of: relevance, date_desc, date_asc · default: "relevance"
  • date_field string
    This release supports publication_date only. Other values return unsupported_parameter. One of: publication_date, decision_date, valid_from · default: "publication_date"
  • as_of string (date)
    Search legislation as it was in force on this date, where the source provides versions. Default today. A date in the future is refused (422).
  • document_ids array<object>
    Search only within these documents.
  • document_ids[].source_id string required
    Public source id from the Prudai source catalogue. max length 80 · pattern ^[a-z0-9]+(-[a-z0-9]+)*$
  • document_ids[].document_id string required
    max length 300
  • facets array<string>
    Facet counts for the returned page, not the entire upstream result set. One of: source_id, jurisdiction, kind, year
  • cursor string
    next_cursor of the previous page; the other fields must be unchanged. max length 500
  • max_results integer
    Page size. Pages traverse sources deterministically; use cursor for further pages. default: 10 · min 1 · max 50
  • max_passages_per_hit integer
    Verified passages to return per hit (0 = none). Same price. default: 3 · min 0 · max 5

Responses

StatusMeaning
200Search results.
400Malformed request or unsupported parameter (for example client-sent tools).
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution).
409A request with the same Idempotency-Key is still running.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
500Unexpected error on Prudai’s side. Not charged, except work that completed before the failure (reported in details.charged_credits).
502An upstream model provider or source failed. Not charged, except work that completed before the failure (reported in details.charged_credits).
503Temporarily unavailable (service_unavailable). Free operations never return credit_check_unavailable.
504Source deadline exceeded (timeout, details.reason_code upstream_timeout).

Fields in data (200)

  • object string
    source_search
  • request_id string
    pattern ^req_[A-Za-z0-9]{24}$
  • mode string
    One of: auto, explicit
  • results array<SourceSearchHit>
  • results[].source_id string
    Public source id from the Prudai source catalogue. max length 80 · pattern ^[a-z0-9]+(-[a-z0-9]+)*$
  • results[].document_id string
    max length 300
  • results[].title string
  • results[].url string (uri)
    may be null
  • results[].identifiers DocumentIdentifiers
  • results[].identifiers.ecli string
    pattern ^ECLI:[A-Z]{2}:[A-Z0-9.]+:[0-9]{4}:[A-Z0-9.]+$ · may be null
  • results[].identifiers.celex string
    max length 40 · may be null
  • results[].identifiers.other string
    Another stable identifier (e.g. a BWB id or Kamerstuk number). max length 200 · may be null
  • results[].date string (date)
    may be null
  • results[].snippet string
    Verbatim excerpt; only for full_text sources, otherwise null. may be null
  • results[].passages array<Passage>
    Verified passages in this document that bear on the query, in both auto and explicit mode: exact location (article, paragraph, legal consideration “r.o.”, section), verbatim quote and verified from the same citation check the chat API uses. For reference_only sources each passage has the location but quote: null.
  • results[].passages[].passage_id string
    Id of the passage within this response (referenced by claims[].passage_ids). max length 100
  • results[].passages[].location PassageLocation
    Where in the document the passage sits.
  • results[].passages[].element_id string
    Element id from GET …/elements, when known. may be null
  • results[].passages[].start_offset integer
    Start of the passage in the fetched text (UTF-16 code units, like url_citation); null for reference_only sources. min 0 · may be null
  • results[].passages[].end_offset integer
    min 0 · may be null
  • results[].passages[].validity Validity
    Validity of legislation, where the source provides it. All three fields are null when the source does not publish validity (for example case law, or a source without versions).
  • results[].passages[].quote string
    Verbatim text of the passage. Null for reference_only sources. max length 4000 · may be null
  • results[].passages[].verified boolean
    True = the identifier and location were found in the source and, for a full_text source, the quote matches the retrieved text verbatim. False = the check failed; such passages are never used by POST /sources/answer.
  • results[].validity Validity
    Validity of legislation, where the source provides it. All three fields are null when the source does not publish validity (for example case law, or a source without versions).
  • results[].validity.in_force boolean
    In force on the request’s as_of date (default today). may be null
  • results[].validity.valid_from string (date)
    may be null
  • results[].validity.valid_to string (date)
    Null while still in force, or when unknown. may be null
  • results[].access string
    full_text, the licence permits redistribution (doorleveren: ja in Prudai’s licence register): search snippets and fetch are available. reference_only, metadata and a link to the publisher only. One of: full_text, reference_only
  • results[].attribution string
    may be null
  • has_more boolean
  • next_cursor string
    may be null
  • facets object
    Present when facets was requested; one array of value counts per facet. may be null
  • prudai SourcesPrudaiResult
  • prudai.request_id string
    pattern ^req_[A-Za-z0-9]{24}$
  • prudai.request_kind string
    One of: search, routed_search, fetch, references, elements, verify_citations, source_answer
  • prudai.cost_credits number
    Credit amount; 1 credit = EUR 0.01. Prudai rounds to at most three decimals (internally integer millicredits); do not rely on binary floating-point equality.
  • prudai.price_list_version string
    Version of the published price list this metered request was priced with (see the credits and billing guide), also for free operations (priced at 0). A new version is published with its effective date whenever a model or provider price changes. Treat the value as an opaque identifier.
curl
curl -s -X POST "https://api.prudai.com/v1/sources/search" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"query": "string",
"mode": "auto",
"source_ids": [
"string"
],
"kind": "legislation",
"jurisdictions": [
"string"
],
"date_from": "2026-11-05",
"date_to": "2026-11-05",
"search_mode": "hybrid",
"sort": "relevance",
"date_field": "publication_date",
"as_of": "2026-11-05",
"document_ids": [
{
"source_id": "string",
"document_id": "string"
}
],
"facets": [
"source_id"
],
"cursor": "string",
"max_results": 10,
"max_passages_per_hit": 3
}'
CLI (coming soon)
prudai leo sources search