# OnPage API ウォーターフォール

**API:** Data API

**Endpoint:** `POST /v1/beta/dataforseo/on_page/waterfall`

**Tags:** DataForSEO

クロール済みの 1 つの `url` の読み込みタイムライン——何が、どの順で要求され、それぞれどれだけ時間がかかったかです。完了したクロールを読み取るため、`post_dataforseo_on_page_submit` が返す `id` が必要です。`crawl_progress` と、`max_crawl_pages`・`pages_in_queue`・`pages_crawled` を含む `crawl_status` を返します。少ない結果を信じる前にこれらを確認してください。実行中のクロールは報告できる内容が少ないだけです。ページが遅い理由の説明に使います。スコア付きのパフォーマンス監査が必要な場合は `post_dataforseo_on_page_lighthouse_live_json` を使用してください。💰 アップストリームは無料：完了したクロールの照会には費用がかからず、費用がかかるのはクロール自体だけです。

### 料金の参考情報

- 計測方法：報告されたレスポンスコスト。
- 参考リクエスト見積もり：0.012 USD。
- 参照用の顧客乗数：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": {
          "id": {
            "type": "string",
            "description": "<em>タスクの ID</em><br><strong>必須フィールド</strong><br>この ID は、<a href=\"/v3/on_page/task_post/\">Task POST</a> エンドポイントのレスポンスで取得できます<br>例：<br>\"07131248-1535-0216-1000-17384017ad04\""
          },
          "url": {
            "type": "string",
            "description": "<em>ページ URL</em><br><strong>必須フィールド</strong><br>タイミング情報を取得するページを指定します"
          },
          "tag": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>ユーザー定義のタスク識別子</em><br>任意フィールド<br><em>文字数上限は 255 です</em><br>このパラメーターを使ってタスクを識別し、結果と照合できます<br>指定した <code>tag</code> の値は、レスポンスの <code>data</code> オブジェクトに含まれます"
          }
        },
        "example": [
          {
            "id": "08101204-0696-0216-0000-644a7b21a48a",
            "url": "https://dataforseo.com/tag/broken-links"
          }
        ]
      }
    ]
  },
  "example": [
    {
      "id": "08101204-0696-0216-0000-644a7b21a48a",
      "url": "https://dataforseo.com/tag/broken-links"
    }
  ]
}
```

## Responses

### 200 — 操作成功

Headers:
- `X-Request-Id` (string) — Felo サポートに問い合わせる際に伝えるリクエスト識別子。

**application/json**

Schema: object | null

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

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

`#/components/schemas/Response36Afe1097B20_CrawlStatusInfo`

```json
{
  "type": "object",
  "properties": {
    "max_crawl_pages": {
      "type": [
        "integer",
        "null"
      ],
      "description": "クロールするページ数の上限\n タスク設定時に指定した max_crawl_pages の制限を示します",
      "format": "int64"
    },
    "pages_in_queue": {
      "type": [
        "integer",
        "null"
      ],
      "description": "現在クロールキューにあるページ数",
      "format": "int64"
    },
    "pages_crawled": {
      "type": [
        "integer",
        "null"
      ],
      "description": "クロール済みのページ数",
      "format": "int64"
    }
  }
}
```

### Response36Afe1097B20_OnPageResourceLocationInfo

`#/components/schemas/Response36Afe1097B20_OnPageResourceLocationInfo`

```json
{
  "type": "object",
  "properties": {
    "line": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>行番号</em><br>リソースが存在する行の番号"
    },
    "offset_left": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>行内の位置</em><br>リソースより前にある行内の文字数。<br>しばしば<em>列</em>と呼ばれます<br><strong>注：</strong>1 からカウントされます。つまり、リソースの左側に文字がない場合、値は 1 になります"
    },
    "offset_top": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>ドキュメント内の位置</em><br>リソースと HTML の先頭の間にある文字の総数"
    }
  }
}
```

### Response36Afe1097B20_OnPageWaterfallItem

`#/components/schemas/Response36Afe1097B20_OnPageWaterfallItem`

```json
{
  "type": "object",
  "properties": {
    "page_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>ページの URL</em>"
    },
    "time_to_interactive": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em><a href=\"https://web.dev/interactive/\">Time To Interactive (TTI)</a> 指標</em><br>ユーザーがページを操作できるようになるまでの時間（ミリ秒）"
    },
    "dom_complete": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>リソースの読み込み時間</em><br>ページとそのすべてのサブリソースがダウンロードされるまでの時間（ミリ秒）"
    },
    "connection_time": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>サーバーへの接続時間</em><br>サーバーとの接続が確立されるまでの時間（ミリ秒）"
    },
    "time_to_secure_connection": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>安全な接続を確立するまでの時間</em><br>サーバーとの安全な接続が確立されるまでの時間（ミリ秒）"
    },
    "request_sent_time": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>サーバーにリクエストを送信するまでの時間</em><br>サーバーへのリクエストが送信されるまでの時間（ミリ秒）"
    },
    "waiting_time": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>最初のバイトまでの時間 <a href=\"https://en.wikipedia.org/wiki/Time_to_first_byte\">(TTFB)</a>（ミリ秒）</em>"
    },
    "download_time": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>ブラウザーがレスポンスを受信するまでの時間（ミリ秒）</em>"
    },
    "duration_time": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>ブラウザーがサーバーから完全なレスポンスを受信するまでの合計時間（ミリ秒）</em>"
    },
    "fetch_start": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>HTML リソースのダウンロードを開始するまでの時間</em><br>ブラウザーがページのダウンロードを開始するまでに必要な時間"
    },
    "fetch_end": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>HTML リソースのダウンロードを完了するまでの時間</em><br>ブラウザーがページのダウンロードを完了するまでに必要な時間"
    },
    "resources": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_WaterfallResourceInfo"
          }
        ]
      },
      "description": "<em>リソース固有のタイミング</em><br>ページ上で検出された各リソースのタイミングを個別の配列で含みます"
    }
  }
}
```

### Response36Afe1097B20_OnPageWaterfallResponseInfo

`#/components/schemas/Response36Afe1097B20_OnPageWaterfallResponseInfo`

```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_OnPageWaterfallTaskInfo"
              }
            ]
          },
          "description": "<em>タスクの配列</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_OnPageWaterfallResultInfo

`#/components/schemas/Response36Afe1097B20_OnPageWaterfallResultInfo`

```json
{
  "type": "object",
  "properties": {
    "crawl_progress": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>クロールセッションのステータス</em><br>可能な値：<code>in_progress</code>、<code>finished</code>"
    },
    "crawl_status": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_CrawlStatusInfo"
        }
      ],
      "description": "<em>クロールセッションの詳細</em>"
    },
    "items_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>結果配列内の項目数</em>",
      "format": "int64"
    },
    "items": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_OnPageWaterfallItem"
          }
        ]
      },
      "description": "<em>項目の配列</em>"
    }
  }
}
```

### Response36Afe1097B20_OnPageWaterfallTaskInfo

`#/components/schemas/Response36Afe1097B20_OnPageWaterfallTaskInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo"
    },
    {
      "type": "object",
      "properties": {
        "result": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "oneOf": [
              {
                "$ref": "#/components/schemas/Response36Afe1097B20_OnPageWaterfallResultInfo"
              }
            ]
          },
          "description": "<em>結果の配列</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_WaterfallResourceInfo

`#/components/schemas/Response36Afe1097B20_WaterfallResourceInfo`

```json
{
  "type": "object",
  "properties": {
    "resource_type": {
      "type": [
        "string",
        "null"
      ]
    },
    "url": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>リソース URL</em>"
    },
    "initiator": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>リソースの発信元</em>"
    },
    "duration_time": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>ブラウザーがサーバーから完全なレスポンスを受信するまでの合計時間（ミリ秒）</em>"
    },
    "fetch_start": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>HTML リソースのダウンロードを開始するまでの時間</em><br>ブラウザーがページのダウンロードを開始するまでに必要な時間"
    },
    "fetch_end": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>HTML リソースのダウンロードを完了するまでの時間</em><br>ブラウザーがページのダウンロードを完了するまでに必要な時間"
    },
    "location": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_OnPageResourceLocationInfo"
        }
      ],
      "description": "<em>ドキュメント内のリソースの位置</em><br>ドキュメントの HTML 内で特定のリソースの位置を定義するパラメータ"
    },
    "is_render_blocking": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "<em>リソースがレンダリングをブロックするかどうかを示します</em>"
    }
  }
}
```
