API reference

Every endpoint of the Moonlit Data API, generated from the live OpenAPI spec. Each endpoint page has a Try it panel that runs the request with your subscription key.

https://api.moonlit.ai/v1.1

Every path below is relative to this base URL. Send your subscription key in the Ocp-Apim-Subscription-Key header on every request. Our team provisions the key; see Get access.

curl -X POST "https://api.moonlit.ai/v1.1/search/keyword_search" \
  -H "Content-Type: application/json" \
  -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
  -d '{"query": "huurrecht opzegging", "jurisdictions": ["Netherlands"]}'
Keep the key out of client-side code and public repositories. If it leaks, email support@moonlit.ai and we rotate it.

Search

Search by keyword, by meaning, or through the citation graph.

Filters

The valid values for scoping a search.

Documents

Full documents and their article-level structure.

EndpointSearches byUse it when
hybrid_searchKeyword and meaning, mergedYou have a question in plain language. The default.
keyword_searchExact terms, Boolean operators, wildcardsYou know the wording, the citation or the article number, or you need date or citation sorting.
hybrid_search_rerankedHybrid, then a reranking passPrecision matters more than latency.
semantic_searchMeaning onlyYou want concepts and the wording is unknown.
semantic_search_rerankedMeaning, then a reranking passConcept discovery with higher precision, slower.
reference_searchThe citation graphYou want the documents that cite a document, or the ones it cites.
Start with hybrid_search. Switch to keyword_search for exact terms, and add reranking when precision matters more than speed.

Try it

Each endpoint page carries a Try it panel. Paste your subscription key once; it stays in the browser tab and is sent only to api.moonlit.ai. Edit the prefilled request, send it, and read the live response next to the documentation. Calls made this way count like any other call.

Errors

A failed request returns a JSON body with a detail field that says what went wrong:

{
  "detail": "Invalid or missing API key."
}
StatusMeaning
400Invalid filter value, or page out of range.
401Missing or invalid subscription key.
403Your subscription does not cover this endpoint or jurisdiction.
422Request validation error. The detail field is an array with one entry per invalid field.
429Monthly quota exhausted. Sent by the API gateway, so the body reads {"statusCode": 429, "message": "..."} instead of detail.
500Internal server error.
504Search timed out. Only the hybrid and reranked search endpoints return it.

The errors each endpoint can return are listed on its page.

esc
↑↓ navigateenter openesc close