News Search
curl --request POST \
--url https://api.reportify.cn/v2/search/news \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"num": 10,
"symbols": [
"<string>"
],
"channel_ids": [
"<string>"
],
"start_datetime": "<string>",
"end_datetime": "<string>"
}
'import requests
url = "https://api.reportify.cn/v2/search/news"
payload = {
"query": "<string>",
"num": 10,
"symbols": ["<string>"],
"channel_ids": ["<string>"],
"start_datetime": "<string>",
"end_datetime": "<string>"
}
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>',
num: 10,
symbols: ['<string>'],
channel_ids: ['<string>'],
start_datetime: '<string>',
end_datetime: '<string>'
})
};
fetch('https://api.reportify.cn/v2/search/news', 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/v2/search/news",
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>',
'num' => 10,
'symbols' => [
'<string>'
],
'channel_ids' => [
'<string>'
],
'start_datetime' => '<string>',
'end_datetime' => '<string>'
]),
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/v2/search/news"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"num\": 10,\n \"symbols\": [\n \"<string>\"\n ],\n \"channel_ids\": [\n \"<string>\"\n ],\n \"start_datetime\": \"<string>\",\n \"end_datetime\": \"<string>\"\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/v2/search/news")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"num\": 10,\n \"symbols\": [\n \"<string>\"\n ],\n \"channel_ids\": [\n \"<string>\"\n ],\n \"start_datetime\": \"<string>\",\n \"end_datetime\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reportify.cn/v2/search/news")
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 \"num\": 10,\n \"symbols\": [\n \"<string>\"\n ],\n \"channel_ids\": [\n \"<string>\"\n ],\n \"start_datetime\": \"<string>\",\n \"end_datetime\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"docs": [
{
"doc_id": "<string>",
"title": "<string>",
"url": "<string>",
"summary": "<string>",
"category": "<string>",
"published_at": 123,
"companies": [
{
"name": "<string>",
"logo": "<string>",
"stocks": [
{
"symbol": "<string>",
"market": "<string>",
"code": "<string>"
}
]
}
],
"metadata": {},
"score": 123
}
],
"chunks": [],
"total_count": 0,
"took_ms": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}v2
News Search
Financial and investment news search, covering various public media content
POST
/
v2
/
search
/
news
News Search
curl --request POST \
--url https://api.reportify.cn/v2/search/news \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"num": 10,
"symbols": [
"<string>"
],
"channel_ids": [
"<string>"
],
"start_datetime": "<string>",
"end_datetime": "<string>"
}
'import requests
url = "https://api.reportify.cn/v2/search/news"
payload = {
"query": "<string>",
"num": 10,
"symbols": ["<string>"],
"channel_ids": ["<string>"],
"start_datetime": "<string>",
"end_datetime": "<string>"
}
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>',
num: 10,
symbols: ['<string>'],
channel_ids: ['<string>'],
start_datetime: '<string>',
end_datetime: '<string>'
})
};
fetch('https://api.reportify.cn/v2/search/news', 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/v2/search/news",
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>',
'num' => 10,
'symbols' => [
'<string>'
],
'channel_ids' => [
'<string>'
],
'start_datetime' => '<string>',
'end_datetime' => '<string>'
]),
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/v2/search/news"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"num\": 10,\n \"symbols\": [\n \"<string>\"\n ],\n \"channel_ids\": [\n \"<string>\"\n ],\n \"start_datetime\": \"<string>\",\n \"end_datetime\": \"<string>\"\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/v2/search/news")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"num\": 10,\n \"symbols\": [\n \"<string>\"\n ],\n \"channel_ids\": [\n \"<string>\"\n ],\n \"start_datetime\": \"<string>\",\n \"end_datetime\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reportify.cn/v2/search/news")
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 \"num\": 10,\n \"symbols\": [\n \"<string>\"\n ],\n \"channel_ids\": [\n \"<string>\"\n ],\n \"start_datetime\": \"<string>\",\n \"end_datetime\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"docs": [
{
"doc_id": "<string>",
"title": "<string>",
"url": "<string>",
"summary": "<string>",
"category": "<string>",
"published_at": 123,
"companies": [
{
"name": "<string>",
"logo": "<string>",
"stocks": [
{
"symbol": "<string>",
"market": "<string>",
"code": "<string>"
}
]
}
],
"metadata": {},
"score": 123
}
],
"chunks": [],
"total_count": 0,
"took_ms": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}新闻搜索
URL:/v2/search/news方法:
POST描述: 搜索新闻文章和市场动态。
请求参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| query | str | 是 | 搜索关键词。 |
| symbols | array[str] | 否 | 股票代码列表,格式为 market:ticker(如 US:AAPL、HK:00700、SH:600519、SZ:000001)。 |
| channel_ids | array[str] | 否 | 频道 ID 列表,用于筛选特定来源的新闻。 |
| num | int | 否 | 返回的结果数量,默认值为 10,最大值为 100。 |
| start_datetime | str | 否 | 开始时间,格式为 YYYY-MM-DD 或 YYYY-MM-DD HH:MM:SS。 |
| end_datetime | str | 否 | 结束时间,格式为 YYYY-MM-DD 或 YYYY-MM-DD HH:MM:SS。 |
响应参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| docs | array | 搜索结果文档数组,每个文档包含以下字段: |
| doc_id | str | 文档唯一 ID。 |
| title | str | 文档标题。 |
| summary | str | 文档摘要。 |
| category | str | 文档类别。 |
| published_at | int | 发布时间(毫秒级时间戳)。 |
| companies | array | 相关公司列表。 |
| metadata | object | 文档元数据。 |
| score | number | 相关性评分。 |
| url | str | 文档链接。 |
| total_count | int | 匹配文档总数。 |
| took_ms | int | 搜索执行时间(毫秒)。 |
请求示例
cURLcurl -X POST https://api.reportify.cn/v2/search/news \
-H "Authorization: Bearer 447460****09c9" \
-H "Content-Type: application/json" \
-d '{
"query": "芯片出口管制",
"symbols": ["US:NVDA", "US:AMD"],
"num": 10,
"start_datetime": "2024-01-01",
"end_datetime": "2024-12-31"
}'
import requests
url = "https://api.reportify.cn/v2/search/news"
headers = {
"Authorization": "Bearer 447460****09c9",
"Content-Type": "application/json"
}
payload = {
"query": "芯片出口管制",
"symbols": ["US:NVDA", "US:AMD"],
"num": 10,
"start_datetime": "2024-01-01",
"end_datetime": "2024-12-31"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
响应示例
{
"docs": [
{
"doc_id": "1046915273103380485",
"title": "美国加强对华芯片出口管制,NVIDIA 股价承压",
"summary": "### 新闻要点\n- 美国商务部宣布新一轮芯片出口管制措施\n- NVIDIA 等芯片公司股价受到影响\n...",
"category": "news",
"published_at": 1730390400000,
"companies": [
{
"name": "NVIDIA Corporation",
"stocks": [
{
"code": "NVDA",
"market": "US",
"symbol": "US:NVDA"
}
]
}
],
"metadata": {
"report_type": 4,
"report_status": 2,
"report_scope": 1,
"report_language": "zh"
},
"score": 0.9634,
"url": "https://reportify.cn/news/1046915273103380485"
}
],
"total_count": 1,
"took_ms": 78
}
错误响应
| HTTP 状态码 | 描述 |
|---|---|
| 422 | 请求参数验证错误 |
Authorizations
Enter your Bearer token
Body
application/json
Request model for news search
Search query
Number of results to return
Required range:
1 <= x <= 100Stock symbols in market:ticker format (e.g., US:AAPL, HK:00700, SH:600519, SZ:000001)
Channel IDs to filter by
Start datetime in YYYY-MM-DD or YYYY-MM-DD HH:MM:SS format
End datetime in YYYY-MM-DD or YYYY-MM-DD HH:MM:SS format
Response
Successful Response
Response model for all search tools
Search result documents
Show child attributes
Show child attributes
Search result content chunks (parity with the internal search tools). Empty for news and webpages searches.
Total number of matching documents
Search execution time in milliseconds
