Filters
The valid values for scoping a search: jurisdictions and portals, document types, fields of law, sources, and the portals that support semantic search.
List Document Types
/v1.1/search/filters/documenttypesParameters
No parameters.
Example request
curl "https://api.moonlit.ai/v1.1/search/filters/documenttypes" \
-H "Authorization: Bearer YOUR_API_KEY"Try it
/v1.1/search/filters/documenttypesNot 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.
This endpoint takes no parameters.
Response
Hierarchical document type tree
DocumentTypesobject[]Hierarchical document type tree used by search filters.
namestringDocument type label.
idstringDocument type ID.
childrenobject[] | nullNested child document types.
array of the same shape
{
"DocumentTypes": [
{
"name": "Decisions",
"id": "04b42e5bf858a66de2229227deaa21e3",
"children": [
{
"name": "Administrative decisions",
"id": "83a776c0ba12085b1ae0e4746f2431bb",
"children": [
{
"name": "EU non-oppositions",
"id": "1668e5fefd023e0b86f8a78003ef6610",
"children": []
}
]
},
{
"name": "Court opinions",
"id": "b206a2c82a8b283f8f0447fbb0056147",
"children": null
}
]
},
{
"name": "Laws and regulations",
"id": "18fead608f1a4dcb5671b9fc8aeab4d1",
"children": [
{
"name": "International law",
"id": "0f05c03284094170df645022c68f1c57",
"children": [
{
"name": "UN resolutions",
"id": "8b1d9fdce6cf2be3858998f11ce9e8dc",
"children": []
},
{
"name": "International treaties",
"id": "998ce8d2b629ca0089424acd748edca0",
"children": null
}
]
},
{
"name": "European law",
"id": "87a86c141d2c0649a699745ba63e4c6b",
"children": [
{
"name": "EFTA legislation",
"id": "164cf7b646522b084180dd16dd8008aa",
"children": []
},
{
"name": "EU soft law",
"id": "345f07678be9506949bbbc18c9e32452",
"children": []
}
]
}
]
}
]
}Errors
List Jurisdictions and Portals
/v1.1/search/filters/jurisdictions_portalsParameters
No parameters.
Example request
curl "https://api.moonlit.ai/v1.1/search/filters/jurisdictions_portals" \
-H "Authorization: Bearer YOUR_API_KEY"Try it
/v1.1/search/filters/jurisdictions_portalsNot 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.
This endpoint takes no parameters.
Response
Jurisdictions with their portals
namestringJurisdiction name.
countintegerNumber of indexed documents in this jurisdiction.
portalsobject[]Portals available under this jurisdiction.
namestringPortal hostname.
valuestringCanonical portal filter value to use in search requests.
countintegerNumber of indexed documents for this portal.
articles_supportedbooleanTrue when this portal contains composite documents (laws/regulations), so `GET /v1.1/document/articles` returns article/section trees for it.
The response is a JSON array; each item has the fields below.
[
{
"name": "United States",
"count": 9346572,
"portals": [
{
"name": "courtlistener.com",
"value": "3|courtlistener.com",
"count": 9346572,
"articles_supported": false
}
]
},
{
"name": "Brazil",
"count": 4621087,
"portals": [
{
"name": "processo.stj.jus.br",
"value": "30|processo.stj.jus.br",
"count": 3491909,
"articles_supported": false
},
{
"name": "jurisprudencia.stf.jus.br",
"value": "30|jurisprudencia.stf.jus.br",
"count": 1129119,
"articles_supported": false
}
]
}
]Errors
List Fields-of-Law Tree
/v1.1/search/filters/treesParameters
No parameters.
Example request
curl "https://api.moonlit.ai/v1.1/search/filters/trees" \
-H "Authorization: Bearer YOUR_API_KEY"Try it
/v1.1/search/filters/treesNot 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.
This endpoint takes no parameters.
Response
Successful Response
FieldsOfLawobject[]Hierarchical tree of fields of law.
namestringField-of-law label.
idstringField-of-law identifier.
childrenobject[] | nullNested child fields.
namestringNode label.
idstringNode identifier.
childrenobject[] | nullNested child nodes.
array of the same shape
{
"FieldsOfLaw": [
{
"name": "Military law",
"id": "03f4701545db142e4e98f26e5048a9e0",
"children": [
{
"name": "Military criminal law",
"id": "32f78e44dc8f64c43d9d3ec01d8de8a6",
"children": null
},
{
"name": "Military civil service law",
"id": "42aba076e70150f67716027b89f4f9dc",
"children": null
}
]
},
{
"name": "Disciplinary law",
"id": "2ade93468785dbc172e8b29414a5b287",
"children": [
{
"name": "Discipline architecture and civil engineering",
"id": "2be4c22f0152ee75aa724e01dcb2b599",
"children": null
},
{
"name": "Discipline legal profession",
"id": "6b561482c8b17c664ef95d56cff9df7b",
"children": null
}
]
}
]
}Errors
List Sources
/v1.1/search/filters/sourcesParameters
jurisdictionsstring | nullComma-separated jurisdiction names from /v1.1/search/filters/jurisdictions_portals.
portalsstring | nullComma-separated portal values from /v1.1/search/filters/jurisdictions_portals.
document_typesstring | nullComma-separated document type IDs from /v1.1/search/filters/documenttypes. Source counts reflect only documents of these types.
searchstring | nullCase- and accent-insensitive substring match on source name. Matching sources are returned with their full subtree; ancestors of matches are kept.
limitinteger | nullMaximum number of sources kept under each top-level category, ranked by document count. Omit for the full tree. Ignored when `complete=true`.
completebooleandefault: falseReturn every source in scope instead of the top `limit`. Requires `jurisdictions` or `portals`; the unscoped list has ~16k sources.
Example request
curl "https://api.moonlit.ai/v1.1/search/filters/sources" \
-H "Authorization: Bearer YOUR_API_KEY"Try it
/v1.1/search/filters/sourcesNot 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
Successful Response
Sourcesobject[]Hierarchical tree of sources, highest document counts first.
namestringFull name of the source.
valuestringSource identifier. Use this value in the `sources` array of keyword or semantic search requests to filter by this source.
parentIdstring | nullIdentifier of the parent source.
countintegerNumber of indexed documents for this source.
otherCountinteger | nullNumber of child sources omitted from this node because of the limit.
childrenobject[] | nullNested child sources.
array of the same shape
totalintegerNumber of source nodes in scope before the limit was applied (capped at 4,000 unless complete=true).
truncatedbooleanTrue when the limit dropped at least one source node or the list hit the 4,000 cap.
{
"Sources": [
{
"name": "Supreme courts",
"value": "047dacae3fdd623c892559002aaf438a",
"parentId": null,
"count": 10904184,
"otherCount": 0,
"children": [
{
"name": "Superior Tribunal de Justiça",
"value": "3655d7790dd35d8b2e2fbdf13408537c",
"parentId": "047dacae3fdd623c892559002aaf438a",
"count": 2378611,
"otherCount": null,
"children": null
},
{
"name": "Cour de cassation de France",
"value": "7d3024243e7478afc63044193c04a13d",
"parentId": "047dacae3fdd623c892559002aaf438a",
"count": 988485,
"otherCount": null,
"children": null
}
]
},
{
"name": "District and lower courts",
"value": "c8cf63899b78e2d4336c0cdcb8204c14",
"parentId": null,
"count": 5758003,
"otherCount": 0,
"children": [
{
"name": "Wojewódzki Sąd Administracyjny w Warszawie",
"value": "45c6d7df5a2f124750813dec1b92376b",
"parentId": "c8cf63899b78e2d4336c0cdcb8204c14",
"count": 443792,
"otherCount": null,
"children": null
},
{
"name": "Općinski građanski sud u Zagrebu",
"value": "ac5b2d0b37ec79e8563389e0ccc0150a",
"parentId": "c8cf63899b78e2d4336c0cdcb8204c14",
"count": 127782,
"otherCount": null,
"children": null
}
]
}
],
"total": 4000,
"truncated": true
}Errors
List Semantic Portals
/v1.1/search/semantic_portalsParameters
No parameters.
Example request
curl "https://api.moonlit.ai/v1.1/search/semantic_portals" \
-H "Authorization: Bearer YOUR_API_KEY"Try it
/v1.1/search/semantic_portalsNot 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.
This endpoint takes no parameters.
Response
Portals enabled for semantic search
namestringPortal hostname.
valuestringDataSource|Portal composite key for filtering.
The response is a JSON array; each item has the fields below.
[
{
"name": "circabc.europa.eu",
"value": "0|circabc.europa.eu"
},
{
"name": "competition-cases.ec.europa.eu",
"value": "0|competition-cases.ec.europa.eu"
}
]