Search
Six search endpoints over the same documents: keyword, semantic, hybrid, their reranked variants, and reference search through the citation graph.
Keyword Search
/v1.1/search/keyword_searchParameters
querystringrequiredKeyword 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).
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.
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.
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.
from_datestring | nullInclusive lower date bound (YYYY-MM-DD). Requires until_date when set.
until_datestring | nullInclusive upper date bound (YYYY-MM-DD). Requires from_date when set.
date_fieldstringWhich 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.
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.
reference_identifierstring | nullDocument identifier to find references for. When set, results are restricted to documents that reference or are referenced by this document (depending on reference_direction).
reference_directioninteger | nullDirection 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.
article_reference_idstring | nullArticle-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[] | nullKeep 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.
reference_familiesstring[] | nullKeep 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.
sort_typeinteger0 = relevance (default), 1 = newest first, 2 = oldest first, 3 = most cited.
pageintegerdefault: 1Page number, starting from 1. Determines which slice of results to return. The server computes the internal offset as (page − 1) × num_results.
num_resultsintegerdefault: 10Maximum number of documents to return per page. Must be between 1 and 100.
facetsbooleandefault: falseWhether to include facets in the response. Facets are aggregations of the search results.
all_facetsbooleandefault: falseWhen 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 | nullMaximum 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.
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
/v1.1/search/keyword_searchNot run yetThe 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
resultobjectSearch result payload.
successbooleanWhether upstream query succeeded.
errorany | nullUpstream 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
Semantic Search
/v1.1/search/semantic_searchParameters
querystringrequiredNatural-language semantic query text.
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.
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.
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.
from_datestring | nullInclusive lower date bound (YYYY-MM-DD). Requires until_date when set.
until_datestring | nullInclusive upper date bound (YYYY-MM-DD). Requires from_date when set.
date_fieldstringWhich 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.
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.
reference_identifierstring | nullDocument identifier to find references for. When set, results are restricted to documents that reference or are referenced by this document (depending on reference_direction).
reference_directioninteger | nullDirection 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.
article_reference_idstring | nullArticle-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[] | nullKeep 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.
reference_familiesstring[] | nullKeep 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.
pageintegerdefault: 11-based result page.
num_resultsintegerdefault: 20Results per page.
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
/v1.1/search/semantic_searchNot run yetThe 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
resultobjectSearch result payload.
successbooleanWhether upstream query succeeded.
errorany | nullUpstream 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
Semantic Search with Reranking
/v1.1/search/semantic_search_rerankedParameters
querystringrequiredNatural-language semantic query text.
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.
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.
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.
from_datestring | nullInclusive lower date bound (YYYY-MM-DD). Requires until_date when set.
until_datestring | nullInclusive upper date bound (YYYY-MM-DD). Requires from_date when set.
date_fieldstringWhich 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.
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.
reference_identifierstring | nullDocument identifier to find references for. When set, results are restricted to documents that reference or are referenced by this document (depending on reference_direction).
reference_directioninteger | nullDirection 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.
article_reference_idstring | nullArticle-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[] | nullKeep 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.
reference_familiesstring[] | nullKeep 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.
pageintegerdefault: 11-based result page.
num_resultsintegerdefault: 20Results per page.
rerankerTypeinteger1 = GoogleVertexAiRerank (default).
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
/v1.1/search/semantic_search_rerankedNot run yetThe 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
resultobjectSearch result payload.
successbooleanWhether upstream query succeeded.
errorany | nullUpstream 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
Hybrid Search
/v1.1/search/hybrid_searchParameters
querystringrequiredNatural-language query. The system extracts keyword terms automatically and runs both keyword and semantic searches in parallel, fusing the results.
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.
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.
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.
from_datestring | nullInclusive lower date bound (YYYY-MM-DD). Requires until_date when set.
until_datestring | nullInclusive upper date bound (YYYY-MM-DD). Requires from_date when set.
date_fieldstringWhich 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.
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.
reference_identifierstring | nullDocument identifier to find references for. When set, results are restricted to documents that reference or are referenced by this document (depending on reference_direction).
reference_directioninteger | nullDirection 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.
article_reference_idstring | nullArticle-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[] | nullKeep 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.
reference_familiesstring[] | nullKeep 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.
pageintegerdefault: 11-based result page.
num_resultsintegerdefault: 10Results per page.
semantic_weightnumberdefault: 0.6Weight for semantic search results in RRF fusion (0.0–1.0). Keyword weight is inferred as 1 − semantic_weight.
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
/v1.1/search/hybrid_searchNot run yetThe 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
resultobjectSearch result payload.
successbooleanWhether upstream query succeeded.
errorany | nullUpstream 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
Hybrid Search with Reranking
/v1.1/search/hybrid_search_rerankedParameters
querystringrequiredNatural-language query. The system extracts keyword terms automatically and runs both keyword and semantic searches in parallel, fusing the results.
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.
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.
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.
from_datestring | nullInclusive lower date bound (YYYY-MM-DD). Requires until_date when set.
until_datestring | nullInclusive upper date bound (YYYY-MM-DD). Requires from_date when set.
date_fieldstringWhich 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.
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.
reference_identifierstring | nullDocument identifier to find references for. When set, results are restricted to documents that reference or are referenced by this document (depending on reference_direction).
reference_directioninteger | nullDirection 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.
article_reference_idstring | nullArticle-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[] | nullKeep 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.
reference_familiesstring[] | nullKeep 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.
pageintegerdefault: 11-based result page.
num_resultsintegerdefault: 10Results per page.
semantic_weightnumberdefault: 0.6Weight for semantic search results in RRF fusion (0.0–1.0). Keyword weight is inferred as 1 − semantic_weight.
rerankerTypeinteger1 = GoogleVertexAiRerank (default).
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
/v1.1/search/hybrid_search_rerankedNot run yetThe 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
resultobjectSearch result payload.
successbooleanWhether upstream query succeeded.
errorany | nullUpstream 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
Reference Search
/v1.1/search/reference_searchParameters
reference_identifierstringrequiredDocument identifier to find references for.
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.
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.
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.
from_datestring | nullInclusive lower date bound (YYYY-MM-DD). Requires until_date when set.
until_datestring | nullInclusive upper date bound (YYYY-MM-DD). Requires from_date when set.
date_fieldstringWhich 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.
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.
reference_directionintegerarticle_reference_idstring | nullArticle-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[] | nullKeep 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.
reference_familiesstring[] | nullKeep 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.
querystringdefault: *Optional keyword query to apply on top of the reference filter. Defaults to '*' (all matching references).
sort_typeinteger0 = relevance (default), 1 = newest first, 2 = oldest first, 3 = most cited.
pageintegerdefault: 11-based result page.
num_resultsintegerdefault: 10Results per page.
facetsbooleandefault: falseWhether to include facets in the response.
all_facetsbooleandefault: falseInclude zero-count FieldsOfLaw and DocumentTypes values when facets is enabled.
facet_limitinteger | nullMaximum number of sources kept under each top-level category in the Sources facet, ranked by document count. Omit for the full tree.
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
/v1.1/search/reference_searchNot run yetThe 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
resultobjectSearch result payload.
successbooleanWhether upstream query succeeded.
errorany | nullUpstream 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
}