Docs

Search documents

Use this when the AI needs to find legislation or case law by concept, phrase, citation, identifier, or full-text query. Results include document IDs, source URLs, and read commands for opening matching passages.

Use when

  • Use this as the default discovery tool for legal research questions.
  • Search results include snippets and read commands for opening the source text.
  • Matched query terms and phrases are wrapped in double brackets, for example [[data retention]].

search_documents

Search titles and source text across covered legal materials.

ParameterTypeDescription
querystringElasticsearch query string over title and body_text, e.g. "data retention" or body_text:"Article 32".
document_idsstring[]Limit results to known document IDs.
sourcesstring[]Limit by source, e.g. ["publications.europa.eu"].
source_urlsstring[]Limit by exact source URL.
langsstring[]Limit by language, e.g. ["en", "de", "fr"].
tagsstring[]Limit by document tags, e.g. ["legislation", "case-law"].
identifiersstring[]Limit by source identifiers, e.g. ["32016R0679"].
limitnumberMaximum results to return.
offsetnumber= 0Skip the first N results for pagination.
snippet_countnumberMaximum body snippets per document when a query is provided.
ArgumentsJSON
{
  "query": "body_text:\"data retention\" OR body_text:\"private life\"",
  "sources": [
    "publications.europa.eu"
  ],
  "langs": [
    "en"
  ],
  "tags": [
    "case-law"
  ],
  "snippet_count": 2,
  "limit": 3
}
Responsetext
Showing 1-3 of about 18 documents matching "body_text:\"data retention\" OR body_text:\"private life\"":
Use offset=3 with the same filters to see more.

- Digital Rights Ireland Ltd v Minister for Communications, Marine and Natural Resources
  id: 4d8f35c4-9a31-4f84-9b9f-8db70b8ec2ad
  lang: en
  total_chars: 87942
  identifiers: C-293/12, C-594/12
  tags: case-law
  source_url: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:62012CJ0293
  read_with: read_document document_id="4d8f35c4-9a31-4f84-9b9f-8db70b8ec2ad"
  snippets:
    snippet 1:
      source: body
      read_with: read_document document_id="4d8f35c4-9a31-4f84-9b9f-8db70b8ec2ad" offset=18420
      text:
        ...Directive 2006/24 concerns the [[data retention]] of traffic and location data generated or processed in connection with electronic communications services...
    snippet 2:
      source: body
      read_with: read_document document_id="4d8f35c4-9a31-4f84-9b9f-8db70b8ec2ad" offset=24980
      text:
        ...the interference with the rights to respect for [[private life]] and to the protection of personal data is wide-ranging...