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

# Guía de integración de la API de extracción inteligente WebExtrator

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

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

Realiza extracción de contenido basada en `/webextrator/render`. Además de todos los parámetros de la interfaz render, soporta:

| Campo           | Tipo    | Obligatorio | Predeterminado | Descripción                                                                                             |
| --------------- | ------- | :---------: | -------------- | ------------------------------------------------------------------------------------------------------- |
| `expected_type` | string  |      ❌      | `markdown`     | Producto esperado de la extracción: `markdown` / `article` / `text` / `links` / `structured`            |
| `enable_llm`    | boolean |      ❌      | false          | Habilitar postprocesamiento LLM (adecuado para `article` / `structured`)                                |
| `instruction`   | string  |      ❌      | -              | Instrucción de extracción para LLM, por ejemplo "extraer título del producto, precio, especificaciones" |

## Respuesta síncrona

```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": "Artículo de ejemplo",
    "author": "Zhang San",
    "published_at": "2026-05-01",
    "content": "# Artículo de ejemplo\n\nContenido ...",
    "summary": "Este artículo presenta ..."
  }
}
```

El modo asíncrono, códigos de error y reglas de facturación son idénticos a `/webextrator/render`.

## Ejemplo: extracción del cuerpo del artículo (con LLM habilitado)

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

## Ejemplo: extracción estructurada personalizada + modo asíncrono

```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": "extraer título del producto, precio, inventario, URL de 3 imágenes principales",
    "callback_url": "https://your-domain.com/wbx-callback"
  }'
```
