Filters
Canonical filter values for scoping searches: jurisdictions and portals, document types, fields of law, sources, and semantic-capable portals.
List Document Types
Parameters
No parameters.
Example request
curl "https://api.moonlit.ai/v1.1/search/filters/documenttypes" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY"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": "Laws and regulations",
"id": "18fead608f1a4dcb5671b9fc8aeab4d1",
"children": [
{
"name": "National law",
"id": "fbee5d2e827c7307c755601603c91bc3",
"children": []
}
]
}
]
}Errors
List Jurisdictions and Portals
Parameters
No parameters.
Example request
curl "https://api.moonlit.ai/v1.1/search/filters/jurisdictions_portals" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY"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.
idinteger | nullCanonical numeric DataSource ID. Populated only when the caller passes the internal return_integers flag.
The response is a JSON array; each item has the fields below.
[
{
"name": "European Union",
"count": 1069270,
"portals": [
{
"name": "eur-lex.europa.eu",
"value": "0|eur-lex.europa.eu",
"count": 806813
}
]
},
{
"name": "Netherlands",
"count": 3474823,
"portals": [
{
"name": "rechtspraak.nl",
"value": "1|rechtspraak.nl",
"count": 2971766
},
{
"name": "wetten.overheid.nl",
"value": "1|wetten.overheid.nl",
"count": 173618
}
]
}
]Errors
List Fields-of-Law Tree
Parameters
No parameters.
Example request
curl "https://api.moonlit.ai/v1.1/search/filters/trees" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY"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
Errors
List Sources
Parameters
jurisdictionsstring | nullComma-separated jurisdiction names from /v1.1/search/filters/jurisdictions_portals.
portalsstring | nullComma-separated portal values from /v1.1/search/filters/jurisdictions_portals.
Example request
curl "https://api.moonlit.ai/v1.1/search/filters/sources" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY"Response
Successful Response
Sourcesobject[]Hierarchical tree of sources.
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.
countintegerNumber of indexed documents for this source.
childrenobject[] | nullNested child sources.
array of the same shape
parentIdstring | nullIdentifier of the parent source.
Errors
List Semantic Portals
Parameters
No parameters.
Example request
curl "https://api.moonlit.ai/v1.1/search/semantic_portals" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY"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": "eur-lex.europa.eu",
"value": "0|eur-lex.europa.eu"
},
{
"name": "wetten.overheid.nl",
"value": "1|wetten.overheid.nl"
}
]