Back to use cases

Infrastructure

Legal Data Infrastructure for AI Products

Skip 12+ months of scraping, parsing, and indexing. Use the Moonlit API as the complete legal knowledge layer for your product.

Built by: Legal AI startups, platform builders, enterprise product teams

PlatformB2BData LayerFull API

The problem

Building a legal AI product means solving two problems at once: the AI layer and the data layer. The data layer is deceptively hard.

You need to ingest documents from dozens of official sources across 30 jurisdictions, parse wildly inconsistent formats, build and maintain search indices with semantic embeddings, map documents to structured taxonomies, track citation networks, and keep everything updated daily.

Most teams underestimate this work by a factor of ten. What looks like a three-month project becomes a twelve-month infrastructure investment that pulls engineering resources away from your actual product.

How the API powers it

The Moonlit API gives you the entire data layer out of the box: 13M+ documents from 30 jurisdictions.

Six search modes cover every retrieval pattern: keyword with Boolean operators and sorting by relevance, date, or citation count; semantic for cross-lingual, meaning-based retrieval; hybrid combining keyword and semantic via Reciprocal Rank Fusion with a tunable semantic weight; reranked variants of semantic and hybrid for maximum precision; and citation search for traversing the citation network.

Five filter endpoints provide hierarchical taxonomies for jurisdictions, document types, fields of law, sources such as courts and legislative bodies, and semantic-enabled portals.

Full document retrieval returns plain text, HTML, structured metadata, citation counts, in-force status, and AI-generated summaries. Article-level citation traversal via the reference search and articles endpoints. A streaming AI research assistant via the Luna API with session management, jurisdiction scoping, and inline source citations.

In production today

This is not theoretical. Saga, the legal AI platform serving enterprise law firms across ten European countries, integrates the Moonlit API as its legal knowledge backbone for RAG-based research, case analysis, and jurisdiction-specific workflows.

Legal Mind, the Amsterdam-based AI platform used by 50+ Dutch law firms, recently integrated Moonlit to power its legal research module, combining structured case law and legislation data with its own document analysis and drafting capabilities.

Moonlit's own research platform, trusted by the Dutch Supreme Court, Deloitte, KPMG, the Dutch Central Bank, and the Public Prosecutor, runs on these exact same endpoints. Every search, every document retrieval, every Luna conversation on moonlit.ai uses the same API you integrate with.

Key endpoints

Example request

curl -X POST "https://api.moonlit.ai/v1.1/search/hybrid_search_reranked" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "employer liability for AI-driven hiring decisions under EU anti-discrimination law",
    "jurisdictions": ["European Union", "Netherlands", "Germany"],
    "semantic_weight": 0.7,
    "num_results": 10,
    "rerankerType": 1
  }'

Saga, Legal Mind, and Moonlit's own research platform run on these same endpoints in production today.

Ready to build?

Talk to our team about getting API access.

Get in touch