Skip to main content

Overview

The search endpoint lets you query across all frameworks simultaneously. Results include articles, recitals, and requirements that match your query. Use client.search().query() to search.

Methods

query(String q)

Search across all frameworks with default pagination.
Page<SearchResult> results = client.search().query("incident notification 72 hours");

System.out.printf("Found %d results%n", results.meta().total());
for (SearchResult r : results.data()) {
    System.out.printf("  [%s] %s — %s%n",
        r.frameworkSlug().toUpperCase(),
        r.type(),
        r.title() != null ? r.title() : r.matchContext());
}
Returns Page<SearchResult>

query(String q, String framework, String resultType, int page, int perPage)

Search with optional framework scope, result type filter, and custom pagination.
Page<SearchResult> results = client.search().query(
    "breach notification",   // query
    "gdpr",                  // framework filter (null = all)
    "article",               // result type filter (null = all)
    1,                       // page
    20                       // perPage
);
Parameters
ParameterTypeDefaultDescription
qStringrequiredSearch query
frameworkStringnullLimit to one framework slug
resultTypeStringnullFilter by type: "article", "recital", "requirement"
pageint1Page number
perPageint20Items per page
Returns Page<SearchResult>

iter(String q)

Lazily iterate all search results for a query.
for (SearchResult r : client.search().iter("cyber resilience")) {
    System.out.printf("[%s] %s%n", r.frameworkSlug(), r.matchContext());
}
Returns Iterable<SearchResult>

iter(String q, String framework, String resultType)

Lazily iterate with optional framework and result-type filters.
for (SearchResult r : client.search().iter("encryption", "cra", "requirement")) {
    System.out.println(r.matchContext());
}
Returns Iterable<SearchResult>

Model

SearchResult

FieldTypeDescription
type()String"article", "recital", or "requirement"
frameworkSlug()StringFramework the result belongs to
frameworkName()StringHuman-readable framework name
articleNumber()StringFor article results
recitalNumber()StringFor recital results
paragraphRef()StringSpecific paragraph reference
title()StringResult heading, if any
requirementType()StringFor requirement results
matchContext()StringSnippet showing the match in context
url()StringDirect API URL to the full resource

Examples

Search within a specific framework

Page<SearchResult> results = client.search().query(
    "breach notification", "gdpr", null, 1, 20);

for (SearchResult r : results.data()) {
    System.out.println(r.frameworkSlug() + " — " +
        (r.title() != null ? r.title() : r.matchContext()));
}

Filter by result type

Page<SearchResult> results = client.search().query(
    "encryption at rest", null, "requirement", 1, 20);

for (SearchResult r : results.data()) {
    System.out.println("- " + r.matchContext());
}

Cross-framework comparison

String[] frameworks = {"nis2", "dora", "cra"};
for (String fw : frameworks) {
    Page<SearchResult> r = client.search().query(
        "incident notification", fw, null, 1, 1);
    System.out.printf("%-6s %d results%n", fw, r.meta().total());
}
Use the framework parameter to narrow results when you know which regulation you’re working with. Cross-framework search (without a filter) is great for discovering related obligations across different laws.