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 API key.
https://api.moonlit.ai/v1.1Every path below is relative to this base URL. Send your API key as a Bearer token in the Authorization header on every request. Keys are managed under My organization, Data API; see API keys. Keys in the United States region use https://us.api.moonlit.ai/v1.1; see Regions.
curl -X POST "https://api.moonlit.ai/v1.1/search/keyword_search" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"query": "huurrecht opzegging", "jurisdictions": ["Netherlands"]}'Existing integrations that send the key in the Ocp-Apim-Subscription-Key header keep working.
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.
Which search
| Endpoint | Searches by | Use it when |
|---|---|---|
| hybrid_search | Keyword and meaning, merged | You have a question in plain language. The default. |
| keyword_search | Exact terms, Boolean operators, wildcards | You know the wording, the citation or the article number, or you need date or citation sorting. |
| hybrid_search_reranked | Hybrid, then a reranking pass | Precision matters more than latency. |
| semantic_search | Meaning only | You want concepts and the wording is unknown. |
| semantic_search_reranked | Meaning, then a reranking pass | Concept discovery with higher precision, slower. |
| reference_search | The citation graph | You want the documents that cite a document, or the ones it cites. |
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 API 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."
}| Status | Meaning |
|---|---|
400 | Invalid filter value, or page out of range. |
401 | Missing or invalid API key. |
403 | Your subscription does not cover this endpoint or jurisdiction. |
422 | Request validation error. The detail field is an array with one entry per invalid field. |
429 | Monthly quota exhausted. Sent by the API gateway, so the body reads {"statusCode": 429, "message": "..."} instead of detail. |
500 | Internal server error. |
504 | Search timed out. Only the hybrid and reranked search endpoints return it. |
The errors each endpoint can return are listed on its page.