Application programmer's interface

Programmatic access to the VK search engine is possible via a REST API. The access point is simply the URL of the search engine, usually http://search.loedejongdigitaal.nl/ . The following HTTP GET parameters control search engine output for programmatic use:

view
When not given, the search engine produces an ordinary HTML user interface, but when set to either table, csv or xml, tabular output is produced. table produces an HTML table, csv a semicolon-separated textual (UTF-8) table containing hits. xml produces an XML table with results in the element /xml/set. Each hit is formatted as an XML element with tag row containing item elements.
q
Query string; may not be omitted. Any query string accepted by Lucene 2.9 is accepted.
granularity
Either section (default) or p, to determine whether section-level or paragraph-level hits should be returned.
order
Either empty to order hits by relevance, as determined by Lucene, or chrono for "chronological" book order.
within
Extends the scope of search to vk:appendix , vk:statement or vk:corrections . May be given multiple times to denote the union of these element types. If not given, only the main body of text is searched through.
scope
Identifier of a vk:book , vk:chapter or "chapter-level" unit of text; restricts search to within the unit of text with the given identifier.

As an example, the URL:

http://search.loedejongdigitaal.nl/?q=oorlog*&scope=nl.vk.d.14-1&view=xml

produces an XML document containing all sections containing any word starting with oorlog ("war") within Volume 14-1 of Het Koninkrijk. The XPath expression //row/item[4]/@string/string() then gives resolver URLs that can be used to retrieve the XML versions of these sections.