リサーチタスクの結果一覧を取得
リサーチタスクがこれまでに書き込んだ結果を、sequence の昇順で一覧表示します。
タスクが書き込む結果は最大 2 つです。利用可能な場合は検索のチェックポイントが書き込まれ、その後に最終結果が続きます。answer は最後の結果で確認してください。早期に停止したタスクには、結果がない場合があります。
計画、作成、ポーリング、結果の読み取りの流れについては、リサーチタスクの実行 を参照してください。
1 min read
get/knowledge-fs/spaces/{knowledge_base_id}/research-tasks/{research_task_id}/partials
Request example
curl --request GET \
--url https://api.dify.ai/v1/knowledge-fs/spaces/{knowledge_base_id}/research-tasks/{research_task_id}/partials \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dify.ai/v1/knowledge-fs/spaces/{knowledge_base_id}/research-tasks/{research_task_id}/partials"
headers = {
"Authorization": "Bearer <token>",
}
response = requests.request("GET", url, headers=headers)
print(response.text)const response = await fetch('https://api.dify.ai/v1/knowledge-fs/spaces/{knowledge_base_id}/research-tasks/{research_task_id}/partials', {
method: 'GET',
headers: {
'Authorization': 'Bearer <token>'
}
});
const data = await response.json();
console.log(data);<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.dify.ai/v1/knowledge-fs/spaces/{knowledge_base_id}/research-tasks/{research_task_id}/partials',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer <token>',
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.dify.ai/v1/knowledge-fs/spaces/{knowledge_base_id}/research-tasks/{research_task_id}/partials"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.dify.ai/v1/knowledge-fs/spaces/{knowledge_base_id}/research-tasks/{research_task_id}/partials"))
.header("Authorization", "Bearer <token>")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());require 'uri'
require 'net/http'
url = URI('https://api.dify.ai/v1/knowledge-fs/spaces/{knowledge_base_id}/research-tasks/{research_task_id}/partials')
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = url.scheme == 'https'
request = Net::HTTP::Get.new(url)
request['Authorization'] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyResponse
{
"data": [
{
"answer": null,
"evidence_bundle": {
"createdAt": "2026-09-06T08:00:10.000Z",
"id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
"items": [
{
"citations": [
{
"documentAssetId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"documentVersion": 1,
"pageNumber": 2,
"sectionPath": [
"Policies",
"Refunds"
]
}
],
"conflicts": [],
"freshness": {
"sourceUpdatedAt": "2026-08-30T09:12:00.000Z",
"status": "fresh"
},
"metadata": {},
"nodeId": "5d4c3b2a-1f0e-4d9c-8b7a-6f5e4d3c2b1a",
"score": 0.82,
"scores": {
"final": 0.82,
"rerank": 0.85,
"retrieval": 0.71
},
"text": "From 1 March 2025, refunds are issued within 14 days of the return being received. The previous window was 30 days."
},
{
"citations": [
{
"documentAssetId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"documentVersion": 1,
"pageNumber": 3,
"sectionPath": [
"Policies",
"Refunds",
"Regional exceptions"
]
}
],
"conflicts": [],
"freshness": {
"sourceUpdatedAt": "2026-08-30T09:12:00.000Z",
"status": "fresh"
},
"metadata": {},
"nodeId": "c3b2a1f0-e9d8-4c7b-8a6f-5e4d3c2b1a09",
"score": 0.77,
"scores": {
"final": 0.77,
"rerank": 0.8,
"retrieval": 0.66
},
"text": "The 14-day window applies to orders shipped to the EU and the UK. Other regions keep the 30-day window until further notice."
}
],
"missingEvidence": [],
"query": "What changed in the 2025 refund policy, and which regions are affected?",
"state": "partial"
},
"knowledge_space_id": "b2f1d3a4-5e6c-4a7b-8c9d-0e1f2a3b4c5d",
"research_task_job_id": "e4d1b7a2-3c5f-4d8e-9a0b-1c2d3e4f5a6b",
"sequence": 1
},
{
"answer": "The 2025 policy shortened the refund window from 30 days to 14 days after the return is received, effective 1 March 2025. The change applies to orders shipped to the EU and the UK; other regions keep the 30-day window.",
"evidence_bundle": {
"createdAt": "2026-09-06T08:00:41.000Z",
"id": "1f2e3d4c-5b6a-4978-8a7b-6c5d4e3f2a1b",
"items": [
{
"citations": [
{
"artifactHash": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"documentAssetId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"documentVersion": 1,
"endOffset": 1978,
"pageNumber": 2,
"sectionPath": [
"Policies",
"Refunds"
],
"startOffset": 1840
}
],
"conflicts": [
{
"reason": "States a 14-day window while another chunk keeps 30 days for some regions.",
"severity": "info",
"withNodeId": "c3b2a1f0-e9d8-4c7b-8a6f-5e4d3c2b1a09"
}
],
"freshness": {
"observedAt": "2026-09-06T08:00:12.000Z",
"sourceUpdatedAt": "2026-08-30T09:12:00.000Z",
"status": "fresh"
},
"metadata": {},
"nodeId": "5d4c3b2a-1f0e-4d9c-8b7a-6f5e4d3c2b1a",
"score": 0.82,
"scores": {
"final": 0.82,
"freshness": 0.9,
"rerank": 0.85,
"retrieval": 0.71
},
"text": "From 1 March 2025, refunds are issued within 14 days of the return being received. The previous window was 30 days."
},
{
"citations": [
{
"documentAssetId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"documentVersion": 1,
"pageNumber": 3,
"sectionPath": [
"Policies",
"Refunds",
"Regional exceptions"
]
}
],
"conflicts": [],
"freshness": {
"observedAt": "2026-09-06T08:00:12.000Z",
"sourceUpdatedAt": "2026-08-30T09:12:00.000Z",
"status": "fresh"
},
"metadata": {},
"nodeId": "c3b2a1f0-e9d8-4c7b-8a6f-5e4d3c2b1a09",
"score": 0.77,
"scores": {
"final": 0.77,
"freshness": 0.9,
"rerank": 0.8,
"retrieval": 0.66
},
"text": "The 14-day window applies to orders shipped to the EU and the UK. Other regions keep the 30-day window until further notice."
}
],
"missingEvidence": [
{
"expectedEvidenceId": "7e6d5c4b-3a29-4180-9f8e-7d6c5b4a3928",
"metadata": {},
"reason": "not-retrieved",
"text": "No chunk lists the effective date for regions outside the EU and the UK."
}
],
"query": "What changed in the 2025 refund policy, and which regions are affected?",
"retrievalQuery": "2025 refund policy changes refund window regions affected",
"state": "answerable"
},
"knowledge_space_id": "b2f1d3a4-5e6c-4a7b-8c9d-0e1f2a3b4c5d",
"research_task_job_id": "e4d1b7a2-3c5f-4d8e-9a0b-1c2d3e4f5a6b",
"sequence": 2
}
],
"next_cursor": null
}{
"code": "knowledge_fs_invalid_request",
"message": "Agent Knowledge Base request is invalid.",
"status": 400,
"violations": [
{
"field": [
"limit"
],
"type": "less_than_equal"
}
]
}{
"code": "knowledge_fs_invalid_request",
"message": "Agent Knowledge Base request is invalid.",
"status": 400
}{
"code": "knowledge_fs_invalid_credential",
"message": "Invalid Agent Knowledge Base service credential.",
"status": 401
}{
"code": "unauthorized",
"message": "Access token is invalid",
"status": 401
}{
"code": "forbidden",
"message": "Sorry, you have reached the knowledge base request rate limit of your subscription.",
"status": 403
}{
"code": "knowledge_fs_access_denied",
"message": "Agent Knowledge Base operation is not allowed.",
"status": 403
}{
"code": "knowledge_fs_access_denied",
"failure": {
"action": "contact_admin",
"category": "authorization",
"code": "KNOWLEDGE_FS_ACCESS_DENIED",
"message": "You do not have permission to perform this Agent Knowledge Base operation.",
"retryPolicy": "never",
"traceId": "602b9b60-6564-4ba7-8b59-54312d41377c"
},
"message": "You do not have permission to perform this Agent Knowledge Base operation.",
"status": 403
}{
"code": "knowledge_fs_resource_not_found",
"failure": {
"category": "not_found",
"code": "KNOWLEDGE_FS_NOT_FOUND",
"message": "The requested Agent Knowledge Base resource was not found.",
"retryPolicy": "never",
"traceId": "ca5eb2d9-4242-4950-877c-6c5207b1441e"
},
"message": "The requested Agent Knowledge Base resource was not found.",
"status": 404
}{
"code": "not_found",
"message": "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.",
"status": 404
}{
"code": "knowledge_fs_upstream_unavailable",
"message": "Agent Knowledge Base is unavailable.",
"status": 502
}{
"code": "knowledge_fs_operation_unavailable",
"message": "Agent Knowledge Base operation is not available.",
"status": 503
}{
"code": "knowledge_fs_operation_unavailable",
"failure": {
"action": "retry",
"category": "dependency",
"code": "KNOWLEDGE_FS_UNAVAILABLE",
"message": "A service required by Agent Knowledge Base is temporarily unavailable.",
"retryPolicy": "manual",
"traceId": "5e2a9c17-3b4d-4f60-8a1b-2c3d4e5f6a7b"
},
"message": "A service required by Agent Knowledge Base is temporarily unavailable.",
"status": 503
}get/knowledge-fs/spaces/{knowledge_base_id}/research-tasks/{research_task_id}/partials
Authorization
すべてのリクエストは API キーで認証します:Authorization: Bearer {API_KEY}。アプリのエンドポイントにはアプリの API キーを、ナレッジのエンドポイントにはナレッジベースの API キーを使用します(Dify API クイックスタート)。
キーはサーバーサイドで保管し、クライアントコードには決して埋め込まないでください。キーが欠落または無効なリクエストは HTTP 401(unauthorized)で失敗します。
Path parameters
ナレッジベース ID です。ナレッジベースの API アクセス ダイアログに表示されるサービス API エンドポイントの最後のセグメント(
…/knowledge-fs/spaces/<knowledge base ID>)です。アドレスバーでは /datasets/new/ の後のセグメントです。リサーチタスク ID です。リサーチタスクを作成 から取得します。
Query parameters
Responses
application/json
1 ページ分の結果です。
結果です。
sequence の昇順に並びます。Show child attributesHide child attributes
タスクの回答です。最終結果にのみ設定され、検索のチェックポイントでは
null です。この結果が書き込まれた時点までにタスクが収集した、検索されたチャンクです。
検索後にドキュメントファイルが削除された項目は、プレースホルダーとして返されます。
textはEvidence deleted or unavailableです。citations[]にはdocumentAssetId、documentVersion、空のsectionPathのみが残ります。conflictsは空です。freshness.statusはunknownです。metadata.traceEvidenceAvailabilityは{"status": "unavailable", "reason": "document-deleted-or-unavailable"}です。
Show child attributesHide child attributes
バンドルが書き込まれた日時(ISO 8601 タイムスタンプ)です。
検索されたチャンクのこのバンドルの ID です。
検索されたチャンクと、そのスコアおよび引用です。評価の高い順に並びます。
Show child attributesHide child attributes
チャンクの出典です。各項目に 1 つ以上あります。
Show child attributesHide child attributes
引用が指すドキュメントファイルの SHA-256 です。記録されていない場合は含まれません。
ドキュメントファイル ID です。ファイル名は ドキュメントファイルを取得 で確認できます。対応するドキュメントを調べるには、この値を
documentVersion とともに ファイルからドキュメントを取得 に渡してください。検索時点でのドキュメントファイルの
version です。解析済みドキュメントテキスト内の 0 始まりの UTF-8 バイトオフセットです。終了位置を表し、この位置自体は範囲に含みません。取得できない場合は省略されます。
ソースがページ情報を提供する場合のページ番号で、1 から始まります。それ以外の場合は省略されます。
ドキュメントのルートから、引用されたセクションまでのセクション見出しです。
解析済みドキュメントテキスト内の 0 始まりの UTF-8 バイトオフセットです。開始位置を表し、この位置自体を範囲に含みます。取得できない場合は省略されます。
このチャンクと、ほかの検索されたチャンクとの間の矛盾です。ない場合は空です。
引用されたコンテンツがどの程度新しいかを示します。
項目の追加情報です。プレースホルダー項目では
traceEvidenceAvailability を含みます。検索されたチャンクの ID です。
0 から 1 までの総合的な関連度です。scores.final と同じ値です。スコアの内訳です。それぞれ
0 から 1 までの値です。チャンクのテキストです。
実行で想定されていたものの、使用できなかったチャンクです。ない場合は空です。
リサーチの質問です。
query と異なる場合に、実際に検索に送られたクエリテキストです。それ以外の場合は含まれません。検索されたチャンクが回答をどの程度裏付けているかを示します。
partial(分析の実行前の、検索のチェックポイント)、answerable、not-enough-evidence、conflict(ソース間で内容が食い違う)、permission-limited(権限により一部のチャンクが除外された)のいずれかです。ナレッジベースの内部 ID です。パスのナレッジベース ID とは異なります。
リサーチタスク ID です。
タスク内での結果の位置で、
1 から始まります。次のページのカーソルです。最後のページでは
null です。cursor として送り返してください。