> ## Documentation Index
> Fetch the complete documentation index at: https://germeytechnology-docs-remove-4o-image-nav.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# WebExtrator Intelligent Extract API Integrationsguide

> WebExtrator Web Render & Extract 集成指南 - Ace Data Cloud

`POST https://api.acedata.cloud/webextrator/extract`

Utför innehållsextraktion baserat på `/webextrator/render`. Förutom alla parametrar från render-gränssnittet stöds även:

| Fält            | Typ     | Obligatorisk | Standard   | Beskrivning                                                                            |
| --------------- | ------- | :----------: | ---------- | -------------------------------------------------------------------------------------- |
| `expected_type` | string  |       ❌      | `markdown` | Förväntad extraktionsprodukt: `markdown` / `article` / `text` / `links` / `structured` |
| `enable_llm`    | boolean |       ❌      | false      | Aktivera LLM efterbehandling (passar för `article` / `structured`)                     |
| `instruction`   | string  |       ❌      | -          | LLM-extraktionsinstruktion, t.ex. "extrahera produktnamn, pris, specifikationer"       |

## Synkront svar

```json theme={null}
{
  "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": "Exempelartikel",
    "author": "Zhang San",
    "published_at": "2026-05-01",
    "content": "# Exempelartikel\n\nBrödtext ...",
    "summary": "Denna artikel introducerar ..."
  }
}
```

Asynkront läge, felkoder och prissättningsregler är helt samma som för `/webextrator/render`.

## Exempel: Extrahera artikelinnehåll (med LLM aktiverat)

```bash theme={null}
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
  }'
```

## Exempel: Asynkront + anpassad strukturerad extraktion

```bash theme={null}
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": "extrahera produktnamn, pris, lagerstatus, 3 huvudbild-URL:er",
    "callback_url": "https://your-domain.com/wbx-callback"
  }'
```
