> ## 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 Web-Rendering API Integrationsanleitung

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

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

## Authentifizierung

Fügen Sie im Anfrage-Header `Authorization: Bearer <Ihr API Key>` hinzu.

## Anfrageparameter

| Feld                | Typ       | Pflicht | Standard       | Beschreibung                                                                                                               |
| ------------------- | --------- | :-----: | -------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `url`               | string    |    ✅    | -              | Die zu rendernde Seiten-URL                                                                                                |
| `user_agent`        | string    |    ❌    | Systemstandard | Benutzerdefinierter User-Agent                                                                                             |
| `timeout`           | number    |    ❌    | 30000          | Timeout für eine einzelne Render-Operation (Millisekunden), maximal 120000                                                 |
| `wait_until`        | string    |    ❌    | `load`         | Ladeabschluss-Ereignis: `load`/`domcontentloaded`/`networkidle`                                                            |
| `delay`             | number    |    ❌    | 0              | Wartezeit nach Ladeabschluss (Millisekunden), maximal 30000                                                                |
| `wait_for_selector` | string    |    ❌    | -              | Warte auf das Erscheinen dieses CSS-Selectors                                                                              |
| `block_resources`   | string\[] |    ❌    | -              | Blockierte Ressourcentypen: `image`/`media`/`font`/`stylesheet` usw.                                                       |
| `headers`           | object    |    ❌    | -              | Zusätzliche HTTP-Header                                                                                                    |
| `cookies`           | array     |    ❌    | -              | Cookie-Liste, Elemente in der Form `{name, value, domain, path}`                                                           |
| `callback_url`      | string    |    ❌    | -              | Callback-URL für asynchronen Modus; bei Angabe wird sofort die Task-ID zurückgegeben, das Ergebnis per POST zurückgemeldet |

## Synchrone Antwort (ohne callback\_url)

```json theme={null}
{
  "success": true,
  "task_id": "550e8400-e29b-41d4-a716-446655440000",
  "trace_id": "550e8400-e29b-41d4-a716-446655440001",
  "started_at": "2026-05-02T10:30:00.123Z",
  "finished_at": "2026-05-02T10:30:05.456Z",
  "elapsed": 5.333,
  "data": {
    "kind": "render",
    "url": "https://example.com",
    "title": "Example Domain",
    "html": "<!doctype html>...",
    "text": "Example Domain ...",
    "markdown": "# Example Domain\n...",
    "screenshot": "data:image/png;base64,iVBORw0K...",
    "links": ["https://www.iana.org/domains/example"]
  }
}
```

## Asynchroner Modus (mit callback\_url)

Initiale Antwort:

```json theme={null}
{
  "success": true,
  "task_id": "550e8400-e29b-41d4-a716-446655440000",
  "trace_id": "550e8400-e29b-41d4-a716-446655440001",
  "started_at": "2026-05-02T10:30:00.123Z"
}
```

Der Antwort-Header enthält `x-usage-exempt: true`, was bedeutet, dass dieser synchrone Handshake nicht berechnet wird. Nach Abschluss der Aufgabe sendet die Plattform eine POST-Anfrage an die `callback_url`. Der Request-Body enthält das `data`-Feld der synchronen Antwort sowie die gleichen Felder `task_id` / `trace_id` / `started_at` / `finished_at` / `elapsed`.

## Fehlerantwort

```json theme={null}
{
  "success": false,
  "task_id": "550e8400-e29b-41d4-a716-446655440000",
  "trace_id": "550e8400-e29b-41d4-a716-446655440001",
  "started_at": "2026-05-02T10:30:00.123Z",
  "error": {
    "code": "timeout",
    "message": "page load timed out after 30000ms"
  }
}
```

Fehlercodes: `bad_request` / `forbidden` / `too_many_requests` / `not_found` / `api_error` / `timeout` / `unknown` / `busy`.

## Beispiel

```bash theme={null}
curl -X POST https://api.acedata.cloud/webextrator/render \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "wait_until": "networkidle",
    "block_resources": ["image", "media", "font"]
  }'
```
