> For the complete documentation index, see [llms.txt](https://legisratio.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://legisratio.gitbook.io/docs/graphql-api/available-queries.md).

# Available Queries

{% hint style="info" %}
All queries require authentication. Include your Bearer token in the Authorization header.
{% endhint %}

## Search

### HybridSearch

Combines vector-based similarity search with full-text search to provide highly relevant results for complex queries, be it keywords, short text or entire paragraphs.

**Arguments**

* `searchString` (String!) Complex search query.
* `k` (Int) Number of results to return.
* `levels` (\[Level]) Level to be selected for search.
* `effort` (Effort) Effort level for the search (`LOW`, `HIGH`).

**Example Query**

```graphql
query HybridSearch($searchString: String!, $k: Int, $levels: [Level], $effort: Effort) {
  HybridSearch(searchString: $searchString, k: $k, levels: $levels, effort: $effort) {
    idArt
    lawtitle
    title
    text
    topics
    rankValue
  }
}
```

***

### HybridSentenceSearch

For Judgments: Combines vector-based similarity search with full-text search to provide highly relevant results for complex queries.

**Arguments**

* `searchString` (String!) Complex search query.
* `k` (Int) Number of results to return.
* `section` (\[Section]) Court section filter.
* `effort` (Effort) Effort level for the search.
* `startDate` (String) Start date for the judgments search.

**Example Query**

```graphql
query HybridSentenceSearch($searchString: String!, $k: Int, $section: [Section], $effort: Effort, $startDate: String) {
  HybridSentenceSearch(searchString: $searchString, k: $k, section: $section, effort: $effort, startDate: $startDate) {
    idJudgment
    documentType
    title
    publicationDate
    court
    massima
  }
}
```

***

### ActSearch

Search function for secondary regulation.

**Arguments**

* `searchString` (String!) The search string to match.
* `k` (Int) Number of results to return.
* `entity` (\[Entity]!) The issuing entity (e.g., `Bankitalia`, `IVASS`, `CCNL`).
* `articleOfLaw` (String) Filter by specific law article.

***

### searchProposals

Search for DDL (Disegni Di Legge).

**Arguments**

* `searchString` (String!)
* `k` (Int)

***

### extractParagraphOfLaw

Search relevant chunks in a specific law.

**Arguments**

* `lawId` (ID!)
* `searchString` (String!)

***

## Content

### laws

Retrieves a list of laws, with optional filtering.

**Arguments**

* `where` (LawFilter)
* `limit` (Int)
* `offset` (Int)
* `levels` (\[Level])

***

### lawUnits

Retrieves all law units (articles/attachments) belonging to a specific law.

**Arguments**

* `lawId` (String!)
* `lawUnitId` (String)

***

### getArticleText

Get text of an article of a law in force at a certain date.

**Arguments**

* `idArt` (ID!)
* `dateInForce` (String!)

***

### getLawText

Get text of the law in force at a certain date.

**Arguments**

* `idLaw` (ID!)
* `dateInForce` (String!)

***

### getJudgmentText

Get full text of a judgment.

**Arguments**

* `idJudgment` (ID!)

***

### getAct

Get text of a secondary act.

**Arguments**

* `idAct` (String!)

***

### getActByMetadata

Retrieves or searches for secondary acts based on either a specific act number or a keyword search.

**Arguments**

* `entity` (Entity!)
* `actNumber` (String)
* `keywords` (String)
* `dateInForce` (String)

***

### getDDLText

Get text and metadata of a DDL.

**Arguments**

* `idDDL` (ID!)

***

## Relationships

### getJurisprudenceByArticle

Get relevant jurisprudence by specifying an article of a law.

**Arguments**

* `articleID` (String!)

***

### getChangesOfArticle

Retrieves the amending/repealing texts given an article ID and a date.

**Arguments**

* `artID` (ID!)
* `dateInForce` (String!)

***

### getLawAmendments

Get all amendments relationship between laws.

**Arguments**

* `levels` (\[Level])

***

### getLawRepeals

Get all repeal relationship between laws.

**Arguments**

* `levels` (\[Level])

***

## Analytics

### getLawMetrics

Derive individual or fully aggregated metrics for set of laws.

**Arguments**

* `filter` (LawMetricsFilter)

***

### getNumberOfLawsPerYear

Derive per year aggregated metrics.

**Arguments**

* `filter` (AggregationLawFilter)

***

## Metadata

### governments

Retrieves a list of all governments.

***

### legislatures

Retrieves a list of all legislatures.
