# OnPage API 無法索引的頁面

**API:** Data API

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

**Tags:** DataForSEO

搜尋引擎不會建立索引的已爬取頁面，每項含 `reason` 與 `url`。讀取已完成的爬取，因此需要 `post_dataforseo_on_page_submit` 傳回的 `id`，並傳回 `crawl_progress` 以及 `crawl_status`（`max_crawl_pages`、`pages_in_queue` 與 `pages_crawled`）——在採信偏少的結果前先檢查這些欄位，因為仍在進行的爬取能回報的內容本來就少。這裡的全部價值都在 reason 欄位——noindex、canonical 指向他處、被 robots 封鎖，是相同症狀下截然不同的問題。💰 上游免費：查詢已完成的爬取不產生費用，只有爬取本身計費。

### 計費參考

- 計量方式：依回報的回應成本計量。
- 參考請求估算：0.012 美元。
- 參考客戶倍率：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>你可以在 <a href=\"/v3/on_page/task_post/\">Task POST</a> 端點的回應中取得此 ID<br>範例：<br>\"07131248-1535-0216-1000-17384017ad04\""
          },
          "limit": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>傳回的頁面數量上限</em><br>選填欄位<br>預設值：<code>100</code><br>最大值：<code>1000</code>"
          },
          "offset": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>傳回頁面在結果陣列中的位移量</em><br>選填欄位<br>預設值：<code>0</code><br>最大值：<code>2000000</code><br>如果指定 <code>10</code>，結果陣列中的前十個頁面將被省略，並傳回後續頁面的資料"
          },
          "filters": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": [
                "object",
                "null"
              ]
            },
            "description": "<em>結果篩選參數陣列</em><br>選填欄位<br><strong>可同時新增多個篩選條件（最多 8 個）</strong><br>應在條件之間設定邏輯運算子 <code>and</code>、<code>or</code><br>支援以下運算子：<br><code>regex</code>、<code>not_regex</code>、<code>&lt;</code>、<code>&lt;=</code>、<code>&gt;</code>、<code>&gt;=</code>、<code>=</code>、<code>&lt;&gt;</code>、<code>in</code>、<code>not_in</code>、<code>like</code>、<code>not_like</code><br>可在 <code>like</code> 與 <code>not_like</code> 中使用 <code>%</code> 運算子，比對任意長度（零個或多個字元）的字串<br>範例：<br><code>[[\"reason\",\"&lt;&gt;\",\"robots_txt\"],<br>\"and\",<br>[\"url\",\"not_like\",\"%/wp-admin/%\"]]</code><p><code>[[\"url\",\"not_like\",\"%/wp-admin/%\"],<br>\"and\",<br>[[\"reason\",\"&lt;&gt;\",\"meta_tag\"],\"or\",[\"reason\",\"&lt;&gt;\",\"http_header\"]]]</code><p>完整可用的篩選條件清單請見<a href=\"/v3/on_page/filters_and_thresholds/?bash\" target=\"_blank\" rel=\"noopener noreferrer\">此連結。</a>"
          }
        },
        "example": [
          {
            "id": "07281559-0695-0216-0000-c269be8b7592",
            "filters": [
              [
                "reason",
                "=",
                "robots_txt"
              ],
              "and",
              [
                "url",
                "like",
                "%go%"
              ]
            ],
            "limit": 10
          }
        ]
      }
    ]
  },
  "example": [
    {
      "id": "07281559-0695-0216-0000-c269be8b7592",
      "filters": [
        [
          "reason",
          "=",
          "robots_txt"
        ],
        "and",
        [
          "url",
          "like",
          "%go%"
        ]
      ],
      "limit": 10
    }
  ]
}
```

## Responses

### 200 — 操作成功

Headers:
- `X-Request-Id` (string) — 聯絡 Felo 支援時需提供的請求識別碼。

**application/json**

Schema: object | null

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

### 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": "任務總費用，美元",
      "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": "任務的狀態碼\n由 DataForSEO 產生，範圍如下：10000-60000\n完整回應碼清單請見此處"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "任務的資訊訊息\n完整的一般資訊訊息清單請見此處"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "執行時間，秒"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "任務總費用，美元",
      "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_OnPageNonIndexableItem

`#/components/schemas/Response36Afe1097B20_OnPageNonIndexableItem`

```json
{
  "type": "object",
  "properties": {
    "reason": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>頁面無法被索引的原因</em><br>可為下列值：<code>robots_txt</code>、<code>meta_tag</code>、<code>http_header</code>、<code>attribute</code>、<code>too_many_redirects</code>"
    },
    "url": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>無法被索引頁面的 URL</em>"
    }
  }
}
```

### Response36Afe1097B20_OnPageNonIndexableResponseInfo

`#/components/schemas/Response36Afe1097B20_OnPageNonIndexableResponseInfo`

```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_OnPageNonIndexableTaskInfo"
              }
            ]
          },
          "description": "<em>任務陣列</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_OnPageNonIndexableResultInfo

`#/components/schemas/Response36Afe1097B20_OnPageNonIndexableResultInfo`

```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>"
    },
    "total_items_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>資料庫中相關項目的總數</em>",
      "format": "int64"
    },
    "items_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>結果陣列中的項目數</em>",
      "format": "int64"
    },
    "items": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_OnPageNonIndexableItem"
          }
        ]
      },
      "description": "<em>項目陣列</em>"
    }
  }
}
```

### Response36Afe1097B20_OnPageNonIndexableTaskInfo

`#/components/schemas/Response36Afe1097B20_OnPageNonIndexableTaskInfo`

```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_OnPageNonIndexableResultInfo"
              }
            ]
          },
          "description": "<em>結果陣列</em>"
        }
      }
    }
  ]
}
```
