Search

Six search endpoints over the same documents: keyword, semantic, hybrid, their reranked variants, and reference search through the citation graph.

POST/v1.1/search/keyword_search
Search legal documents by exact terms and boolean expressions. Supports filtering by jurisdiction, portal, field of law, and date range. Filter values are validated server-side. Retrieve accepted values from the filter endpoints before applying them: - GET /v1.1/search/filters/documenttypes — accepted documentTypes IDs - GET /v1.1/search/filters/jurisdictions_portals — accepted jurisdiction names and portal values - GET /v1.1/search/filters/trees — accepted fieldsOfLaw IDs

Parameters

querystringrequired

Keyword query. Supports boolean operators and quoted phrases. Use Boolean operators to refine results. Combine terms with AND (both must match), OR (either matches), or NOT (exclude a term). Use parentheses to group expressions, e.g. (fraud OR negligence) AND "GDPR". Quoting controls how strictly terms are matched: unquoted terms match anywhere in the document, while a quoted phrase (e.g. "data protection") matches only where the words appear next to each other in that order. Use '*' as a wildcard to expand a prefix, e.g. regul* matches regulation and regulatory (a leading wildcard is treated as a literal asterisk).

e.g. "data protection" AND ("Facebook" OR "Meta")
documentTypesstring[]

Filter by document type. Only accepts IDs returned by GET /v1.1/search/filters/documenttypes. Example IDs: '18fead608f1a4dcb5671b9fc8aeab4d1' (Laws and regulations), '04b42e5bf858a66de2229227deaa21e3' (Decisions).

jurisdictionsstring[]

Filter by jurisdiction. Only accepts names returned by GET /v1.1/search/filters/jurisdictions_portals.

e.g. ["European Union","Netherlands"]
portalsstring[]

Filter by portal. Use the `value` field returned by GET /v1.1/search/filters/jurisdictions_portals. Can be combined with jurisdictions — e.g. pairing 'Netherlands' in jurisdictions with '1|eur-lex.europa.eu' in portals searches all documents from the Netherlands and documents from eur-lex.europa.eu.

e.g. ["1|eur-lex.europa.eu"]
fieldsOfLawstring[]

Filter by field of law. Only accepts IDs returned by GET /v1.1/search/filters/trees.

documentIdentifiersstring[]

Restrict the search to chunks belonging to these documents. Each value is a Moonlit document identifier (e.g. '32016R0679'). Empty list (or omitted) means no document scoping. Maximum 50 identifiers; exceeding returns 422. Composes with every other filter — e.g. combined with reference_identifier to scope reference search to a specific document.

max 50 itemse.g. ["32016R0679"]
from_datestring | null

Inclusive lower date bound (YYYY-MM-DD). Requires until_date when set.

format YYYY-MM-DDe.g. 2021-01-01
until_datestring | null

Inclusive upper date bound (YYYY-MM-DD). Requires from_date when set.

format YYYY-MM-DDe.g. 2024-12-31
date_fieldstring

Which document date `from_date`/`until_date` (and sort_type 1/2, where available) apply to. `date` (default) is the primary document date, as returned by retrieve_document. Documents without the chosen date are excluded by the date filter and sorted last.

date | decisionDate | enactmentDate | publicationDate | entryIntoForceDate | validFrom | validTo | proceedingsStartDate
sourcesstring[]

Filter by source (issuing entity such as a court or legislative body). Only accepts the `value` field from items returned by GET /v1.1/search/filters/sources. For example, if the filter endpoint returns `{"name": "Hof van Cassatie", "value": "c1f4502e43dc2c11969f4f201194fc07", ...}`, pass `"c1f4502e43dc2c11969f4f201194fc07"` in this array.

e.g. ["02045a9e2de3f3bd6c520ad0317efd0d"]
reference_identifierstring | null

Document identifier to find references for. When set, results are restricted to documents that reference or are referenced by this document (depending on reference_direction).

e.g. 32016R0679
reference_directioninteger | null

Direction of the reference relationship. 0 = to (documents that reference/cite reference_identifier), 1 = made_by (documents referenced by reference_identifier), 2 = both directions combined. Only used when reference_identifier is set.

0 | 1 | 2
article_reference_idstring | null

Article-level identifier to narrow reference results to a specific article within the referenced document. Use GET /v1.1/document/articles to discover available article identifiers for a document. Only used when reference_identifier is set.

reference_typesstring[] | null

Keep only documents related to reference_identifier by one of these reference type ids, e.g. `AMENDS`, `IMPLEMENTS`, `INTERPRETS`, `CITES`. Each result lists its own types in `referenceTypes`. Not applied together with article_reference_id.

max 50 itemse.g. ["AMENDS","REPEALS"]
reference_familiesstring[] | null

Keep only documents related to reference_identifier by a reference type of one of these families: `CITES`, `AMENDS`, `APPLIES`, `INTERPRETS`, `LEGAL_BASIS`, `REPEALS`, `CASE_HISTORY`, `RELATED_CASE`, `STRUCTURE`, `EDITORIAL`, `SAME_DOCUMENT`, `DOCUMENT_VERSION`, `JURISDICTION_SPECIFIC`. Not applied together with article_reference_id.

max 20 itemse.g. ["LEGAL_BASIS"]
sort_typeinteger

0 = relevance (default), 1 = newest first, 2 = oldest first, 3 = most cited.

0 | 1 | 2 | 3
pageintegerdefault: 1

Page number, starting from 1. Determines which slice of results to return. The server computes the internal offset as (page − 1) × num_results.

1 to 1000
num_resultsintegerdefault: 10

Maximum number of documents to return per page. Must be between 1 and 100.

1 to 100
facetsbooleandefault: false

Whether to include facets in the response. Facets are aggregations of the search results.

all_facetsbooleandefault: false

When facets is enabled, controls whether to include all known facet values (including those with count 0) or only values that appear in the current result set. Applies to FieldsOfLaw and DocumentTypes; Sources only ever lists values present in the result set.

facet_limitinteger | null

Maximum number of sources kept under each top-level category in the Sources facet, ranked by document count. Omit for the full tree. When set, every top-level category with documents is still returned and carries an otherCount with the number of children dropped; `result.sourcesTotal` and `result.sourcesTruncated` report the cut.

1 to 4000

Example request

curl -X POST "https://api.moonlit.ai/v1.1/search/keyword_search" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "all_facets": true,
  "documentTypes": [
    "18fead608f1a4dcb5671b9fc8aeab4d1",
    "04b42e5bf858a66de2229227deaa21e3"
  ],
  "facets": true,
  "fieldsOfLaw": [],
  "from_date": "2021-01-01",
  "jurisdictions": [
    "Netherlands"
  ],
  "num_results": 10,
  "page": 1,
  "portals": [
    "1|eur-lex.europa.eu"
  ],
  "query": "\"data protection\" AND (\"Facebook\" OR \"Meta\")",
  "sort_type": 0,
  "sources": [],
  "until_date": "2024-12-31"
}'

Try it

POST/v1.1/search/keyword_searchNot run yet
Region

The key stays in this browser tab and is sent only to api.moonlit.ai. Every request counts against your plan like any other call.

Response

Keyword search results

resultobject

Search result payload.

successboolean

Whether upstream query succeeded.

errorany | null

Upstream error payload.

The spec declares result as an open object; its fields are shown in the example below.

{
  "result": {
    "count": 405,
    "skip": 0,
    "top": 10,
    "results": [
      {
        "identifier": "62018CJ0311",
        "secondaryIdentifier": "ECLI:EU:C:2020:559",
        "tertiaryIdentifier": "C-311/18",
        "portal": "eur-lex.europa.eu",
        "startDate": "2018-05-09T00:00:00+00:00",
        "endDate": "2020-07-16T00:00:00+00:00",
        "date": "2020-07-16T00:00:00+00:00",
        "decisionDate": "2020-07-16T00:00:00+00:00",
        "enactmentDate": null,
        "publicationDate": null,
        "entryIntoForceDate": null,
        "validFrom": null,
        "validTo": null,
        "proceedingsStartDate": "2018-05-09T00:00:00+00:00",
        "highlights": [
          "...<span class='bold'>data</span> <span class='bold'>privacy</span>..."
        ],
        "semanticHighlights": null,
        "summary": null,
        "title": "Data Protection Commissioner/Facebook Ireland Limited and Maximillian Schrems (European Court of Justice 16 July 2020, C-311/18, ECLI:EU:C:2020:559)",
        "court": "European Court of Justice",
        "year": 2020,
        "sources": [
          {
            "id": "02045a9e2de3f3bd6c520ad0317efd0d",
            "parentId": "f7875ac0576a21c24937d480f6fde4f1",
            "shortName": "European Court of Justice",
            "name": "European Court of Justice"
          }
        ],
        "fieldsOfLaw": [
          {
            "id": "6c1022289490f6fca4adcf0e082d2524",
            "parentId": null,
            "shortName": "European data protection law",
            "name": "European data protection law"
          }
        ],
        "documentTypes": [
          {
            "id": "04b42e5bf858a66de2229227deaa21e3",
            "parentId": null,
            "shortName": "Decisions",
            "name": "Decisions"
          }
        ],
        "language": "EN",
        "dataSource": 0,
        "referenced": 165,
        "literatureReferenced": 103,
        "score": 24.674826,
        "sourceUrl": "https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:62018CJ0311",
        "inForce": null
      }
    ],
    "facets": {
      "DataSources": [
        {
          "shortName": "EU",
          "name": "European Union",
          "value": "0",
          "count": 128,
          "tooltip": null,
          "children": null,
          "parentId": null,
          "portals": [
            {
              "name": "eur-lex.europa.eu",
              "value": "0|eur-lex.europa.eu",
              "count": 59
            }
          ]
        }
      ],
      "Portals": [
        {
          "shortName": "eur-lex.europa.eu",
          "name": "eur-lex.europa.eu",
          "value": "eur-lex.europa.eu",
          "count": 59,
          "tooltip": null,
          "children": null,
          "parentId": null
        }
      ],
      "FieldsOfLaw": [
        {
          "shortName": "Public law",
          "name": "Public law",
          "value": "2f6b898befaa9e641cd8ee258cd8f22e",
          "count": 1,
          "tooltip": "Public law",
          "children": [],
          "parentId": null
        }
      ],
      "DocumentTypes": [
        {
          "shortName": "Decisions",
          "name": "Decisions",
          "value": "04b42e5bf858a66de2229227deaa21e3",
          "count": 33,
          "tooltip": "Decisions",
          "children": [],
          "parentId": null
        }
      ],
      "Sources": [
        {
          "shortName": "International courts",
          "name": "International courts",
          "value": "f7875ac0576a21c24937d480f6fde4f1",
          "count": 30,
          "tooltip": "International courts",
          "children": [],
          "parentId": null
        }
      ]
    }
  },
  "success": true,
  "error": null
}

Errors

400Invalid filter value or page out of range
401Missing or invalid API key
403Forbidden by role or jurisdiction scope
422Request validation error
429Monthly quota exhausted. Sent by the API gateway; the body is {"statusCode": 429, "message": "..."}.
500Internal server error
POST/v1.1/search/semantic_search
Search legal documents by meaning using vector similarity. Best for natural-language questions and concept-based retrieval. **Ranking:** Results are always ranked by vector-similarity score. There is no `sort_type` parameter — unlike keyword search, semantic search does not support sorting by date or citation count. Filter values are validated server-side. Retrieve accepted values from the filter endpoints before applying them: - GET /v1.1/search/filters/documenttypes — accepted documentTypes IDs - GET /v1.1/search/filters/jurisdictions_portals — accepted jurisdiction names and portal values - GET /v1.1/search/filters/trees — accepted fieldsOfLaw IDs

Parameters

querystringrequired

Natural-language semantic query text.

e.g. data transfer safeguards
documentTypesstring[]

Filter by document type. Only accepts IDs returned by GET /v1.1/search/filters/documenttypes. Example IDs: '18fead608f1a4dcb5671b9fc8aeab4d1' (Laws and regulations), '04b42e5bf858a66de2229227deaa21e3' (Decisions).

jurisdictionsstring[]

Filter by jurisdiction. Only accepts names returned by GET /v1.1/search/filters/jurisdictions_portals.

e.g. ["European Union","Netherlands"]
portalsstring[]

Filter by portal. Use the `value` field returned by GET /v1.1/search/filters/jurisdictions_portals. Can be combined with jurisdictions — e.g. pairing 'Netherlands' in jurisdictions with '1|eur-lex.europa.eu' in portals searches all documents from the Netherlands and documents from eur-lex.europa.eu.

e.g. ["1|eur-lex.europa.eu"]
fieldsOfLawstring[]

Filter by field of law. Only accepts IDs returned by GET /v1.1/search/filters/trees.

documentIdentifiersstring[]

Restrict the search to chunks belonging to these documents. Each value is a Moonlit document identifier (e.g. '32016R0679'). Empty list (or omitted) means no document scoping. Maximum 50 identifiers; exceeding returns 422. Composes with every other filter — e.g. combined with reference_identifier to scope reference search to a specific document.

max 50 itemse.g. ["32016R0679"]
from_datestring | null

Inclusive lower date bound (YYYY-MM-DD). Requires until_date when set.

format YYYY-MM-DDe.g. 2021-01-01
until_datestring | null

Inclusive upper date bound (YYYY-MM-DD). Requires from_date when set.

format YYYY-MM-DDe.g. 2024-12-31
date_fieldstring

Which document date `from_date`/`until_date` (and sort_type 1/2, where available) apply to. `date` (default) is the primary document date, as returned by retrieve_document. Documents without the chosen date are excluded by the date filter and sorted last.

date | decisionDate | enactmentDate | publicationDate | entryIntoForceDate | validFrom | validTo | proceedingsStartDate
sourcesstring[]

Filter by source (issuing entity such as a court or legislative body). Only accepts the `value` field from items returned by GET /v1.1/search/filters/sources. For example, if the filter endpoint returns `{"name": "Hof van Cassatie", "value": "c1f4502e43dc2c11969f4f201194fc07", ...}`, pass `"c1f4502e43dc2c11969f4f201194fc07"` in this array.

e.g. ["02045a9e2de3f3bd6c520ad0317efd0d"]
reference_identifierstring | null

Document identifier to find references for. When set, results are restricted to documents that reference or are referenced by this document (depending on reference_direction).

e.g. 32016R0679
reference_directioninteger | null

Direction of the reference relationship. 0 = to (documents that reference/cite reference_identifier), 1 = made_by (documents referenced by reference_identifier), 2 = both directions combined. Only used when reference_identifier is set.

0 | 1 | 2
article_reference_idstring | null

Article-level identifier to narrow reference results to a specific article within the referenced document. Use GET /v1.1/document/articles to discover available article identifiers for a document. Only used when reference_identifier is set.

reference_typesstring[] | null

Keep only documents related to reference_identifier by one of these reference type ids, e.g. `AMENDS`, `IMPLEMENTS`, `INTERPRETS`, `CITES`. Each result lists its own types in `referenceTypes`. Not applied together with article_reference_id.

max 50 itemse.g. ["AMENDS","REPEALS"]
reference_familiesstring[] | null

Keep only documents related to reference_identifier by a reference type of one of these families: `CITES`, `AMENDS`, `APPLIES`, `INTERPRETS`, `LEGAL_BASIS`, `REPEALS`, `CASE_HISTORY`, `RELATED_CASE`, `STRUCTURE`, `EDITORIAL`, `SAME_DOCUMENT`, `DOCUMENT_VERSION`, `JURISDICTION_SPECIFIC`. Not applied together with article_reference_id.

max 20 itemse.g. ["LEGAL_BASIS"]
pageintegerdefault: 1

1-based result page.

1 to 1000
num_resultsintegerdefault: 20

Results per page.

1 to 100

Example request

curl -X POST "https://api.moonlit.ai/v1.1/search/semantic_search" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "documentTypes": [
    "18fead608f1a4dcb5671b9fc8aeab4d1",
    "04b42e5bf858a66de2229227deaa21e3"
  ],
  "fieldsOfLaw": [],
  "jurisdictions": [],
  "num_results": 20,
  "page": 1,
  "portals": [
    "0|eur-lex.europa.eu"
  ],
  "query": "data transfer safeguards for tech companies",
  "sources": []
}'

Try it

POST/v1.1/search/semantic_searchNot run yet
Region

The key stays in this browser tab and is sent only to api.moonlit.ai. Every request counts against your plan like any other call.

Response

Semantic search results

resultobject

Search result payload.

successboolean

Whether upstream query succeeded.

errorany | null

Upstream error payload.

The spec declares result as an open object; its fields are shown in the example below.

{
  "result": {
    "count": 1,
    "skip": 0,
    "top": 10,
    "results": [
      {
        "identifier": "MNLT:NL:WETTEN:BWBR0012095",
        "secondaryIdentifier": "BWBR0012095",
        "tertiaryIdentifier": "Besluit voorkoming dubbele belasting 2001",
        "portal": "wetten.overheid.nl",
        "startDate": null,
        "endDate": "2026-01-01T00:00:00+00:00",
        "date": "2026-01-01T00:00:00+00:00",
        "decisionDate": null,
        "enactmentDate": null,
        "publicationDate": null,
        "entryIntoForceDate": null,
        "validFrom": null,
        "validTo": null,
        "proceedingsStartDate": null,
        "highlights": [],
        "semanticHighlights": [
          {
            "chunkIdentifier": "MNLT:NL:WETTEN:BWBR0012095#50",
            "chunkText": "Artikel 25aa. Voorkoming van dubbele belasting bij toepassing tegenbewijsregeling ...",
            "startOffset": 38799,
            "endOffset": 39448,
            "score": 0.8780079
          }
        ],
        "summary": null,
        "title": "Besluit voorkoming dubbele belasting 2001",
        "court": "Dutch government",
        "year": 2026,
        "sources": [
          {
            "id": "0a49dfeda181ab7609d2d7d613939f34",
            "parentId": "b49c23adeaa6a345aa815e401c6d194b",
            "shortName": "Nederlandse overheid",
            "name": "Nederlandse overheid"
          }
        ],
        "fieldsOfLaw": [],
        "documentTypes": [
          {
            "id": "18fead608f1a4dcb5671b9fc8aeab4d1",
            "parentId": null,
            "shortName": "Laws and regulations",
            "name": "Laws and regulations"
          }
        ],
        "language": "NL",
        "dataSource": 1,
        "referenced": 20,
        "literatureReferenced": null,
        "score": 0.8780079,
        "sourceUrl": "https://wetten.overheid.nl/id/BWBR0012095/2026-01-01/0",
        "inForce": null
      }
    ],
    "facets": null
  },
  "success": true,
  "error": null
}

Errors

400Invalid filter value or page out of range
401Missing or invalid API key
403Forbidden by role or jurisdiction scope
422Request validation error
429Monthly quota exhausted. Sent by the API gateway; the body is {"statusCode": 429, "message": "..."}.
500Internal server error

Semantic Search with Reranking

POST/v1.1/search/semantic_search_reranked
Same as semantic search but applies a reranker to the results for improved relevance. Uses Google Vertex AI reranking.

Parameters

querystringrequired

Natural-language semantic query text.

e.g. data transfer safeguards
documentTypesstring[]

Filter by document type. Only accepts IDs returned by GET /v1.1/search/filters/documenttypes. Example IDs: '18fead608f1a4dcb5671b9fc8aeab4d1' (Laws and regulations), '04b42e5bf858a66de2229227deaa21e3' (Decisions).

jurisdictionsstring[]

Filter by jurisdiction. Only accepts names returned by GET /v1.1/search/filters/jurisdictions_portals.

e.g. ["European Union","Netherlands"]
portalsstring[]

Filter by portal. Use the `value` field returned by GET /v1.1/search/filters/jurisdictions_portals. Can be combined with jurisdictions — e.g. pairing 'Netherlands' in jurisdictions with '1|eur-lex.europa.eu' in portals searches all documents from the Netherlands and documents from eur-lex.europa.eu.

e.g. ["1|eur-lex.europa.eu"]
fieldsOfLawstring[]

Filter by field of law. Only accepts IDs returned by GET /v1.1/search/filters/trees.

documentIdentifiersstring[]

Restrict the search to chunks belonging to these documents. Each value is a Moonlit document identifier (e.g. '32016R0679'). Empty list (or omitted) means no document scoping. Maximum 50 identifiers; exceeding returns 422. Composes with every other filter — e.g. combined with reference_identifier to scope reference search to a specific document.

max 50 itemse.g. ["32016R0679"]
from_datestring | null

Inclusive lower date bound (YYYY-MM-DD). Requires until_date when set.

format YYYY-MM-DDe.g. 2021-01-01
until_datestring | null

Inclusive upper date bound (YYYY-MM-DD). Requires from_date when set.

format YYYY-MM-DDe.g. 2024-12-31
date_fieldstring

Which document date `from_date`/`until_date` (and sort_type 1/2, where available) apply to. `date` (default) is the primary document date, as returned by retrieve_document. Documents without the chosen date are excluded by the date filter and sorted last.

date | decisionDate | enactmentDate | publicationDate | entryIntoForceDate | validFrom | validTo | proceedingsStartDate
sourcesstring[]

Filter by source (issuing entity such as a court or legislative body). Only accepts the `value` field from items returned by GET /v1.1/search/filters/sources. For example, if the filter endpoint returns `{"name": "Hof van Cassatie", "value": "c1f4502e43dc2c11969f4f201194fc07", ...}`, pass `"c1f4502e43dc2c11969f4f201194fc07"` in this array.

e.g. ["02045a9e2de3f3bd6c520ad0317efd0d"]
reference_identifierstring | null

Document identifier to find references for. When set, results are restricted to documents that reference or are referenced by this document (depending on reference_direction).

e.g. 32016R0679
reference_directioninteger | null

Direction of the reference relationship. 0 = to (documents that reference/cite reference_identifier), 1 = made_by (documents referenced by reference_identifier), 2 = both directions combined. Only used when reference_identifier is set.

0 | 1 | 2
article_reference_idstring | null

Article-level identifier to narrow reference results to a specific article within the referenced document. Use GET /v1.1/document/articles to discover available article identifiers for a document. Only used when reference_identifier is set.

reference_typesstring[] | null

Keep only documents related to reference_identifier by one of these reference type ids, e.g. `AMENDS`, `IMPLEMENTS`, `INTERPRETS`, `CITES`. Each result lists its own types in `referenceTypes`. Not applied together with article_reference_id.

max 50 itemse.g. ["AMENDS","REPEALS"]
reference_familiesstring[] | null

Keep only documents related to reference_identifier by a reference type of one of these families: `CITES`, `AMENDS`, `APPLIES`, `INTERPRETS`, `LEGAL_BASIS`, `REPEALS`, `CASE_HISTORY`, `RELATED_CASE`, `STRUCTURE`, `EDITORIAL`, `SAME_DOCUMENT`, `DOCUMENT_VERSION`, `JURISDICTION_SPECIFIC`. Not applied together with article_reference_id.

max 20 itemse.g. ["LEGAL_BASIS"]
pageintegerdefault: 1

1-based result page.

1 to 1000
num_resultsintegerdefault: 20

Results per page.

1 to 100
rerankerTypeinteger

1 = GoogleVertexAiRerank (default).

1 | 2

Example request

curl -X POST "https://api.moonlit.ai/v1.1/search/semantic_search_reranked" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "documentTypes": [],
  "fieldsOfLaw": [],
  "jurisdictions": [],
  "num_results": 20,
  "page": 1,
  "portals": [],
  "query": "data transfer safeguards for tech companies",
  "rerankerType": 1,
  "sources": []
}'

Try it

POST/v1.1/search/semantic_search_rerankedNot run yet
Region

The key stays in this browser tab and is sent only to api.moonlit.ai. Every request counts against your plan like any other call.

Response

Semantic search results, reranked by relevance

resultobject

Search result payload.

successboolean

Whether upstream query succeeded.

errorany | null

Upstream error payload.

The spec declares result as an open object; its fields are shown in the example below.

{
  "result": {
    "count": 1,
    "skip": 0,
    "top": 10,
    "results": [
      {
        "identifier": "MNLT:NL:WETTEN:BWBR0012095",
        "secondaryIdentifier": "BWBR0012095",
        "tertiaryIdentifier": "Besluit voorkoming dubbele belasting 2001",
        "portal": "wetten.overheid.nl",
        "startDate": null,
        "endDate": "2026-01-01T00:00:00+00:00",
        "date": "2026-01-01T00:00:00+00:00",
        "decisionDate": null,
        "enactmentDate": null,
        "publicationDate": null,
        "entryIntoForceDate": null,
        "validFrom": null,
        "validTo": null,
        "proceedingsStartDate": null,
        "highlights": [],
        "semanticHighlights": [
          {
            "chunkIdentifier": "MNLT:NL:WETTEN:BWBR0012095#50",
            "chunkText": "Artikel 25aa. Voorkoming van dubbele belasting bij toepassing tegenbewijsregeling ...",
            "startOffset": 38799,
            "endOffset": 39448,
            "score": 0.8780079
          }
        ],
        "summary": null,
        "title": "Besluit voorkoming dubbele belasting 2001",
        "court": "Dutch government",
        "year": 2026,
        "sources": [
          {
            "id": "0a49dfeda181ab7609d2d7d613939f34",
            "parentId": "b49c23adeaa6a345aa815e401c6d194b",
            "shortName": "Nederlandse overheid",
            "name": "Nederlandse overheid"
          }
        ],
        "fieldsOfLaw": [],
        "documentTypes": [
          {
            "id": "18fead608f1a4dcb5671b9fc8aeab4d1",
            "parentId": null,
            "shortName": "Laws and regulations",
            "name": "Laws and regulations"
          }
        ],
        "language": "NL",
        "dataSource": 1,
        "referenced": 20,
        "literatureReferenced": null,
        "score": 0.92,
        "sourceUrl": "https://wetten.overheid.nl/id/BWBR0012095/2026-01-01/0",
        "inForce": null
      }
    ],
    "facets": null
  },
  "success": true,
  "error": null
}

Errors

400Invalid filter value or page out of range
401Missing or invalid API key
403Forbidden by role or jurisdiction scope
422Request validation error
429Monthly quota exhausted. Sent by the API gateway; the body is {"statusCode": 429, "message": "..."}.
500Internal server error
504Search timed out
POST/v1.1/search/hybrid_search
Combines keyword and semantic search. Ideal for long natural-language queries that may contain exact legal citations. The system automatically extracts keyword terms from the query and runs both keyword and semantic searches in parallel, then fuses the ranked result lists. Filter values are validated server-side. Retrieve accepted values from the filter endpoints before applying them: - GET /v1.1/search/filters/documenttypes — accepted documentTypes IDs - GET /v1.1/search/filters/jurisdictions_portals — accepted jurisdiction names and portal values - GET /v1.1/search/filters/trees — accepted fieldsOfLaw IDs

Parameters

querystringrequired

Natural-language query. The system extracts keyword terms automatically and runs both keyword and semantic searches in parallel, fusing the results.

e.g. What are the GDPR requirements for cross-border data transfers?
documentTypesstring[]

Filter by document type. Only accepts IDs returned by GET /v1.1/search/filters/documenttypes. Example IDs: '18fead608f1a4dcb5671b9fc8aeab4d1' (Laws and regulations), '04b42e5bf858a66de2229227deaa21e3' (Decisions).

jurisdictionsstring[]

Filter by jurisdiction. Only accepts names returned by GET /v1.1/search/filters/jurisdictions_portals.

e.g. ["European Union","Netherlands"]
portalsstring[]

Filter by portal. Use the `value` field returned by GET /v1.1/search/filters/jurisdictions_portals. Can be combined with jurisdictions — e.g. pairing 'Netherlands' in jurisdictions with '1|eur-lex.europa.eu' in portals searches all documents from the Netherlands and documents from eur-lex.europa.eu.

e.g. ["1|eur-lex.europa.eu"]
fieldsOfLawstring[]

Filter by field of law. Only accepts IDs returned by GET /v1.1/search/filters/trees.

documentIdentifiersstring[]

Restrict the search to chunks belonging to these documents. Each value is a Moonlit document identifier (e.g. '32016R0679'). Empty list (or omitted) means no document scoping. Maximum 50 identifiers; exceeding returns 422. Composes with every other filter — e.g. combined with reference_identifier to scope reference search to a specific document.

max 50 itemse.g. ["32016R0679"]
from_datestring | null

Inclusive lower date bound (YYYY-MM-DD). Requires until_date when set.

format YYYY-MM-DDe.g. 2021-01-01
until_datestring | null

Inclusive upper date bound (YYYY-MM-DD). Requires from_date when set.

format YYYY-MM-DDe.g. 2024-12-31
date_fieldstring

Which document date `from_date`/`until_date` (and sort_type 1/2, where available) apply to. `date` (default) is the primary document date, as returned by retrieve_document. Documents without the chosen date are excluded by the date filter and sorted last.

date | decisionDate | enactmentDate | publicationDate | entryIntoForceDate | validFrom | validTo | proceedingsStartDate
sourcesstring[]

Filter by source (issuing entity such as a court or legislative body). Only accepts the `value` field from items returned by GET /v1.1/search/filters/sources. For example, if the filter endpoint returns `{"name": "Hof van Cassatie", "value": "c1f4502e43dc2c11969f4f201194fc07", ...}`, pass `"c1f4502e43dc2c11969f4f201194fc07"` in this array.

e.g. ["02045a9e2de3f3bd6c520ad0317efd0d"]
reference_identifierstring | null

Document identifier to find references for. When set, results are restricted to documents that reference or are referenced by this document (depending on reference_direction).

e.g. 32016R0679
reference_directioninteger | null

Direction of the reference relationship. 0 = to (documents that reference/cite reference_identifier), 1 = made_by (documents referenced by reference_identifier), 2 = both directions combined. Only used when reference_identifier is set.

0 | 1 | 2
article_reference_idstring | null

Article-level identifier to narrow reference results to a specific article within the referenced document. Use GET /v1.1/document/articles to discover available article identifiers for a document. Only used when reference_identifier is set.

reference_typesstring[] | null

Keep only documents related to reference_identifier by one of these reference type ids, e.g. `AMENDS`, `IMPLEMENTS`, `INTERPRETS`, `CITES`. Each result lists its own types in `referenceTypes`. Not applied together with article_reference_id.

max 50 itemse.g. ["AMENDS","REPEALS"]
reference_familiesstring[] | null

Keep only documents related to reference_identifier by a reference type of one of these families: `CITES`, `AMENDS`, `APPLIES`, `INTERPRETS`, `LEGAL_BASIS`, `REPEALS`, `CASE_HISTORY`, `RELATED_CASE`, `STRUCTURE`, `EDITORIAL`, `SAME_DOCUMENT`, `DOCUMENT_VERSION`, `JURISDICTION_SPECIFIC`. Not applied together with article_reference_id.

max 20 itemse.g. ["LEGAL_BASIS"]
pageintegerdefault: 1

1-based result page.

1 to 1000
num_resultsintegerdefault: 10

Results per page.

1 to 100
semantic_weightnumberdefault: 0.6

Weight for semantic search results in RRF fusion (0.0–1.0). Keyword weight is inferred as 1 − semantic_weight.

0 to 1

Example request

curl -X POST "https://api.moonlit.ai/v1.1/search/hybrid_search" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "documentTypes": [],
  "fieldsOfLaw": [],
  "jurisdictions": [
    "European Union"
  ],
  "num_results": 10,
  "page": 1,
  "portals": [],
  "query": "What are the GDPR requirements for cross-border data transfers?",
  "semantic_weight": 0.6,
  "sources": []
}'

Try it

POST/v1.1/search/hybrid_searchNot run yet
Region

The key stays in this browser tab and is sent only to api.moonlit.ai. Every request counts against your plan like any other call.

Response

Hybrid search results ranked by fused RRF score

resultobject

Search result payload.

successboolean

Whether upstream query succeeded.

errorany | null

Upstream error payload.

The spec declares result as an open object; its fields are shown in the example below.

{
  "result": {
    "count": 2,
    "skip": 0,
    "top": 10,
    "results": [
      {
        "identifier": "62018CJ0311",
        "secondaryIdentifier": "ECLI:EU:C:2020:559",
        "tertiaryIdentifier": "C-311/18",
        "portal": "eur-lex.europa.eu",
        "startDate": "2018-05-09T00:00:00+00:00",
        "endDate": "2020-07-16T00:00:00+00:00",
        "date": "2020-07-16T00:00:00+00:00",
        "decisionDate": "2020-07-16T00:00:00+00:00",
        "enactmentDate": null,
        "publicationDate": null,
        "entryIntoForceDate": null,
        "validFrom": null,
        "validTo": null,
        "proceedingsStartDate": "2018-05-09T00:00:00+00:00",
        "highlights": [
          "...<span class='bold'>data</span> <span class='bold'>privacy</span>..."
        ],
        "semanticHighlights": null,
        "summary": null,
        "title": "Data Protection Commissioner/Facebook Ireland Limited and Maximillian Schrems (European Court of Justice 16 July 2020, C-311/18, ECLI:EU:C:2020:559)",
        "court": "European Court of Justice",
        "year": 2020,
        "sources": [
          {
            "id": "02045a9e2de3f3bd6c520ad0317efd0d",
            "parentId": "f7875ac0576a21c24937d480f6fde4f1",
            "shortName": "European Court of Justice",
            "name": "European Court of Justice"
          }
        ],
        "fieldsOfLaw": [
          {
            "id": "6c1022289490f6fca4adcf0e082d2524",
            "parentId": null,
            "shortName": "European data protection law",
            "name": "European data protection law"
          }
        ],
        "documentTypes": [
          {
            "id": "04b42e5bf858a66de2229227deaa21e3",
            "parentId": null,
            "shortName": "Decisions",
            "name": "Decisions"
          }
        ],
        "language": "EN",
        "dataSource": 0,
        "referenced": 165,
        "literatureReferenced": 103,
        "score": 0.0325,
        "sourceUrl": "https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:62018CJ0311",
        "inForce": null
      },
      {
        "identifier": "MNLT:NL:WETTEN:BWBR0012095",
        "secondaryIdentifier": "BWBR0012095",
        "tertiaryIdentifier": "Besluit voorkoming dubbele belasting 2001",
        "portal": "wetten.overheid.nl",
        "startDate": null,
        "endDate": "2026-01-01T00:00:00+00:00",
        "date": "2026-01-01T00:00:00+00:00",
        "decisionDate": null,
        "enactmentDate": null,
        "publicationDate": null,
        "entryIntoForceDate": null,
        "validFrom": null,
        "validTo": null,
        "proceedingsStartDate": null,
        "highlights": [],
        "semanticHighlights": [
          {
            "chunkIdentifier": "MNLT:NL:WETTEN:BWBR0012095#50",
            "chunkText": "Artikel 25aa. Voorkoming van dubbele belasting bij toepassing tegenbewijsregeling ...",
            "startOffset": 38799,
            "endOffset": 39448,
            "score": 0.8780079
          }
        ],
        "summary": null,
        "title": "Besluit voorkoming dubbele belasting 2001",
        "court": "Dutch government",
        "year": 2026,
        "sources": [
          {
            "id": "0a49dfeda181ab7609d2d7d613939f34",
            "parentId": "b49c23adeaa6a345aa815e401c6d194b",
            "shortName": "Nederlandse overheid",
            "name": "Nederlandse overheid"
          }
        ],
        "fieldsOfLaw": [],
        "documentTypes": [
          {
            "id": "18fead608f1a4dcb5671b9fc8aeab4d1",
            "parentId": null,
            "shortName": "Laws and regulations",
            "name": "Laws and regulations"
          }
        ],
        "language": "NL",
        "dataSource": 1,
        "referenced": 20,
        "literatureReferenced": null,
        "score": 0.0161,
        "sourceUrl": "https://wetten.overheid.nl/id/BWBR0012095/2026-01-01/0",
        "inForce": null
      }
    ],
    "facets": null
  },
  "success": true,
  "error": null
}

Errors

400Invalid filter value or page out of range
401Missing or invalid API key
403Forbidden by role or jurisdiction scope
422Request validation error
429Monthly quota exhausted. Sent by the API gateway; the body is {"statusCode": 429, "message": "..."}.
500Internal server error
504Search timed out

Hybrid Search with Reranking

POST/v1.1/search/hybrid_search_reranked
Same as hybrid search but applies a reranker to the fused results for improved relevance. Uses Google Vertex AI reranking. The reranker re-scores results after RRF fusion, giving higher-quality ranking at the cost of slightly higher latency. Filter values are validated server-side. Retrieve accepted values from the filter endpoints before applying them: - GET /v1.1/search/filters/documenttypes — accepted documentTypes IDs - GET /v1.1/search/filters/jurisdictions_portals — accepted jurisdiction names and portal values - GET /v1.1/search/filters/trees — accepted fieldsOfLaw IDs

Parameters

querystringrequired

Natural-language query. The system extracts keyword terms automatically and runs both keyword and semantic searches in parallel, fusing the results.

e.g. What are the GDPR requirements for cross-border data transfers?
documentTypesstring[]

Filter by document type. Only accepts IDs returned by GET /v1.1/search/filters/documenttypes. Example IDs: '18fead608f1a4dcb5671b9fc8aeab4d1' (Laws and regulations), '04b42e5bf858a66de2229227deaa21e3' (Decisions).

jurisdictionsstring[]

Filter by jurisdiction. Only accepts names returned by GET /v1.1/search/filters/jurisdictions_portals.

e.g. ["European Union","Netherlands"]
portalsstring[]

Filter by portal. Use the `value` field returned by GET /v1.1/search/filters/jurisdictions_portals. Can be combined with jurisdictions — e.g. pairing 'Netherlands' in jurisdictions with '1|eur-lex.europa.eu' in portals searches all documents from the Netherlands and documents from eur-lex.europa.eu.

e.g. ["1|eur-lex.europa.eu"]
fieldsOfLawstring[]

Filter by field of law. Only accepts IDs returned by GET /v1.1/search/filters/trees.

documentIdentifiersstring[]

Restrict the search to chunks belonging to these documents. Each value is a Moonlit document identifier (e.g. '32016R0679'). Empty list (or omitted) means no document scoping. Maximum 50 identifiers; exceeding returns 422. Composes with every other filter — e.g. combined with reference_identifier to scope reference search to a specific document.

max 50 itemse.g. ["32016R0679"]
from_datestring | null

Inclusive lower date bound (YYYY-MM-DD). Requires until_date when set.

format YYYY-MM-DDe.g. 2021-01-01
until_datestring | null

Inclusive upper date bound (YYYY-MM-DD). Requires from_date when set.

format YYYY-MM-DDe.g. 2024-12-31
date_fieldstring

Which document date `from_date`/`until_date` (and sort_type 1/2, where available) apply to. `date` (default) is the primary document date, as returned by retrieve_document. Documents without the chosen date are excluded by the date filter and sorted last.

date | decisionDate | enactmentDate | publicationDate | entryIntoForceDate | validFrom | validTo | proceedingsStartDate
sourcesstring[]

Filter by source (issuing entity such as a court or legislative body). Only accepts the `value` field from items returned by GET /v1.1/search/filters/sources. For example, if the filter endpoint returns `{"name": "Hof van Cassatie", "value": "c1f4502e43dc2c11969f4f201194fc07", ...}`, pass `"c1f4502e43dc2c11969f4f201194fc07"` in this array.

e.g. ["02045a9e2de3f3bd6c520ad0317efd0d"]
reference_identifierstring | null

Document identifier to find references for. When set, results are restricted to documents that reference or are referenced by this document (depending on reference_direction).

e.g. 32016R0679
reference_directioninteger | null

Direction of the reference relationship. 0 = to (documents that reference/cite reference_identifier), 1 = made_by (documents referenced by reference_identifier), 2 = both directions combined. Only used when reference_identifier is set.

0 | 1 | 2
article_reference_idstring | null

Article-level identifier to narrow reference results to a specific article within the referenced document. Use GET /v1.1/document/articles to discover available article identifiers for a document. Only used when reference_identifier is set.

reference_typesstring[] | null

Keep only documents related to reference_identifier by one of these reference type ids, e.g. `AMENDS`, `IMPLEMENTS`, `INTERPRETS`, `CITES`. Each result lists its own types in `referenceTypes`. Not applied together with article_reference_id.

max 50 itemse.g. ["AMENDS","REPEALS"]
reference_familiesstring[] | null

Keep only documents related to reference_identifier by a reference type of one of these families: `CITES`, `AMENDS`, `APPLIES`, `INTERPRETS`, `LEGAL_BASIS`, `REPEALS`, `CASE_HISTORY`, `RELATED_CASE`, `STRUCTURE`, `EDITORIAL`, `SAME_DOCUMENT`, `DOCUMENT_VERSION`, `JURISDICTION_SPECIFIC`. Not applied together with article_reference_id.

max 20 itemse.g. ["LEGAL_BASIS"]
pageintegerdefault: 1

1-based result page.

1 to 1000
num_resultsintegerdefault: 10

Results per page.

1 to 100
semantic_weightnumberdefault: 0.6

Weight for semantic search results in RRF fusion (0.0–1.0). Keyword weight is inferred as 1 − semantic_weight.

0 to 1
rerankerTypeinteger

1 = GoogleVertexAiRerank (default).

1 | 2

Example request

curl -X POST "https://api.moonlit.ai/v1.1/search/hybrid_search_reranked" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "documentTypes": [],
  "fieldsOfLaw": [],
  "jurisdictions": [
    "European Union"
  ],
  "num_results": 10,
  "page": 1,
  "portals": [],
  "query": "What are the GDPR requirements for cross-border data transfers?",
  "rerankerType": 1,
  "semantic_weight": 0.6,
  "sources": []
}'

Try it

POST/v1.1/search/hybrid_search_rerankedNot run yet
Region

The key stays in this browser tab and is sent only to api.moonlit.ai. Every request counts against your plan like any other call.

Response

Hybrid search results, reranked by relevance

resultobject

Search result payload.

successboolean

Whether upstream query succeeded.

errorany | null

Upstream error payload.

The spec declares result as an open object; its fields are shown in the example below.

{
  "result": {
    "count": 2,
    "skip": 0,
    "top": 10,
    "results": [
      {
        "identifier": "62018CJ0311",
        "secondaryIdentifier": "ECLI:EU:C:2020:559",
        "tertiaryIdentifier": "C-311/18",
        "portal": "eur-lex.europa.eu",
        "startDate": "2018-05-09T00:00:00+00:00",
        "endDate": "2020-07-16T00:00:00+00:00",
        "date": "2020-07-16T00:00:00+00:00",
        "decisionDate": "2020-07-16T00:00:00+00:00",
        "enactmentDate": null,
        "publicationDate": null,
        "entryIntoForceDate": null,
        "validFrom": null,
        "validTo": null,
        "proceedingsStartDate": "2018-05-09T00:00:00+00:00",
        "highlights": [
          "...<span class='bold'>data</span> <span class='bold'>privacy</span>..."
        ],
        "semanticHighlights": null,
        "summary": null,
        "title": "Data Protection Commissioner/Facebook Ireland Limited and Maximillian Schrems (European Court of Justice 16 July 2020, C-311/18, ECLI:EU:C:2020:559)",
        "court": "European Court of Justice",
        "year": 2020,
        "sources": [
          {
            "id": "02045a9e2de3f3bd6c520ad0317efd0d",
            "parentId": "f7875ac0576a21c24937d480f6fde4f1",
            "shortName": "European Court of Justice",
            "name": "European Court of Justice"
          }
        ],
        "fieldsOfLaw": [
          {
            "id": "6c1022289490f6fca4adcf0e082d2524",
            "parentId": null,
            "shortName": "European data protection law",
            "name": "European data protection law"
          }
        ],
        "documentTypes": [
          {
            "id": "04b42e5bf858a66de2229227deaa21e3",
            "parentId": null,
            "shortName": "Decisions",
            "name": "Decisions"
          }
        ],
        "language": "EN",
        "dataSource": 0,
        "referenced": 165,
        "literatureReferenced": 103,
        "score": 0.94,
        "sourceUrl": "https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:62018CJ0311",
        "inForce": null
      },
      {
        "identifier": "MNLT:NL:WETTEN:BWBR0012095",
        "secondaryIdentifier": "BWBR0012095",
        "tertiaryIdentifier": "Besluit voorkoming dubbele belasting 2001",
        "portal": "wetten.overheid.nl",
        "startDate": null,
        "endDate": "2026-01-01T00:00:00+00:00",
        "date": "2026-01-01T00:00:00+00:00",
        "decisionDate": null,
        "enactmentDate": null,
        "publicationDate": null,
        "entryIntoForceDate": null,
        "validFrom": null,
        "validTo": null,
        "proceedingsStartDate": null,
        "highlights": [],
        "semanticHighlights": [
          {
            "chunkIdentifier": "MNLT:NL:WETTEN:BWBR0012095#50",
            "chunkText": "Artikel 25aa. Voorkoming van dubbele belasting bij toepassing tegenbewijsregeling ...",
            "startOffset": 38799,
            "endOffset": 39448,
            "score": 0.8780079
          }
        ],
        "summary": null,
        "title": "Besluit voorkoming dubbele belasting 2001",
        "court": "Dutch government",
        "year": 2026,
        "sources": [
          {
            "id": "0a49dfeda181ab7609d2d7d613939f34",
            "parentId": "b49c23adeaa6a345aa815e401c6d194b",
            "shortName": "Nederlandse overheid",
            "name": "Nederlandse overheid"
          }
        ],
        "fieldsOfLaw": [],
        "documentTypes": [
          {
            "id": "18fead608f1a4dcb5671b9fc8aeab4d1",
            "parentId": null,
            "shortName": "Laws and regulations",
            "name": "Laws and regulations"
          }
        ],
        "language": "NL",
        "dataSource": 1,
        "referenced": 20,
        "literatureReferenced": null,
        "score": 0.71,
        "sourceUrl": "https://wetten.overheid.nl/id/BWBR0012095/2026-01-01/0",
        "inForce": null
      }
    ],
    "facets": null
  },
  "success": true,
  "error": null
}

Errors

400Invalid filter value or page out of range
401Missing or invalid API key
403Forbidden by role or jurisdiction scope
422Request validation error
429Monthly quota exhausted. Sent by the API gateway; the body is {"statusCode": 429, "message": "..."}.
500Internal server error
504Search timed out
POST/v1.1/search/reference_search
Find documents that reference or are referenced by a given document. Returns a full keyword search response filtered to matching reference documents. Use `reference_direction` to control the lookup: - 0 (to): documents that reference/cite the given document - 1 (made_by): documents referenced by the given document - 2 (both): union of both directions All standard filters (documentTypes, jurisdictions, etc.) can be applied on top of the reference filter. Use `article_reference_id` to narrow results to references of a specific article within the document. Discover available articles via GET /v1.1/document/articles.

Parameters

reference_identifierstringrequired

Document identifier to find references for.

e.g. 32016R0679
documentTypesstring[]

Filter by document type. Only accepts IDs returned by GET /v1.1/search/filters/documenttypes. Example IDs: '18fead608f1a4dcb5671b9fc8aeab4d1' (Laws and regulations), '04b42e5bf858a66de2229227deaa21e3' (Decisions).

jurisdictionsstring[]

Filter by jurisdiction. Only accepts names returned by GET /v1.1/search/filters/jurisdictions_portals.

e.g. ["European Union","Netherlands"]
portalsstring[]

Filter by portal. Use the `value` field returned by GET /v1.1/search/filters/jurisdictions_portals. Can be combined with jurisdictions — e.g. pairing 'Netherlands' in jurisdictions with '1|eur-lex.europa.eu' in portals searches all documents from the Netherlands and documents from eur-lex.europa.eu.

e.g. ["1|eur-lex.europa.eu"]
fieldsOfLawstring[]

Filter by field of law. Only accepts IDs returned by GET /v1.1/search/filters/trees.

documentIdentifiersstring[]

Restrict the search to chunks belonging to these documents. Each value is a Moonlit document identifier (e.g. '32016R0679'). Empty list (or omitted) means no document scoping. Maximum 50 identifiers; exceeding returns 422. Composes with every other filter — e.g. combined with reference_identifier to scope reference search to a specific document.

max 50 itemse.g. ["32016R0679"]
from_datestring | null

Inclusive lower date bound (YYYY-MM-DD). Requires until_date when set.

format YYYY-MM-DDe.g. 2021-01-01
until_datestring | null

Inclusive upper date bound (YYYY-MM-DD). Requires from_date when set.

format YYYY-MM-DDe.g. 2024-12-31
date_fieldstring

Which document date `from_date`/`until_date` (and sort_type 1/2, where available) apply to. `date` (default) is the primary document date, as returned by retrieve_document. Documents without the chosen date are excluded by the date filter and sorted last.

date | decisionDate | enactmentDate | publicationDate | entryIntoForceDate | validFrom | validTo | proceedingsStartDate
sourcesstring[]

Filter by source (issuing entity such as a court or legislative body). Only accepts the `value` field from items returned by GET /v1.1/search/filters/sources. For example, if the filter endpoint returns `{"name": "Hof van Cassatie", "value": "c1f4502e43dc2c11969f4f201194fc07", ...}`, pass `"c1f4502e43dc2c11969f4f201194fc07"` in this array.

e.g. ["02045a9e2de3f3bd6c520ad0317efd0d"]
reference_directioninteger
0 | 1 | 2
article_reference_idstring | null

Article-level identifier to narrow reference results to a specific article within the referenced document. Use GET /v1.1/document/articles to discover available article identifiers for a document. Only used when reference_identifier is set.

reference_typesstring[] | null

Keep only documents related to reference_identifier by one of these reference type ids, e.g. `AMENDS`, `IMPLEMENTS`, `INTERPRETS`, `CITES`. Each result lists its own types in `referenceTypes`. Not applied together with article_reference_id.

max 50 itemse.g. ["AMENDS","REPEALS"]
reference_familiesstring[] | null

Keep only documents related to reference_identifier by a reference type of one of these families: `CITES`, `AMENDS`, `APPLIES`, `INTERPRETS`, `LEGAL_BASIS`, `REPEALS`, `CASE_HISTORY`, `RELATED_CASE`, `STRUCTURE`, `EDITORIAL`, `SAME_DOCUMENT`, `DOCUMENT_VERSION`, `JURISDICTION_SPECIFIC`. Not applied together with article_reference_id.

max 20 itemse.g. ["LEGAL_BASIS"]
querystringdefault: *

Optional keyword query to apply on top of the reference filter. Defaults to '*' (all matching references).

sort_typeinteger

0 = relevance (default), 1 = newest first, 2 = oldest first, 3 = most cited.

0 | 1 | 2 | 3
pageintegerdefault: 1

1-based result page.

1 to 1000
num_resultsintegerdefault: 10

Results per page.

1 to 100
facetsbooleandefault: false

Whether to include facets in the response.

all_facetsbooleandefault: false

Include zero-count FieldsOfLaw and DocumentTypes values when facets is enabled.

facet_limitinteger | null

Maximum number of sources kept under each top-level category in the Sources facet, ranked by document count. Omit for the full tree.

1 to 4000

Example request

curl -X POST "https://api.moonlit.ai/v1.1/search/reference_search" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "all_facets": false,
  "documentTypes": [],
  "facets": false,
  "fieldsOfLaw": [],
  "jurisdictions": [],
  "num_results": 10,
  "page": 1,
  "portals": [],
  "query": "*",
  "reference_direction": 0,
  "reference_identifier": "32016R0679",
  "sort_type": 0,
  "sources": []
}'

Try it

POST/v1.1/search/reference_searchNot run yet
Region

The key stays in this browser tab and is sent only to api.moonlit.ai. Every request counts against your plan like any other call.

Response

Reference search results

resultobject

Search result payload.

successboolean

Whether upstream query succeeded.

errorany | null

Upstream error payload.

The spec declares result as an open object; its fields are shown in the example below.

{
  "result": {
    "count": 1,
    "skip": 0,
    "top": 10,
    "results": [
      {
        "identifier": "62018CJ0311",
        "secondaryIdentifier": "ECLI:EU:C:2020:559",
        "tertiaryIdentifier": "C-311/18",
        "portal": "eur-lex.europa.eu",
        "startDate": "2018-05-09T00:00:00+00:00",
        "endDate": "2020-07-16T00:00:00+00:00",
        "date": "2020-07-16T00:00:00+00:00",
        "decisionDate": "2020-07-16T00:00:00+00:00",
        "enactmentDate": null,
        "publicationDate": null,
        "entryIntoForceDate": null,
        "validFrom": null,
        "validTo": null,
        "proceedingsStartDate": "2018-05-09T00:00:00+00:00",
        "highlights": [
          "...<span class='bold'>data</span> <span class='bold'>privacy</span>..."
        ],
        "semanticHighlights": null,
        "summary": null,
        "title": "Data Protection Commissioner/Facebook Ireland Limited and Maximillian Schrems (European Court of Justice 16 July 2020, C-311/18, ECLI:EU:C:2020:559)",
        "court": "European Court of Justice",
        "year": 2020,
        "sources": [
          {
            "id": "02045a9e2de3f3bd6c520ad0317efd0d",
            "parentId": "f7875ac0576a21c24937d480f6fde4f1",
            "shortName": "European Court of Justice",
            "name": "European Court of Justice"
          }
        ],
        "fieldsOfLaw": [
          {
            "id": "6c1022289490f6fca4adcf0e082d2524",
            "parentId": null,
            "shortName": "European data protection law",
            "name": "European data protection law"
          }
        ],
        "documentTypes": [
          {
            "id": "04b42e5bf858a66de2229227deaa21e3",
            "parentId": null,
            "shortName": "Decisions",
            "name": "Decisions"
          }
        ],
        "language": "EN",
        "dataSource": 0,
        "referenced": 165,
        "literatureReferenced": 103,
        "score": 24.674826,
        "sourceUrl": "https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:62018CJ0311",
        "inForce": null
      }
    ],
    "facets": null
  },
  "success": true,
  "error": null
}

Errors

400Invalid filter value or page out of range
401Missing or invalid API key
403Forbidden by role or jurisdiction scope
422Request validation error
429Monthly quota exhausted. Sent by the API gateway; the body is {"statusCode": 429, "message": "..."}.
500Internal server error
esc
↑↓ navigateenter openesc close