# Gemini LLM Scraper Advanced（ライブ）

**API:** Data API

**Endpoint:** `POST /v1/beta/dataforseo/ai_optimization/gemini/llm_scraper/live/advanced`

**Tags:** DataForSEO

ユーザーが尋ねるのと同じように Gemini に `keyword` を尋ね、解析済みの回答を返します。`keyword`、`location_code`、`language_code`、`model`、`datetime`、`markdown`、`sources`、`se_results_count`、`item_types`、`items_count`、`items` を返します。DataForSEO のエンベロープに包まれます。データは `tasks[0].result`、結果は `tasks[0].status_code` に格納され、拒否されたリクエストでも HTTP 200 が返ります。ChatGPT 側の対応エンドポイントは `post_dataforseo_ai_chat_gpt_llm_scraper_live` です。両方を実行して比較することが、このファミリーの狙いです。

### 料金の参考情報

- 計測方法: 報告されたレスポンスコスト。
- 参考リクエスト見積もり: 0.701 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": {
          "keyword": {
            "type": "string",
            "description": "<em>keyword</em><br><strong>必須フィールド</strong><br><code>keyword</code> フィールドには<strong>最大 2000 文字</strong>を指定できます<br>すべての %## はデコードされます（また、‘+’ 文字は空白文字にデコードされます）<br><code>keyword</code> に “%” 文字を使用する必要がある場合は、“%25” として指定してください<br><code>keyword</code> に “+” 文字を使用する必要がある場合は、“%2B” として指定してください<p>DataForSEO API の <code>keyword</code> フィールドと <code>keywords</code> フィールドのルールと制限については、こちらの <a href=\"https://dataforseo.com/help-center/rules-and-limitations-of-keyword-and-keywords-fields-in-dataforseo-apis\" rel=\"noopener noreferrer\" target=\"_blank\">ヘルプセンター記事</a>を参照してください"
          },
          "location_name": {
            "type": "string",
            "description": "<em>検索エンジンのロケーションの正式名称</em><br><strong><code>location_code</code> または <code>location_coordinate</code> を指定しない場合は必須フィールド</strong><br><strong>このフィールドを使用する場合、<code>location_code</code> または <code>location_coordinate</code> を指定する必要はありません</strong><br>別途 <code>https://api.dataforseo.com/v3/ai_optimization/gemini/llm_scraper/locations</code> にリクエストを送信すると、検索エンジンの利用可能なロケーションとその <code>location_name</code> の一覧を取得できます<br>例:<br><code class=\"long-string\">United States</code>"
          },
          "location_code": {
            "type": "integer",
            "description": "<em>検索エンジンのロケーションコード</em><br><strong><code>location_name</code> または <code>location_coordinate</code> を指定しない場合は必須フィールド</strong><br><strong>このフィールドを使用する場合、<code>location_name</code> または <code>location_coordinate</code> を指定する必要はありません</strong><br>別途 <code>https://api.dataforseo.com/v3/ai_optimization/gemini/llm_scraper/locations</code> にリクエストを送信すると、検索エンジンの利用可能なロケーションとその <code>location_code</code> の一覧を取得できます<br>例:<br><code class=\"long-string\">2840</code>"
          },
          "location_coordinate": {
            "type": "string",
            "description": "<p><em>ロケーションの GPS 座標</em><p><strong><code>location_name</code>&nbsp;または <code>location_code</code> を指定しない場合は必須フィールド</strong><p><strong>このフィールドを使用する場合、<code>location_name</code> または <code>location_code</code> を指定する必要はありません</strong><p><code>location_coordinate</code> パラメーターは <em>\"latitude,longitude,radius\"</em> 形式で指定する必要があります<p><em>\"latitude\"</em> と <em>\"longitude\"</em> の最大小数桁数: 7<p><em>\"radius\"</em> の最小値: 199（mm）<p><em>\"radius\"</em> の最大値: 199999（mm）<p>例:<p><code class=\"long-string\">53.476225,-2.243572,200</code></p>"
          },
          "language_name": {
            "type": "string",
            "description": "<em>検索エンジンの言語の正式名称</em><br><code>language_code</code> を指定しない場合は必須フィールド<br>このフィールドを使用する場合、<code>language_code</code> を指定する必要はありません<br>別途 <code>https://api.dataforseo.com/v3/ai_optimization/gemini/llm_scraper/languages</code> にリクエストを送信すると、検索エンジンがサポートする言語とその <code>language_name</code> の一覧を取得できます<br>例: <code>English</code>"
          },
          "language_code": {
            "type": "string",
            "description": "<em>検索エンジンの言語コード</em><br><code>language_name</code> を指定しない場合は必須フィールド<br>このフィールドを使用する場合、<code>language_name</code> を指定する必要はありません<br>別途 <code>https://api.dataforseo.com/v3/ai_optimization/gemini/llm_scraper/languages</code> にリクエストを送信すると、検索エンジンがサポートする言語とその <code>language_code</code> の一覧を取得できます<br>例: <code>en</code>"
          },
          "tag": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>ユーザー定義のタスク識別子</em><br>任意フィールド<br><em>文字数上限は 255 です</em><br>このパラメーターを使ってタスクを識別し、結果と照合できます<br>指定した <code>tag</code> の値は、レスポンスの <code>data</code> オブジェクトに含まれます"
          }
        },
        "example": [
          {
            "language_code": "en",
            "location_code": 2840,
            "keyword": "albert einstein"
          }
        ]
      }
    ]
  },
  "example": [
    {
      "language_code": "en",
      "location_code": 2840,
      "keyword": "albert einstein"
    }
  ]
}
```

## Responses

### 200 — 操作成功

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

**application/json**

Schema: object | null

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

### 400 — リクエストを処理できませんでした。リクエストパラメータを確認してください。

### 401 — 有効な Felo API キーが必要です。

### 402 — 請求要件が満たされていないため、リクエストを続行できません。

### 403 — このアカウントにはこの操作を行う権限がありません。

### 429 — リクエストまたは支出の上限に達しました。

### 502 — サービスがリクエストを完了できませんでした。

### 503 — API または請求サービスが一時的に利用できません。

### 504 — リクエストの処理中にサービスがタイムアウトしました。

### default — エラーレスポンス。上流のパススルーレスポンスはプロバイダーの形式を使用する場合があります

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response36Afe1097B20_AiOptimizationGeminiLlmScraperLiveAdvancedResponseInfo

`#/components/schemas/Response36Afe1097B20_AiOptimizationGeminiLlmScraperLiveAdvancedResponseInfo`

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

### Response36Afe1097B20_AiOptimizationGeminiLlmScraperLiveAdvancedResultInfo

`#/components/schemas/Response36Afe1097B20_AiOptimizationGeminiLlmScraperLiveAdvancedResultInfo`

```json
{
  "type": "object",
  "properties": {
    "keyword": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>POST 配列で受け取ったキーワード<br></em><strong>キーワードはデコードされた %## とともに返されます（プラス記号「+」は空白文字にデコードされます）</strong>"
    },
    "location_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>POST 配列内のロケーションコード</em>"
    },
    "language_code": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>POST 配列内の言語コード</em>"
    },
    "model": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>モデルバージョンを示します</em>"
    },
    "datetime": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>結果を受信した日時</em><br>UTC 形式：“yyyy-mm-dd hh-mm-ss +00:00”<br>例：<br><code class=\"long-string\">2019-11-15 12:57:46 +00:00</code>"
    },
    "markdown": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>markdown 形式の要素の内容</em><br><a href=\"https://en.wikipedia.org/wiki/Markdown\" target=\"_blank\">markdown マークアップ言語</a>でフォーマットされた結果の内容"
    },
    "sources": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_SourceInfo"
          }
        ]
      },
      "description": "<em>ソースの配列</em><br>モデルが最終回答で実際に引用または依拠したソース"
    },
    "se_results_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em> 結果の総数</em>",
      "format": "int64"
    },
    "item_types": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "<em>検索結果のタイプ</em><br>SERP で見つかった検索結果のタイプ（<code>items</code>）を含みます。<br>指定可能なアイテムタイプ:<br><code>gemini_text</code>、<code>gemini_table</code>、<code>gemini_images</code>"
    },
    "items_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em><strong><code>items</code></strong> 配列で返された結果数</em>",
      "format": "int64"
    },
    "items": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_BaseGeminiLlmScraperElementItem"
          }
        ]
      },
      "description": "<em>Gemini 結果の要素</em>"
    }
  }
}
```

### Response36Afe1097B20_AiOptimizationGeminiLlmScraperLiveAdvancedTaskInfo

`#/components/schemas/Response36Afe1097B20_AiOptimizationGeminiLlmScraperLiveAdvancedTaskInfo`

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

### Response36Afe1097B20_BaseGeminiLlmScraperElementItem

`#/components/schemas/Response36Afe1097B20_BaseGeminiLlmScraperElementItem`

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": [
        "string",
        "null"
      ],
      "description": "要素の種類"
    },
    "rank_group": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>SERP のグループ順位</em><br>同じ <code>type</code> 値を持つ要素のグループ内での位置<br><code>type</code> 値が異なる要素の位置は <code>rank_group</code> から除外されます"
    },
    "rank_absolute": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>SERP の絶対順位</em><br>SERP 内のすべての要素の中での絶対位置"
    },
    "markdown": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>markdown 形式の要素の内容</em><br><a href=\"https://en.wikipedia.org/wiki/Markdown\" target=\"_blank\">markdown マークアップ言語</a>でフォーマットされた結果の内容"
    }
  },
  "additionalProperties": false,
  "discriminator": {
    "propertyName": "type",
    "mapping": {
      "gemini_text": "#/components/schemas/Response36Afe1097B20_GeminiTextElementItem",
      "gemini_table": "#/components/schemas/Response36Afe1097B20_GeminiTableElementItem",
      "gemini_images": "#/components/schemas/Response36Afe1097B20_GeminiImagesElementItem"
    }
  }
}
```

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

`#/components/schemas/Response36Afe1097B20_SourceInfo`

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": [
        "string",
        "null"
      ],
      "description": "要素の種類"
    },
    "title": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>ソースのタイトル</em>"
    },
    "snippet": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>ソースの説明</em>"
    },
    "domain": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>SERP のソースドメイン</em>"
    },
    "url": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>ソース URL</em>"
    },
    "thumbnail": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>ソースのサムネイル</em>"
    },
    "source_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>ソース名</em>"
    },
    "publication_date": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>結果が公開された日時</em><br>形式：“year-month-date:minutes:UTC_difference_hours:UTC_difference_minutes”<br>例：<br><code class=\"long-string\">2019-11-15 12:57:46 +00:00</code>"
    },
    "markdown": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>markdown 形式の要素の内容</em><br><a href=\"https://en.wikipedia.org/wiki/Markdown\" target=\"_blank\">markdown マークアップ言語</a>でフォーマットされた結果の内容"
    }
  }
}
```
