Filters

Canonical filter values for scoping searches: jurisdictions and portals, document types, fields of law, sources, and semantic-capable portals.

List Document Types

GET/v1.1/search/filters/documenttypesOpen in Swagger
Returns document type IDs structured as a hierarchical tree with nested child categories for filtering search endpoints.

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.

namestring

Document type label.

idstring

Document type ID.

childrenobject[] | null

Nested 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

400Invalid filter value or page out of range
401Missing or invalid API key
403Forbidden by role or jurisdiction scope
422Request validation error
500Internal server error

List Jurisdictions and Portals

GET/v1.1/search/filters/jurisdictions_portalsOpen in Swagger
Returns jurisdiction names and their portals. Use each portal's `value` field as the canonical `portals` filter input for search endpoints.

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

namestring

Jurisdiction name.

countinteger

Number of indexed documents in this jurisdiction.

portalsobject[]

Portals available under this jurisdiction.

namestring

Portal hostname.

valuestring

Canonical portal filter value to use in search requests.

countinteger

Number of indexed documents for this portal.

idinteger | null

Canonical 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

400Invalid filter value or page out of range
401Missing or invalid API key
403Forbidden by role or jurisdiction scope
422Request validation error
500Internal server error

List Fields-of-Law Tree

GET/v1.1/search/filters/treesOpen in Swagger
Returns hierarchical fields-of-law for use in search filters.

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.

namestring

Field-of-law label.

idstring

Field-of-law identifier.

childrenobject[] | null

Nested child fields.

namestring

Node label.

idstring

Node identifier.

childrenobject[] | null

Nested child nodes.

array of the same shape

Errors

400Invalid filter value or page out of range
401Missing or invalid API key
403Forbidden by role or jurisdiction scope
422Request validation error
500Internal server error

List Sources

GET/v1.1/search/filters/sourcesOpen in Swagger
Returns the hierarchical list of sources available for filtering search endpoints. Sources are issuing entities such as Supreme Courts, Courts of Appeal, and Legislative bodies. Each item contains a `value` field — pass that value in the `sources` array of keyword or semantic search requests to filter results by source. Optionally narrow the returned sources by providing `jurisdictions` and/or `portals` as query parameters.

Parameters

jurisdictionsstring | null

Comma-separated jurisdiction names from /v1.1/search/filters/jurisdictions_portals.

e.g. Netherlands,Belgium
portalsstring | null

Comma-separated portal values from /v1.1/search/filters/jurisdictions_portals.

e.g. 0|eur-lex.europa.eu,1|rechtspraak.nl

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.

namestring

Full name of the source.

valuestring

Source identifier. Use this value in the `sources` array of keyword or semantic search requests to filter by this source.

countinteger

Number of indexed documents for this source.

childrenobject[] | null

Nested child sources.

array of the same shape

parentIdstring | null

Identifier of the parent source.

Errors

400Invalid filter value or page out of range
401Missing or invalid API key
403Forbidden by role or jurisdiction scope
422Request validation error
500Internal server error

List Semantic Portals

GET/v1.1/search/semantic_portalsOpen in Swagger
Returns the list of portals currently enabled as semantic-search sources.

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

namestring

Portal hostname.

valuestring

DataSource|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"
  }
]

Errors

400Invalid filter value or page out of range
401Missing or invalid API key
403Forbidden by role or jurisdiction scope
422Request validation error
500Internal server error
esc
↑↓ navigateenter openesc close