> ## 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 Przewodnik po integracji inteligentnego API ekstrakcji

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

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

Ekstrakcja treści na bazie `/webextrator/render`. Oprócz wszystkich parametrów interfejsu render, dodatkowo obsługiwane są:

| Pole            | Typ     | Wymagane | Domyślnie  | Opis                                                                                |
| --------------- | ------- | :------: | ---------- | ----------------------------------------------------------------------------------- |
| `expected_type` | string  |     ❌    | `markdown` | Oczekiwany typ ekstrakcji: `markdown` / `article` / `text` / `links` / `structured` |
| `enable_llm`    | boolean |     ❌    | false      | Włączenie postprocessingu LLM (zalecane dla `article` / `structured`)               |
| `instruction`   | string  |     ❌    | -          | Instrukcja ekstrakcji dla LLM, np. „wyodrębnij tytuł produktu, cenę, specyfikacje”  |

## Odpowiedź synchroniczna

```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": "本文介绍 ..."
  }
}
```

Tryb asynchroniczny, kody błędów oraz zasady rozliczeń są identyczne jak w `/webextrator/render`.

## Przykład: ekstrakcja treści artykułu (włączony 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
  }'
```

## Przykład: asynchronicznie + niestandardowa ekstrakcja strukturalna

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