Search Chunks
curl --request POST \
--url https://api.reportify.cn/v1/search/chunks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"folder_ids": [],
"doc_ids": [],
"categories": [
"financials",
"transcripts",
"reports",
"news",
"filings",
"socials"
],
"markets": [],
"institutions": [],
"symbols": [],
"tags": {},
"start_date": "<string>",
"end_date": "<string>",
"min_score": 123,
"extended_filters": [
{}
],
"num": 10,
"include_doc_extra_details": false,
"refine_question": false
}
'import requests
url = "https://api.reportify.cn/v1/search/chunks"
payload = {
"query": "<string>",
"folder_ids": [],
"doc_ids": [],
"categories": ["financials", "transcripts", "reports", "news", "filings", "socials"],
"markets": [],
"institutions": [],
"symbols": [],
"tags": {},
"start_date": "<string>",
"end_date": "<string>",
"min_score": 123,
"extended_filters": [{}],
"num": 10,
"include_doc_extra_details": False,
"refine_question": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
folder_ids: [],
doc_ids: [],
categories: ['financials', 'transcripts', 'reports', 'news', 'filings', 'socials'],
markets: [],
institutions: [],
symbols: [],
tags: {},
start_date: '<string>',
end_date: '<string>',
min_score: 123,
extended_filters: [{}],
num: 10,
include_doc_extra_details: false,
refine_question: false
})
};
fetch('https://api.reportify.cn/v1/search/chunks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.reportify.cn/v1/search/chunks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => '<string>',
'folder_ids' => [
],
'doc_ids' => [
],
'categories' => [
'financials',
'transcripts',
'reports',
'news',
'filings',
'socials'
],
'markets' => [
],
'institutions' => [
],
'symbols' => [
],
'tags' => [
],
'start_date' => '<string>',
'end_date' => '<string>',
'min_score' => 123,
'extended_filters' => [
[
]
],
'num' => 10,
'include_doc_extra_details' => false,
'refine_question' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.reportify.cn/v1/search/chunks"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"folder_ids\": [],\n \"doc_ids\": [],\n \"categories\": [\n \"financials\",\n \"transcripts\",\n \"reports\",\n \"news\",\n \"filings\",\n \"socials\"\n ],\n \"markets\": [],\n \"institutions\": [],\n \"symbols\": [],\n \"tags\": {},\n \"start_date\": \"<string>\",\n \"end_date\": \"<string>\",\n \"min_score\": 123,\n \"extended_filters\": [\n {}\n ],\n \"num\": 10,\n \"include_doc_extra_details\": false,\n \"refine_question\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.reportify.cn/v1/search/chunks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"folder_ids\": [],\n \"doc_ids\": [],\n \"categories\": [\n \"financials\",\n \"transcripts\",\n \"reports\",\n \"news\",\n \"filings\",\n \"socials\"\n ],\n \"markets\": [],\n \"institutions\": [],\n \"symbols\": [],\n \"tags\": {},\n \"start_date\": \"<string>\",\n \"end_date\": \"<string>\",\n \"min_score\": 123,\n \"extended_filters\": [\n {}\n ],\n \"num\": 10,\n \"include_doc_extra_details\": false,\n \"refine_question\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reportify.cn/v1/search/chunks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"folder_ids\": [],\n \"doc_ids\": [],\n \"categories\": [\n \"financials\",\n \"transcripts\",\n \"reports\",\n \"news\",\n \"filings\",\n \"socials\"\n ],\n \"markets\": [],\n \"institutions\": [],\n \"symbols\": [],\n \"tags\": {},\n \"start_date\": \"<string>\",\n \"end_date\": \"<string>\",\n \"min_score\": 123,\n \"extended_filters\": [\n {}\n ],\n \"num\": 10,\n \"include_doc_extra_details\": false,\n \"refine_question\": false\n}"
response = http.request(request)
puts response.read_body{
"chunks": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}v1
Search Chunks
Perform semantic search on document chunks based on specified criteria.
POST
/
v1
/
search
/
chunks
Search Chunks
curl --request POST \
--url https://api.reportify.cn/v1/search/chunks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"folder_ids": [],
"doc_ids": [],
"categories": [
"financials",
"transcripts",
"reports",
"news",
"filings",
"socials"
],
"markets": [],
"institutions": [],
"symbols": [],
"tags": {},
"start_date": "<string>",
"end_date": "<string>",
"min_score": 123,
"extended_filters": [
{}
],
"num": 10,
"include_doc_extra_details": false,
"refine_question": false
}
'import requests
url = "https://api.reportify.cn/v1/search/chunks"
payload = {
"query": "<string>",
"folder_ids": [],
"doc_ids": [],
"categories": ["financials", "transcripts", "reports", "news", "filings", "socials"],
"markets": [],
"institutions": [],
"symbols": [],
"tags": {},
"start_date": "<string>",
"end_date": "<string>",
"min_score": 123,
"extended_filters": [{}],
"num": 10,
"include_doc_extra_details": False,
"refine_question": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
folder_ids: [],
doc_ids: [],
categories: ['financials', 'transcripts', 'reports', 'news', 'filings', 'socials'],
markets: [],
institutions: [],
symbols: [],
tags: {},
start_date: '<string>',
end_date: '<string>',
min_score: 123,
extended_filters: [{}],
num: 10,
include_doc_extra_details: false,
refine_question: false
})
};
fetch('https://api.reportify.cn/v1/search/chunks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.reportify.cn/v1/search/chunks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => '<string>',
'folder_ids' => [
],
'doc_ids' => [
],
'categories' => [
'financials',
'transcripts',
'reports',
'news',
'filings',
'socials'
],
'markets' => [
],
'institutions' => [
],
'symbols' => [
],
'tags' => [
],
'start_date' => '<string>',
'end_date' => '<string>',
'min_score' => 123,
'extended_filters' => [
[
]
],
'num' => 10,
'include_doc_extra_details' => false,
'refine_question' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.reportify.cn/v1/search/chunks"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"folder_ids\": [],\n \"doc_ids\": [],\n \"categories\": [\n \"financials\",\n \"transcripts\",\n \"reports\",\n \"news\",\n \"filings\",\n \"socials\"\n ],\n \"markets\": [],\n \"institutions\": [],\n \"symbols\": [],\n \"tags\": {},\n \"start_date\": \"<string>\",\n \"end_date\": \"<string>\",\n \"min_score\": 123,\n \"extended_filters\": [\n {}\n ],\n \"num\": 10,\n \"include_doc_extra_details\": false,\n \"refine_question\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.reportify.cn/v1/search/chunks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"folder_ids\": [],\n \"doc_ids\": [],\n \"categories\": [\n \"financials\",\n \"transcripts\",\n \"reports\",\n \"news\",\n \"filings\",\n \"socials\"\n ],\n \"markets\": [],\n \"institutions\": [],\n \"symbols\": [],\n \"tags\": {},\n \"start_date\": \"<string>\",\n \"end_date\": \"<string>\",\n \"min_score\": 123,\n \"extended_filters\": [\n {}\n ],\n \"num\": 10,\n \"include_doc_extra_details\": false,\n \"refine_question\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reportify.cn/v1/search/chunks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"folder_ids\": [],\n \"doc_ids\": [],\n \"categories\": [\n \"financials\",\n \"transcripts\",\n \"reports\",\n \"news\",\n \"filings\",\n \"socials\"\n ],\n \"markets\": [],\n \"institutions\": [],\n \"symbols\": [],\n \"tags\": {},\n \"start_date\": \"<string>\",\n \"end_date\": \"<string>\",\n \"min_score\": 123,\n \"extended_filters\": [\n {}\n ],\n \"num\": 10,\n \"include_doc_extra_details\": false,\n \"refine_question\": false\n}"
response = http.request(request)
puts response.read_body{
"chunks": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}文档块搜索
URL:/v1/search/chunks方法:
POST描述: 根据指定条件进行语义搜索文档内容块,通常用于 RAG 场景,支持按文档内容或相关字段搜索。
请求参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| query | str | 搜索关键词。 |
| doc_ids | array[str] | 指定的文档 ID 列表,如 ["1046915273103380480", "1046522679340961792"]。 |
| folder_ids | array[str] | 指定的文件夹 ID 列表,如 ["2046915273103380480", "2046522679340961792"]。 |
| categories | array | 文档类别(默认不包含 files),可选值有 financials,transcripts,reports(国内研报),global_research(外资研报),filings,news, socials,files。 |
| institutions | array | 指定机构筛选,如 Morgan Stanley,Seeking Alpha。暂未支持 |
| markets | array | 市场区域,默认包括所有市场。可选值有 sz, sh, hk, us。 |
| symbols | array | 股票代码列表,格式为 market:ticker(如 US:AAPL、HK:00700、SH:600519、SZ:000001)。 |
| tags | dict | 标签数组。 |
| key | str | 标签类型(如 industry, company, person, event)。 |
| value | array | 标签内容数组。 |
| start_date | str | 开始日期,格式为 YYYY-MM-DD。 |
| end_date | str | 结束日期,格式为 YYYY-MM-DD。 |
| num | int | 返回的结果数量,默认值为 10。 |
| include_doc_extra_detail | boolean | 是否包含文档详细信息,默认值为 false(只返回文档 id,title,url 字段)。 |
- 当 categories 为
files时,可以通过指定tags参数来筛选上传的文件(上传时制定了相应的tags)。
响应参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| chunks | array | 内容块数组,每个块包含以下字段: |
| id | str | 内容块唯一 ID。 |
| type | str | 内容类型,可能的值为 text,table,image,formula。 |
| media_url | str | 内容块的媒体文件链接(如果类型为 table,image,formula 时提供图片链接)。 |
| content | str | 内容原始文本(适用于 text 或 table 类型)。 |
| summary | str | 解析内容,适用于 table,image,formula 类型。 |
| doc | dict | 文档信息(当 include_doc_extra_detail 为 true 时包含以下字段): |
| id | str | 文档唯一 ID。 |
| title | str | 文档标题。 |
| url | str | 文档网页链接。 |
| institution | str | 发布机构。 |
| author | str | 作者。 |
| published_at | str | 发布时间,格式为 YYYY-MM-DDTHH:MM:SS.000Z。 |
| category | str | 文档类别(financials, transcripts, reports, global_research, filings, news, socials, files)。 |
| market | str | 市场区域(cn, hk, us)。 |
| symbol | str | 股票代码。 |
| company_name | str | 公司名称。 |
| logo | str | 公司 Logo 链接。 |
| summary | str | 文档摘要。 |
| tags | dict | 标签字典,包含以下字段: |
| key | str | 标签类型(如 industry,company,person,event)。 |
| value | array | 标签内容数组。 |
| metadatas | dict | 元数据字典,包含以下字段: |
| key | str | 元数据类型(如 periods,entities)。 |
| value | array | 元数据内容数组。 |
请求示例
cURLcurl -X POST https://api.reportify.cn/v1/search/chunks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "AI in finance",
"doc_ids": ["1046915273103380480", "1046522679340961792"],
"categories": ["financials", "reports"],
"markets": ["us"],
"symbols": ["AAPL"],
"start_date": "2023-01-01",
"end_date": "2023-12-31",
"num": 5,
"include_doc_extra_detail": true
}'
import requests
url = "https://api.reportify.cn/v1/search/chunks"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"query": "AI in finance",
"doc_ids": ["1046915273103380480", "1046522679340961792"],
"categories": ["financials", "reports"],
"markets": ["us"],
"symbols": ["AAPL"],
"start_date": "2023-01-01",
"end_date": "2023-12-31",
"num": 5,
"include_doc_extra_detail": True
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
响应示例
{
"chunks": [
{
"id": "448902339012",
"type": "text",
"media_url": "",
"content": "AI in finance is transforming the industry...",
"summary": "",
"doc": {
"id": "1046915273103380480",
"title": "AI in Finance Report",
"url": "https://reportify.cn/financials/1046895208953942016",
"file_url": "https://files.reportify.cn/media/production/TSLA5a08ddfbb97bd6486fff7a3875e7fe28_20241024183012.pdf",
"media_url": "https://files.reportify.cn/media/production/s_4728833_9e25b61b62960211e6040eb2b81b352c.mp3",
"institution": "Morgan Stanley",
"author": "Jane Doe",
"published_at": "2023-12-31T00:00:00.000Z",
"category": "reports",
"type": "research_report_company",
"market": "us",
"symbol": "AAPL",
"company_name": "Apple Inc.",
"logo": "https://files.reportify.cn/logo/AAPL.svg",
"summary": "This report provides an overview of AI applications in finance...",
"tags": {
"industry": [
"AI",
"EV"
],
"company": [
"Tesla"
]
},
"metadatas": {
"periods": "Q4 2023",
"entities": [
"Tesla Inc.",
"TSLA"
]
}
}
},
{
"id": "448902339013",
"type": "table",
"media_url": "https://files.reportify.cn/media/production/447460783945158/520072899438150/605401659404358/element/4.jpg",
"content": "",
"summary": "Financial data for AI companies in 2023",
"doc": {
"id": "1046915273103380480",
"title": "AI in Finance Report",
"url": "https://reportify.cn/financials/1046895208953942016",
"file_url": "https://files.reportify.cn/media/production/TSLA5a08ddfbb97bd6486fff7a3875e7fe28_20241024183012.pdf",
"media_url": "https://files.reportify.cn/media/production/s_4728833_9e25b61b62960211e6040eb2b81b352c.mp3",
"institution": "Morgan Stanley",
"author": "Jane Doe",
"published_at": "2023-12-31T00:00:00.000Z",
"category": "reports",
"type": "research_report_company",
"market": "us",
"symbol": "AAPL",
"company_name": "Apple Inc.",
"logo": "https://files.reportify.cn/logo/AAPL.svg",
"summary": "This report provides an overview of AI applications in finance...",
"tags": {
"industry": [
"AI",
"EV"
],
"company": [
"Tesla"
]
},
"metadatas": {
"periods": "Q4 2023",
"entities": [
"Tesla Inc.",
"TSLA"
]
}
}
}
]
}
Authorizations
Enter your Bearer token
Body
application/json
An enumeration.
Available options:
financials, transcripts, reports, news, files, filings, socials, global_research An enumeration.
Available options:
cn, hk, us Show child attributes
Show child attributes
An enumeration.
Available options:
h, d, w, m, y Response
Successful Response
Show child attributes
Show child attributes
⌘I
