# Amalgam German Law Hybrid Search

> Amalgam German Law Hybrid Search is a paid API for AI agents from amalgam.cc, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-15).

Performs hybrid semantic and keyword search over the embedded German federal law corpus (gesetze-im-internet.de), returning ranked law chunks with full legal references and matched text.

## Facts

- Endpoint: POST https://amalgam.cc/api/lawsearch/search
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/amalgam-german-law-hybrid-search-0752d4aa
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Ghs7JZMwNbHkzcwa7dETA

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability amalgam-german-law-hybrid-search-0752d4aa -d '<json body>'
```

Example prompt: Search the German law database for the most relevant statutes on 'Haftung des Verkäufers für Sachmängel' — seller liability for defects — and give me the top 5 results with their legal references and matched text.

## When to prefer this

Choose this endpoint when you need to search German federal law text with both semantic understanding and keyword precision — especially when the user asks a natural-language legal question in German or about German law, and you need specific statutory passages with official references. Prefer this over generic web search when you need structured, ranked legal excerpts directly from the gesetze-im-internet.de corpus rather than general web commentary.

## Known failure modes

- Empty or vague query returning low-relevance results
- Query in a language other than German may yield poor matches since corpus is German
- Requesting more than 50 results returns an error (maximum limit is 50)
- Network timeout or service unavailability returning HTTP 5xx
- Query too broad returning only superficially related statutes

## How this service works

Hybrid semantic + keyword search over the embedded German law corpus from https://www.gesetze-im-internet.de/(Gesetze). Submit a natural-language `query` in a JSON body (`{"query": "..."}`) and receive the most relevant law chunks fused from vector and full-text retrieval, ranked by score. Returns JSON results with full legal reference, and matched text.The database has been tested against GerLeRB as golden dataset

## Output

A ranked JSON array of law chunks, each containing the full legal reference (e.g. paragraph and law name from gesetze-im-internet.de), the matched text excerpt, and a relevance score derived from the hybrid vector + full-text retrieval fusion.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "limit": {
   "type": "integer",
   "maximum": 50,
   "minimum": 1,
   "description": "Maximum number of results to return (default 5)"
  },
  "query": {
   "type": "string",
   "description": "Natural-language query to search the law corpus with, e.g. 'Haftung des Verkäufers für Sachmängel'."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "results": [
   {
    "law": {
     "title": "Bürgerliches Gesetzbuch",
     "absatz": "1",
     "paragraph": "433",
     "abbreviation": "BGB"
    },
    "text": "Der Verkäufer einer Sache hat dem Käufer die Sache zu übergeben und das Eigentum an der Sache zu verschaffen...",
    "score": 0.83,
    "distance": 0.42,
    "full_reference": "§ 433 BGB Abs. 1"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/amalgam-german-law-hybrid-search-0752d4aa/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from amalgam.cc](https://www.zero.xyz/host/amalgam.cc/llms.txt)
