> ## 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.

# Guida all'integrazione API di estrazione intelligente WebExtrator

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

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

Estrazione del contenuto basata su `/webextrator/render`. Oltre a tutti i parametri dell'endpoint render, supporta inoltre:

| Campo           | Tipo     | Obbligatorio | Predefinito | Descrizione                                                                             |
| --------------- | -------- | :----------: | ----------- | --------------------------------------------------------------------------------------- |
| `expected_type` | stringa  |       ❌      | `markdown`  | Tipo di output atteso: `markdown` / `article` / `text` / `links` / `structured`         |
| `enable_llm`    | booleano |       ❌      | false       | Abilita il post-processing LLM (adatto per `article` / `structured`)                    |
| `instruction`   | stringa  |       ❌      | -           | Istruzioni di estrazione LLM, ad esempio "estrarre titolo prodotto, prezzo, specifiche" |

## Risposta sincrona

```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": "Esempio di articolo",
    "author": "Zhang San",
    "published_at": "2026-05-01",
    "content": "# Esempio di articolo\n\nTesto principale ...",
    "summary": "Questo articolo introduce ..."
  }
}
```

La modalità asincrona, i codici di errore e le regole di fatturazione sono identiche a quelle di `/webextrator/render`.

## Esempio: estrazione del testo dell'articolo (con LLM abilitato)

```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
  }'
```

## Esempio: asincrono + estrazione strutturata personalizzata

```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": "estrarre titolo prodotto, prezzo, stock, URL di 3 immagini principali",
    "callback_url": "https://your-domain.com/wbx-callback"
  }'
```
