Valerie Gibson — Drupal & Search Developer
The Royal Library’s SRU endpoint was old, inconsistent, and last but not least: it was undocumented.
This is what the old tool looked like.
SRU = Search/Retrieve via URL
CQL = Contextual Query Language
It’s a declarative protocol — you describe what you want, not how to get it.
?operation=searchRetrieve&query=title all "climate"
| In Theory | In Practice |
|---|---|
| Elegant and declarative | Inconsistent XML |
| Structured metadata | Missing namespaces |
| Simple queries | No wildcard support 😬 |
Each interaction is a CQL query – no imperative API logic.
The UI simply renders whatever the request declares.
| 💎 Elegant | 🧨 Fragile |
|---|---|
| Transparent queries | Inconsistent responses |
| No backend needed | No validation or schema |
Understanding CQL syntax
Generating parsing code
Debugging strange XML edge cases
AI was my pair programmer 🤖
This is what it has become.
Declarative search isn’t new — SRU proved that years ago.
But with modern web frameworks and AI tooling, it becomes relevant again.
@Declarative Amsterdam 2025