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

# Guide d'intégration de l'API d'extraction intelligente WebExtrator

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

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

Extraction de contenu basée sur `/webextrator/render`. En plus de tous les paramètres de l'interface render, les paramètres suivants sont pris en charge :

| Champ           | Type    | Obligatoire | Par défaut | Description                                                                                             |
| --------------- | ------- | :---------: | ---------- | ------------------------------------------------------------------------------------------------------- |
| `expected_type` | string  |      ❌      | `markdown` | Type de résultat attendu : `markdown` / `article` / `text` / `links` / `structured`                     |
| `enable_llm`    | boolean |      ❌      | false      | Activation du post-traitement LLM (adapté pour `article` / `structured`)                                |
| `instruction`   | string  |      ❌      | -          | Instruction d'extraction LLM, par exemple « extraire le titre du produit, le prix, les spécifications » |

## Réponse synchrone

```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": "Article exemple",
    "author": "Zhang San",
    "published_at": "2026-05-01",
    "content": "# Article exemple\n\nCorps du texte ...",
    "summary": "Cet article présente ..."
  }
}
```

Le mode asynchrone, les codes d'erreur et les règles de facturation sont identiques à ceux de `/webextrator/render`.

## Exemple : extraction du corps de l'article (activation LLM)

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

## Exemple : extraction asynchrone + extraction structurée personnalisée

```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": "extraire le titre du produit, le prix, le stock, les URL des 3 images principales",
    "callback_url": "https://your-domain.com/wbx-callback"
  }'
```
