Alexa Scraper
scraper.alexa アクターは、関連プロンプト、引用情報、メディアアセットを付加したAlexaの応答を返すため、市場間でモデルの回答性能をベンチマークできます。
リクエスト例
curl 'https://api.scrapeless.com/api/v2/scraper/request' \
--header 'Content-Type: application/json' \
--header 'x-api-token: {you_api_key}' \
--data '{
"actor": "scraper.alexa",
"input": {
"prompt": "Recommended attractions in New York",
"country": "US"
},
"webhook": {
"url": "http://www.youwebhook.com"
}
}'リクエストボディパラメータ
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
prompt | string | はい | Alexaに送信するプロンプト。 |
country | string | はい | 国または地域コード。 |
レスポンスフィールド
| パラメータ | 型 | 説明 |
|---|---|---|
user_text | string | ユーザーが送信した元のテキスト。 |
md_text | string | AlexaからのMarkdown形式の回答。 |
raw_text | string | Alexaからのプレーンテキスト形式の回答。 |
completed | bool | 回答の生成が完了したかどうか。 |
answer_fragment_uri | string | 回答フラグメントのURI。 |
answer_revision | int | 回答のリビジョン番号。 |
dialog_request_id | string | ダイアログリクエストの識別子。 |
endpoint_id | string | 応答したエンドポイント/デバイスの識別子。 |
fragment_count | int | 応答フラグメントの数。 |
conversation | object | 会話のコンテキスト。 |
conversation.id | string | 会話の識別子。 |
directives | array | インタラクション中に発行された処理ディレクティブ。 |
directives.name | string | ディレクティブ名(例:RequestProcessingStarted)。 |
directives.namespace | string | ディレクティブのネームスペース(例:InteractionModel)。 |
directives.message_id | string | ディレクティブメッセージの一意の識別子。 |
directives.dialog_request_id | string | ディレクティブに関連付けられたダイアログリクエストID。 |
directives.fragment_count | int | ディレクティブのフラグメント数。 |
references | array | 回答で参照された引用情報。 |
references.id | string | 引用識別子(例:cite_NWXekzs)。 |
references.title | string | 参照ソースのタイトル。 |
references.url | string | 参照ソースのURL。 |
sources | array | 回答の根拠となるソースリンク。 |
sources.text | string | ソースの表示テキスト(例:サイト名)。 |
sources.url | string | ソースのURL。 |
sources.type | string | ソースのタイプ(例:OpenURL)。 |
sources.fragment_uri | string | ソースフラグメントのURI。 |
suggestions | array | 推奨されるフォローアッププロンプト。 |
suggestions.text | string | 提案の表示テキスト。 |
suggestions.message | string | 提案が選択された際に送信されるメッセージ。 |
suggestions.type | string | 提案のタイプ(例:TextMessage)。 |
suggestions.fragment_uri | string | 提案フラグメントのURI。 |
products | array | Alexaから返される製品情報(該当しない場合は空)。 |
products.product_id | string | 製品識別子(例:Amazon ASIN)。 |
products.citation_id | string | 製品を回答にリンクする引用識別子。 |
products.title | string | 製品タイトル。 |
products.image_url | string | 製品画像のURL。 |
products.url | string | 製品ページのURL。 |
products.price | string | 表示価格(例:$989.95)。 |
products.delivery | string | 配送情報(例:Delivery by Tuesday, July 7)。 |
products.details | array | 詳細行のリスト(タイトル、価格、配送情報など)。 |
products.fragment_uri | string | 製品フラグメントのURI。 |
products.purpose | string | 製品エントリの目的(例:INFORMATION)。 |