# Search legislation

> Find Slovak and EU acts by topic, title, or number and year, with status on a date.

<!-- html: https://lexomat.sk/en/doc/search-legislation · sk: https://lexomat.sk/doc/search-legislation.md · index: https://lexomat.sk/llms.txt -->
## What it does

`search_legislation` finds **acts** (Slovak and EU acts) by **topic or title text**, or by **number and year** (`40/1964`, `311/2001 Z. z.`), or by **metadata alone** (a year, or an act type). It searches Slovak and EU acts and returns one hit per act, with a citation-ready `id` (for example `SK/40/1964` or `EU/32016R0679`), its official `url` and its status on a date.

By default it returns **whole acts**. With `result_level: "provision"` it returns single paragraphs and articles instead (see **Provision hits** below). To read the text of a section of a Slovak act, call `get_provision` with the act's number and year from the hit (for example `40/1964`) or its title as `zakon`, and the section as `paragraf`. `get_provision` covers Slovak law only: there is no provision reader for EU acts yet, and `get_act` reads one act (an EU act too) by its `id`.

Like every tool in this connector, it is **read-only** and its output is **informational, not legal advice**.

## Inputs

| Name                    | Type    | Description                                                                                                                                                                                                                                                                         |
| ----------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `query`                 | string  | Topic or title text, or an act citation such as `40/1964`. A query that is only a citation is matched exactly and never searched as text.                                                                                                                                           |
| `filters`               | object  | `{number, year, type}`. `number` needs `year`. A year alone or a type alone is accepted. `type` is matched, ignoring case, against the law-type registry; an unknown type, or one a search can never return, is refused with the list of accepted types. Send `query` or `filters`. |
| `effective_on`          | date    | The day the status is judged for (default: today in Slovakia). `as_of` is the deprecated alias of the same value; sending both with different values is refused. Not earlier than 1918-10-28.                                                                                       |
| `jurisdictions`         | array   | `["SK"]`, `["EU"]` or both (the default). A number lookup reads the Slovak series, so it needs `SK`.                                                                                                                                                                                |
| `limit`                 | integer | Number of acts, 1 to 25, default 10. With `include_amending_acts`, the amending acts attached after their base acts do not count towards it; up to `limit` of them are attached, so a page holds at most twice `limit` hits.                                                        |
| `result_level`          | string  | `"act"` (default) or `"provision"`. Provision level needs a text `query` without `filters`; an act number or a metadata lookup at provision level is refused.                                                                                                                       |
| `include_amending_acts` | boolean | Default `false`: text search returns consolidated base acts, not the acts that only amend them. With `true`, an amending act is placed right after the base act it amends, at most `limit` of them per page, taken in turn by base act in rank order; a base-act hit's `amending_acts_omitted` counts its amending acts left out. An amending act whose base act ranked but is not on the page is left out; one whose base act did not rank is a hit of its own and counts towards `limit`. |

## Returns

The hits are in `results`, with a `total` and its `total_kind`. On a text search `total` counts only the acts left in the ranked selection after the filters, before the cut to `limit`, not every act that matches; a metadata lookup screens every matching act. Each hit carries `id`, `number`, `title`, `url`, `jurisdiction` (`SK` or `EU`), `source_label`, `status_on_date`, the effective dates of the stored version that applies on that day (`effective_from`, `effective_till`), `text_available` and `is_future_version`. With `include_amending_acts`, amending acts are marked (`amending_act`, `amends`) and Slovak base-act hits carry `amending_acts_omitted`.

- **Status.** For a Slovak act `status_on_date` says whether it was in force on the chosen day. If versions overlap or leave a gap, the status is `unknown` and the version shown is the last one that began by that day.
- **Repealed and not yet in force.** Text search leaves out acts repealed or not yet in force on the day, and counts each omission in `excluded_by_filter`. A number or metadata lookup for a day before the act's first stored version returns no act and names that version in `diagnostic.nearest_versions`; after the last version has ended, the act is returned with status `repealed`.
- **Future versions.** `is_future_version` is `true` when the version takes effect after today in Slovakia.
- **EU acts hold no stored versions.** Their status is always `unknown` and their dates are the stored ones (empty when unknown), so a date is not promised for them. An EU act whose stored end is before the day is left out and counted. A text search can miss an EU act whose stored start is missing or later than the day.
- **Provision hits** (DRAFT, pending legal review). At `result_level: "provision"` each hit is one paragraph or article: an `id` such as `SK/40/1964#paragraf-106`, `section` and the act's `text_available`. For a Slovak provision `source_url` links to the paragraph on slov-lex; for an EU provision it is null (EUR-Lex anchors differ). `limit` counts every provision, an amending act's included. Provisions are ranked over the current text of the acts, and every provision hit says so in `ranking_basis`. When `effective_on` is sent, the hit relates to the version in force on that day, but that version's own text is not searched. A version that takes effect after today has the status `not_yet_in_force`.
- **Empty result.** An empty result carries a diagnostic of what was searched. It is **not evidence that no act exists**.
- **Partial failure.** If part of the search fails, `group_status` names it. If all of it fails, the call is refused as unavailable and does not count against your quota.
- **`include_amending_acts` and EU acts.** For EU acts the amending-act check is not applied, so `include_amending_acts` has no effect on them yet.
- Czech acts held in the Slovak collection (acts of the Czech National Council, regulations of Czech bodies) are left out and counted under `excluded_by_filter.jurisdiction`. A query citing "Sb." from 1993 on is the Czech collection, not Slovak law: it is never searched and returns an empty result with the `foreign_collection` diagnostic.

## Not available yet

- Text search combined with `filters`.

## Notes

- Deterministic ranking, no LLM involved. Debits the **corpus** quota (see **Usage limits**); a call refused before processing does not.
- EU acts are European law, not Slovak law.
