Search
Six search endpoints over the same corpus: keyword, semantic, hybrid, their reranked variants, and citation-graph reference search.
Keyword Search
Parameters
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: "data protection" finds results containing both data and protection anywhere in the text, while double-quoting a phrase (e.g. ""data protection"") matches the exact phrase where the words appear next to each other. Ensure when using quotes in the query to escape the quotes with a backslash. Use '*' for wildcard search.
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.
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.
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.
Example request
curl -X POST "https://api.moonlit.ai/v1.1/search/keyword_search" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_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"
}'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",
"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
Parameters
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.
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.
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 "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_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": []
}'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",
"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
Parameters
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.
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.
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 "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_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": []
}'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",
"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
Parameters
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.
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.
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 "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_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": []
}'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",
"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",
"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
Parameters
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.
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.
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 "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_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": []
}'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",
"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",
"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
Parameters
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.
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.
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 facet values when facets is enabled.
Example request
curl -X POST "https://api.moonlit.ai/v1.1/search/reference_search" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_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": []
}'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",
"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
}