Zum Hauptinhalt springen
POST https://api.acedata.cloud/webextrator/extract Inhaltsextraktion basierend auf /webextrator/render. Zusätzlich zu allen Parametern der Render-Schnittstelle werden folgende unterstützt:
FeldTypPflichtStandardBeschreibung
expected_typestringmarkdownErwartetes Extraktionsergebnis: markdown / article / text / links / structured
enable_llmbooleanfalseAktiviert LLM-Nachbearbeitung (geeignet für article / structured)
instructionstring-LLM-Extraktionsanweisung, z.B. „Extrahiere Produkttitel, Preis, Spezifikationen“

Synchrone Antwort

{
  "success": true,
  "task_id": "550e8400-...",
  "trace_id": "550e8400-...",
  "started_at": "2026-05-02T10:30:00.123Z",
  "finished_at": "2026-05-02T10:30:08.789Z",
  "elapsed": 8.666,
  "data": {
    "kind": "extract",
    "expected_type": "article",
    "url": "https://example.com/post/1",
    "title": "Beispielartikel",
    "author": "Zhang San",
    "published_at": "2026-05-01",
    "content": "# Beispielartikel\n\nHaupttext ...",
    "summary": "Dieser Artikel stellt vor ..."
  }
}
Asynchroner Modus, Fehlercodes und Abrechnungsregeln entsprechen vollständig denen von /webextrator/render.

Beispiel: Extraktion des Artikeltexts (LLM aktiviert)

curl -X POST https://api.acedata.cloud/webextrator/extract \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/news/1",
    "expected_type": "article",
    "enable_llm": true
  }'

Beispiel: Asynchron + benutzerdefinierte strukturierte Extraktion

curl -X POST https://api.acedata.cloud/webextrator/extract \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://shop.example.com/item/123",
    "expected_type": "structured",
    "enable_llm": true,
    "instruction": "Extrahiere Produkttitel, Preis, Lagerbestand, 3 Hauptbild-URLs",
    "callback_url": "https://your-domain.com/wbx-callback"
  }'