# Lighthouse 작업 설정

**API:** Data API

**Endpoint:** `POST /v1/beta/dataforseo/on_page/lighthouse/task_post`

**Tags:** DataForSEO

Lighthouse 감사를 기다리지 않고 대기열에 넣고 작업 `id`를 반환합니다. 감사가 도구 호출이 기다릴 수 있는 시간보다 오래 걸릴 때 사용하세요. `get_dataforseo_on_page_lighthouse_task_get_json`으로 가져오고, 준비된 작업은 `get_dataforseo_on_page_lighthouse_ready`로 확인합니다. DataForSEO 응답 봉투로 감싸집니다. 데이터는 `tasks[0].result`, 처리 결과는 `tasks[0].status_code`에 있으며, 거부된 요청도 HTTP 200을 반환합니다. ⚠️ 마지막에는 같은 245KB 보고서가 나오므로 컨텍스트 비용은 피하는 것이 아니라 미루는 것입니다. 나중이 아니라 여기에서 `categories` 또는 `audits`로 범위를 좁히세요.

### 가격 참고

- 과금 기준: 응답에 보고된 비용.
- 참고 요청 추정치: USD 0.0051.
- 참고 고객 배수: 1.0. 정산된 고객 금액에 다시 적용하지 마세요.

참고용 메타데이터일 뿐이며, 계정 견적 또는 보장된 가격 또는 지출 한도가 아닙니다. 리소스 크레딧은 Felo 크레딧이 아닙니다. 최종 청구는 Felo 청구 기록을 따릅니다.

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Request body

Required: **no**

### application/json

Schema:

```json
{
  "type": "array",
  "items": {
    "type": [
      "object",
      "null"
    ],
    "oneOf": [
      {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "<em>대상 URL</em><br><strong>필수 필드</strong><br>대상 페이지는 절대 URL(http:// 또는 https:// 포함)로 지정해야 합니다<br>예:<br><code>https://dataforseo.com/</code>"
          },
          "for_mobile": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>모바일 에뮬레이션 적용</em><br>선택 필드<br><code>true</code>로 설정하면 Lighthouse가 모바일 기기 및 화면 에뮬레이션을 사용하여 모바일 환경에서 페이지를 테스트합니다<br><code>false</code>로 설정하면 데스크톱에 대한 결과가 제공됩니다<br>기본값: <code>false</code>"
          },
          "categories": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "<em>Lighthouse 감사 카테고리</em><br>선택 필드<br>각 카테고리는 해당 섹션에 가중치와 점수를 적용하는 감사 및 감사 그룹의 모음입니다(<a href=\"https://github.com/GoogleChrome/lighthouse/blob/master/docs/architecture.md#auditreport-terminology\" target=\"_blank\" rel=\"noopener noreferrer\">공식 정의 참조</a>)<strong>이 필드를 무시하면 <code>audits</code>를 지정하지 않는 한 모든 카테고리에 대한 데이터를 반환합니다</strong><br>이 필드를 사용하면 여기에 지정한 특정 카테고리에 대한 데이터를 얻을 수 있습니다<p>가능한 값:<br><code>seo</code>, <code>performance</code>, <code>best_practices</code>, <code>accessibility</code>"
          },
          "audits": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "<em>Lighthouse 감사</em><br>선택 필드<br>감사는 Lighthouse가 각 기능/최적화/지표에 대해 실행하여 숫자 점수를 산출하는 개별 테스트입니다(<a href=\"https://github.com/GoogleChrome/lighthouse/blob/master/docs/architecture.md#components--terminology\" target=\"_blank\" rel=\"noopener noreferrer\">공식 정의 참조</a>)<strong>이 필드를 무시하면 모든 감사에 대한 데이터를 반환합니다</strong><br>이 필드를 사용하면 여기에 지정한 특정 감사에 대한 데이터를 얻을 수 있습니다<p><strong>참고</strong>: 일부 감사는 특정 카테고리에 속하지 않으며 독립형 페이지 품질 측정값입니다<p>일반적으로 몇 가지 사용 사례가 있습니다:<p>1. <code>categories</code>를 무시하면 이 필드를 사용하여 지정한 감사에 대한 데이터만 얻을 수 있습니다<br>예를 들어 <code>\"categories\"</code>를 무시하고 <code>\"audits\": [\"metrics/cumulative-layout-shift\",\"metrics/largest-contentful-paint\",\"metrics/total-blocking-time\"]</code>을 지정하면 해당 감사에 대한 데이터만 얻게 됩니다<p>2. 카테고리를 지정하면 이 필드를 사용하여 지정한 카테고리에 속하지 않는 감사를 추가로 받을 수 있습니다<br>예를 들어 <code>\"categories\": [\"seo\"]</code>와 <code>\"audits\": [\"metrics/cumulative-layout-shift\",\"metrics/largest-contentful-paint\",\"metrics/total-blocking-time\"]</code>를 지정하면 \"performance\" 아래의 해당 감사만, \"seo\" 아래의 모든 감사를 얻게 됩니다<p><a href=\"/v3/on_page/lighthouse/audits/\">가능한 감사의 전체 목록은 여기</a>에서 확인할 수 있습니다"
          },
          "version": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>Lighthouse 버전</em><br>선택 필드<br>버전 번호를 지정하여 특정 Lighthouse 버전에 해당하는 결과를 얻을 수 있습니다<br>사용 가능한 버전 목록은 <a href=\"/v3/on_page/lighthouse/versions/\" target=\"_blank\" rel=\"noopener noreferrer\">Lighthouse Versions 엔드포인트</a>에서 확인할 수 있습니다"
          },
          "language_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>Lighthouse 언어 이름</em><br>선택 필드<br><code>https://api.dataforseo.com/v3/on_page/lighthouse/languages</code>에 별도 요청을 보내 <code>language_name</code>과 함께 검색 엔진에서 사용 가능한 언어 목록을 받을 수 있습니다<br>기본값:<br><code class=\"long-string\">English</code>"
          },
          "language_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>Lighthouse 언어 코드</em><br>선택 필드<br><code>https://api.dataforseo.com/v3/on_page/lighthouse/languages</code>에 별도 요청을 보내 <code>language_code</code>와 함께 검색 엔진에서 사용 가능한 언어 목록을 받을 수 있습니다<br>기본값:<br><code class=\"long-string\">en</code>"
          },
          "custom_user_agent": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>사용자 지정 User-Agent</em><br>선택 필드<br>Lighthouse 감사를 실행할 때 브라우저가 사용하는 사용자 지정 User-Agent를 지정하세요;<br>최대 254자까지 지정할 수 있습니다;"
          },
          "browser_screen_width": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>브라우저 화면 너비</em><br>선택 필드<br>특정 기기를 에뮬레이션하도록 Lighthouse 감사에 사용되는 브라우저의 화면 너비를 설정하세요;<br>다음 범위 내에서 지정할 수 있습니다: <code>240–9999</code>;",
            "format": "int64"
          },
          "browser_screen_height": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>브라우저 화면 높이</em><br>선택 필드<br>특정 기기를 에뮬레이션하도록 Lighthouse 감사에 사용되는 브라우저의 화면 높이를 설정하세요;<br>다음 범위 내에서 지정할 수 있습니다: <code>240–9999</code>;"
          },
          "browser_screen_scale_factor": {
            "type": [
              "number",
              "null"
            ],
            "description": "<em>브라우저 화면 배율</em><br>선택 필드<br>Lighthouse 감사에 사용되는 브라우저의 기기 픽셀 비율을 설정하세요;<br>다음 범위 내에서 지정할 수 있습니다: <code>0.5–3</code>;"
          },
          "browser_network_throttling_method": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>브라우저 네트워크 스로틀링 방법</em><br>선택 필드<br>Lighthouse 감사 중 스로틀링을 적용하는 데 사용되는 방법을 정의합니다;<br>가능한 값:<br><code>simulate</code> - 명시적 스로틀링을 적용하지 않고 예상 성능 지표를 계산합니다;<br><code>devtools</code> - <code>browser_network_throttling</code> 및 <code>browser_cpu_throttling_multiplier</code>에 지정된 스로틀링 설정을 적용합니다;<br><code>provided</code> - 크롤링 환경의 네트워크 조건을 사용합니다;"
          },
          "browser_cpu_throttling_multiplier": {
            "type": [
              "number",
              "null"
            ],
            "description": "<em>브라우저 CPU 스로틀링 배수</em><br><strong><code>browser_network_throttling_method</code>가 <code>devtools</code>로 설정된 경우 필수입니다;</strong><br>Lighthouse 감사 중 기기 성능 조건을 시뮬레이션하도록 CPU 스로틀링 배수를 설정하세요;<br>다음 범위 내에서 지정할 수 있습니다: <code>1–4</code>;<br><strong>참고:</strong> 이 매개변수는 <code>browser_network_throttling_method</code>가 <code>devtools</code>로 설정된 경우에만 적용됩니다;"
          },
          "browser_network_throttling": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>브라우저 네트워크 스로틀링</em><br><strong><code>browser_network_throttling_method</code>가 <code>devtools</code>로 설정된 경우 필수입니다;</strong><br>Lighthouse 감사 중 연결 속도 조건을 시뮬레이션하도록 네트워크 스로틀링 프로필을 설정하세요;<br>가능한 값: <code>no_throttling</code>, <code>fast_4g</code>, <code>slow_4g</code>, <code>regular_3g</code>, <code>pc</code>;<br><strong>참고:</strong> 이 매개변수는 <code>browser_network_throttling_method</code>가 <code>devtools</code>로 설정된 경우에만 적용됩니다;"
          },
          "tag": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>사용자 정의 작업 식별자</em><br>선택 필드<br><em>최대 255자</em><br>이 매개변수를 사용해 작업을 식별하고 결과와 매칭할 수 있습니다<br><code>tag</code>에 지정한 값은 응답의 <code>data</code> 객체에서 확인할 수 있습니다"
          },
          "pingback_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>완료된 작업의 알림 URL</em><br>선택 필드<br>작업이 완료되면 지정한 URL로 GET 요청을 보내 알려드립니다<br>‘$id’ 문자열을 <code>$id</code> 변수로, ‘$tag’를 urlencoded <code>$tag</code> 변수로 사용할 수 있습니다. 요청을 보내기 전에 필요한 값을 설정합니다.<br>예:<br><code>http://your-server.com/pingscript?id=$id</code><br><code>http://your-server.com/pingscript?id=$id&amp;tag=$tag</code><br><strong>참고:</strong> <code>pingback_url</code>의 특수 문자는 urlencoded 처리됩니다;<br>예를 들어 <code>#</code> 문자는 <code>%23</code>으로 인코딩됩니다. 자세한 내용은 <a href=\"https://dataforseo.com/help-center/pingbacks-postbacks-with-dataforseo-api\" target=\"_blank\" rel=\"noopener noreferrer\">Help Center</a>에서 확인하세요"
          }
        },
        "example": [
          {
            "url": "https://dataforseo.com",
            "for_mobile": true,
            "tag": "some_string_123",
            "pingback_url": "https://your-server.com/pingscript?id=$id&tag=$tag"
          }
        ]
      }
    ]
  },
  "example": [
    {
      "url": "https://dataforseo.com",
      "for_mobile": true,
      "tag": "some_string_123",
      "pingback_url": "https://your-server.com/pingscript?id=$id&tag=$tag"
    }
  ]
}
```

## Responses

### 200 — 작업 성공

Headers:
- `X-Request-Id` (string) — Felo 지원팀에 문의할 때 포함할 요청 식별자입니다.

**application/json**

Schema: object | null

```json
{
  "type": [
    "object",
    "null"
  ],
  "oneOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_OnPageLighthouseTaskPostResponseInfo"
    }
  ]
}
```

### 400 — 요청을 처리할 수 없습니다. 요청 매개변수를 확인하세요.

### 401 — 유효한 Felo API 키가 필요합니다.

### 402 — 청구 요건이 충족되지 않아 요청을 진행할 수 없습니다.

### 403 — 이 계정에는 이 작업을 수행할 권한이 없습니다.

### 429 — 요청 또는 지출 한도에 도달했습니다.

### 502 — 서비스가 요청을 완료할 수 없습니다.

### 503 — API 또는 청구 서비스를 일시적으로 사용할 수 없습니다.

### 504 — 요청을 처리하는 동안 서비스 시간이 초과되었습니다.

### default — 오류 응답. 업스트림 패스스루 응답은 공급자 형식을 사용할 수 있습니다.

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response36Afe1097B20_BaseResponseInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseInfo`

```json
{
  "properties": {
    "version": {
      "type": [
        "string",
        "null"
      ],
      "description": "API의 현재 버전"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "일반 상태 코드입니다.\n응답 코드 전체 목록은 여기에서 확인할 수 있습니다."
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "일반 정보 메시지입니다.\n일반 정보 메시지 전체 목록은 여기에서 확인할 수 있습니다."
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "총 실행 시간(초)"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "전체 작업 비용, USD",
      "format": "double"
    },
    "tasks_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "tasks 배열의 작업 수",
      "format": "int64"
    },
    "tasks_error": {
      "type": [
        "integer",
        "null"
      ],
      "description": "오류와 함께 반환된 tasks 배열의 작업 수",
      "format": "int64"
    }
  }
}
```

### Response36Afe1097B20_BaseResponseTaskInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo`

```json
{
  "properties": {
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "작업 식별자\n시스템 내 고유 작업 식별자(UUID 형식)"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "작업의 상태 코드\nDataForSEO가 생성하며 10000-60000 범위일 수 있습니다.\n응답 코드 전체 목록은 여기에서 확인할 수 있습니다."
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "작업의 정보 메시지\n일반 정보 메시지 전체 목록은 여기에서 확인할 수 있습니다."
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "실행 시간, 초"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "전체 작업 비용, USD",
      "format": "double"
    },
    "result_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "result 배열의 요소 수",
      "format": "int64"
    },
    "path": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "URL 경로"
    },
    "data": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "object",
          "null"
        ]
      },
      "description": "POST 요청에 지정한 것과 동일한 매개변수를 포함합니다"
    }
  }
}
```

### Response36Afe1097B20_OnPageLighthouseTaskPostResponseInfo

`#/components/schemas/Response36Afe1097B20_OnPageLighthouseTaskPostResponseInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseInfo"
    },
    {
      "type": "object",
      "properties": {
        "tasks": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "oneOf": [
              {
                "$ref": "#/components/schemas/Response36Afe1097B20_OnPageLighthouseTaskPostTaskInfo"
              }
            ]
          },
          "description": "<em>작업 배열</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_OnPageLighthouseTaskPostTaskInfo

`#/components/schemas/Response36Afe1097B20_OnPageLighthouseTaskPostTaskInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo"
    },
    {
      "type": "object",
      "properties": {
        "result": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": [
                "object",
                "null"
              ]
            }
          }
        }
      }
    }
  ]
}
```
