> ## 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 웹 렌더링 API 통합 가이드

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

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

## 인증

요청 헤더에 `Authorization: Bearer &lt;당신의 API Key>`를 추가하세요.

## 요청 파라미터

| 필드                  | 타입        |  필수 | 기본값     | 설명                                                 |
| ------------------- | --------- | :-: | ------- | -------------------------------------------------- |
| `url`               | string    |  ✅  | -       | 렌더링할 페이지 URL                                       |
| `user_agent`        | string    |  ❌  | 시스템 기본값 | 사용자 지정 User-Agent                                  |
| `timeout`           | number    |  ❌  | 30000   | 단일 렌더링 타임아웃(밀리초), 최대 120000                        |
| `wait_until`        | string    |  ❌  | `load`  | 로드 완료 이벤트: `load`/`domcontentloaded`/`networkidle` |
| `delay`             | number    |  ❌  | 0       | 로드 완료 후 대기 시간(밀리초), 최대 30000                       |
| `wait_for_selector` | string    |  ❌  | -       | 해당 CSS 선택자가 나타날 때까지 대기                             |
| `block_resources`   | string\[] |  ❌  | -       | 차단할 리소스 유형: `image`/`media`/`font`/`stylesheet` 등  |
| `headers`           | object    |  ❌  | -       | 추가 HTTP 헤더                                         |
| `cookies`           | array     |  ❌  | -       | 쿠키 목록, 요소 형태는 `{name, value, domain, path}`        |
| `callback_url`      | string    |  ❌  | -       | 비동기 모드 콜백 주소; 제공 시 즉시 작업 ID 반환, 결과는 POST 콜백으로 전달   |

## 동기 응답 (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"]
  }
}
```

## 비동기 모드 (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"
}
```

응답 헤더에 `x-usage-exempt: true`가 포함되어 있으며, 이는 이번 동기 핸드셰이크에 요금이 부과되지 않음을 의미합니다. 작업이 실제 완료되면 플랫폼이 `callback_url`로 POST 요청을 보내며, 요청 본문은 동기 응답의 `data` 필드에 동일한 `task_id` / `trace_id` / `started_at` / `finished_at` / `elapsed` 필드를 추가한 내용입니다.

## 오류 응답

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

오류 코드: `bad_request` / `forbidden` / `too_many_requests` / `not_found` / `api_error` / `timeout` / `unknown` / `busy`.

## 예제

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