> ## Documentation Index
> Fetch the complete documentation index at: https://docs.acedata.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# WebExtrator インテリジェント抽出 API 統合ガイド

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

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

`/webextrator/render` をベースにコンテンツ抽出を行います。render インターフェースの全パラメータに加え、以下をサポートします：

| フィールド           | タイプ     |  必須 | デフォルト      | 説明                                                                 |
| --------------- | ------- | :-: | ---------- | ------------------------------------------------------------------ |
| `expected_type` | string  |  ❌  | `markdown` | 期待する抽出成果物：`markdown` / `article` / `text` / `links` / `structured` |
| `enable_llm`    | boolean |  ❌  | false      | LLM 後処理を有効化（`article` / `structured` に適用）                          |
| `instruction`   | string  |  ❌  | -          | LLM 抽出指示例：「商品タイトル、価格、仕様を抽出」                                        |

## 同期レスポンス

```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": "サンプル記事",
    "author": "張三",
    "published_at": "2026-05-01",
    "content": "# サンプル記事\n\n本文 ...",
    "summary": "本記事では ..."
  }
}
```

非同期モード、エラーコード、課金ルールは `/webextrator/render` と完全に同じです。

## 例：記事本文抽出（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
  }'
```

## 例：非同期 + カスタム構造化抽出

```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": "商品タイトル、価格、在庫、3枚のメイン画像 URL を抽出",
    "callback_url": "https://your-domain.com/wbx-callback"
  }'
```
