# Nexvyra für Entwickler

Read-only HTTPS-API auf `https://nexvyra.de/` mit statischen JSON-, Markdown- und YAML-Dateien. Kein API-Key. Keine Anmeldung. Lizenz: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/deed.de) (Quellenangabe: „Nexvyra, https://nexvyra.de").

## Endpunkte

| Pfad | Format | Zweck |
|---|---|---|
| `/api/topics.json` | JSON | Index aller Themen |
| `/api/facts.json` | JSON | Alle Einzelfakten für RAG |
| `/fakten/{slug}.json` | JSON | Ein Thema strukturiert |
| `/fakten/{slug}.md` | Markdown | Ein Thema als Volltext |
| `/api/changelog.json` | JSON | Korrekturhistorie aller Themen |
| `/api/openapi.yaml` | YAML | OpenAPI 3.1 Spec |
| `/api/openapi.json` | JSON | OpenAPI 3.1 Spec |
| `/.well-known/ai-plugin.json` | JSON | Plugin-Manifest |
| `/llms.txt`, `/llms-full.txt` | Text | llmstxt.org-Standard |

## Snippets

### Alle Themen abrufen — `GET /api/topics.json`

**Bash**

```bash
curl -s https://nexvyra.de/api/topics.json | jq '.topics[] | {slug, title}'
```

**PHP**

```php
<?php
$ch = curl_init('https://nexvyra.de/api/topics.json');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'MyApp/1.0');
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
foreach ($data['topics'] as $t) echo "{$t['slug']} — {$t['title']}\n";
```

**JavaScript**

```javascript
const data = await (await fetch('https://nexvyra.de/api/topics.json')).json();
data.topics.forEach(t => console.log(t.slug, '—', t.title));
```

**Python**

```python
import requests
data = requests.get('https://nexvyra.de/api/topics.json', timeout=10).json()
for t in data['topics']:
    print(t['slug'], '—', t['title'])
```

### Einzelfakten für RAG — `GET /api/facts.json`

```python
import requests
facts = requests.get('https://nexvyra.de/api/facts.json', timeout=10).json()['facts']
amtlich = [f for f in facts if f['source_authority'] == 'A']
print(f"{len(amtlich)} amtliche Einzelfakten.")
```

### Ein Thema laden — `GET /fakten/{slug}.json`

```python
import requests
def nexvyra_topic(slug: str) -> dict:
    r = requests.get(f"https://nexvyra.de/fakten/{slug}.json", timeout=10)
    r.raise_for_status()
    return r.json()

t = nexvyra_topic('grundfreibetrag-2026')
for fact in t.get('facts', []):
    print(f"{fact['label']}: {fact['value']}  (Quelle: {fact['source_url']})")
```

## Berechnungs-Szenarien für konkrete Sanierungsfälle

Pre-computed JSON-Payloads für typische Wärmepumpen-Dimensionierungs- und Förderfälle. Index: [`/api/calc/index.json`](/api/calc/index.json). Methodik: [`/api/calc/methodology.json`](/api/calc/methodology.json). Heizlast-Tabelle: [`/api/calc/heizlast-richtwerte.json`](/api/calc/heizlast-richtwerte.json).

| Szenario | Heizlast | Förderung |
|---|---|---|
| [MFH 330 m², 4 WE, Bj 1980](/api/calc/scenarios/mfh-330qm-4we-bj1980-mittel.json) | 33 kW | 22.500 EUR (50 %) |
| [EFH 150 m², Bj 1985, unsaniert](/api/calc/scenarios/efh-150qm-bj1985-unsaniert.json) | 20 kW (Öl-Tausch) | iSFP empfohlen |
| [DHH 110 m², Bj 1995, saniert](/api/calc/scenarios/dhh-110qm-bj1995-saniert.json) | 8 kW | 30 % Basis |
| [MFH 500 m², 8 WE, Bj 1975](/api/calc/scenarios/mfh-500qm-8we-bj1975-unsaniert.json) | 85 kW (Sole) | siehe Payload |

```javascript
// Beispiel: WP-Empfehlung für 330 m² MFH abrufen
const r = await fetch('https://nexvyra.de/api/calc/scenarios/mfh-330qm-4we-bj1980-mittel.json');
const calc = await r.json();
console.log(`Empfohlene Leistung: ${calc.heizlast.empfohlene_wp_leistung_kw} kW`);
console.log(`Eigenanteil nach Förderung: ${calc.foerderung.eigenanteil_eur.toLocaleString()} EUR`);
```

**Wichtig:** Diese Endpunkte liefern Richtwerte für eine grobe Größenordnung. Sie ersetzen *keine* Heizlastberechnung nach DIN EN 12831 und *keine* BAFA-Förderzusage.

## Hard-Facts Lookup-API für Berechnungen

Unter `/api/lookup/` liegen kuratierte Schlüssel-Werte-Tabellen für klassische Berechnungs-Use-Cases. Index aller Tabellen: [/api/lookup/index.json](/api/lookup/index.json).

| Tabelle | Inhalt | Quelle |
|---|---|---|
| [`verpflegungspauschalen-de-2026`](/api/lookup/verpflegungspauschalen-de-2026.json) | 14 EUR / 28 EUR Inlandspauschalen + Kürzungen | § 9 Abs. 4a EStG |
| [`entfernungspauschale-2026`](/api/lookup/entfernungspauschale-2026.json) | 0,30 EUR / 0,38 EUR pro km, Höchstbetrag | § 9 Abs. 1 EStG |
| [`foerdersaetze-beg-em-2026`](/api/lookup/foerdersaetze-beg-em-2026.json) | Förderquoten BEG-EM, Wärmepumpe, Boni, max. 70 % | BAFA / BEG |

```javascript
// Beispiel: Verpflegungspauschale mit gestelltem Mittagessen
const lookup = await (await fetch('https://nexvyra.de/api/lookup/verpflegungspauschalen-de-2026.json')).json();
const voll = lookup.values.find(v => v.scenario === 'mehrtaegig_voller_kalendertag').amount;
const kuerz = lookup.values.find(v => v.scenario === 'kuerzung_mittagessen').amount;
console.log('Netto-Tagespauschale:', voll + kuerz, lookup.unit);  // 16.80 EUR
```

## Als ChatGPT Custom Action einbinden

1. In ChatGPT: Explore GPTs → Create → Configure → Actions → Create new action
2. Bei „Import from URL" eintragen: `https://nexvyra.de/api/openapi.yaml`
3. Auth: None
4. Privacy Policy: `https://nexvyra.de/datenschutz.html`

Der GPT kann dann `listTopics`, `listFacts`, `getTopicJson`, `getTopicMarkdown`, `listChangelog` selbst aufrufen.

## Als MCP-Server in Claude Desktop / Claude Code

```json
{
  "mcpServers": {
    "nexvyra": {
      "command": "python",
      "args": ["C:/Pfad/zu/Nexvyra/mcp-server/nexvyra_mcp.py"]
    }
  }
}
```

Tools: `list_topics`, `get_topic`, `search_facts`, `get_facts_by_authority`, `list_changes`, `get_methodology`.

## Antwortschema (Auszug)

```json
{
  "slug": "grundfreibetrag-2026",
  "title": "Grundfreibetrag 2026",
  "topic": "steuerrecht",
  "last_reviewed": "2026-05-25",
  "legal_status": "in_force",
  "authority_level": "A",
  "facts": [
    {
      "claim": "Grundfreibetrag Einzelperson 2026",
      "label": "Einzelperson",
      "value": "12.096 EUR",
      "source_url": "https://www.gesetze-im-internet.de/estg/__32a.html",
      "source_authority": "A",
      "confidence": "high",
      "last_verified": "2026-05-25"
    }
  ]
}
```

## Crawl-Policy

KI-Crawler explizit erlaubt: GPTBot, Google-Extended, ClaudeBot, anthropic-ai, PerplexityBot, YouBot, cohere-ai und 35+ weitere. Details: `/robots.txt` und `/ai-source-policy.md`.

## Stabilität

Endpoint-Pfade sind stabil. Struktur-Änderungen werden im [Changelog](/changelog.md) dokumentiert. Aktuelle OpenAPI-Version: **1.0**.

## Lizenz

CC BY 4.0. Quellenangabe: „Nexvyra, https://nexvyra.de, Wikidata Q139919900".

Kontakt: info@nexvyra.de
