Skip to main content
POST
/
v1
/
tools
/
timeline
/
companies
Companies Timeline
curl --request POST \
  --url https://api.reportify.cn/v1/tools/timeline/companies \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "num": 10,
  "page": 1
}
'
import requests

url = "https://api.reportify.cn/v1/tools/timeline/companies"

payload = {
"num": 10,
"page": 1
}
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({num: 10, page: 1})
};

fetch('https://api.reportify.cn/v1/tools/timeline/companies', 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/tools/timeline/companies",
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([
'num' => 10,
'page' => 1
]),
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/tools/timeline/companies"

payload := strings.NewReader("{\n \"num\": 10,\n \"page\": 1\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/tools/timeline/companies")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"num\": 10,\n \"page\": 1\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.reportify.cn/v1/tools/timeline/companies")

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 \"num\": 10,\n \"page\": 1\n}"

response = http.request(request)
puts response.read_body
{
  "docs": [],
  "total_count": 0,
  "took_ms": 0,
  "page": 1,
  "total_page": 0
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

关注公司时间线

URL: /v1/tools/timeline/companies
方法: POST
描述: 获取用户关注公司的最新动态时间线。

请求参数

参数名类型必填描述
numinteger返回结果数量,默认 10,范围 1-100

响应参数

参数名类型描述
docsarray文档列表
  doc_idstring文档 ID
  titlestring文档标题
  summarystring文档摘要
  categorystring文档类别
  published_atstring发布时间
  sourcestring来源
  channel_namestring渠道名称
  symbolsarray相关股票代码列表
total_countinteger匹配文档总数
took_msinteger查询耗时(毫秒)

请求示例

cURL
curl -X POST "https://api.reportify.cn/v1/tools/timeline/companies" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"num": 20}'
Python
import requests

url = "https://api.reportify.cn/v1/tools/timeline/companies"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
}
data = {"num": 20}

response = requests.post(url, headers=headers, json=data)
timeline = response.json()

for doc in timeline["docs"]:
    print(f"{doc['title']} - {doc['published_at']}")
TypeScript
const response = await fetch('https://api.reportify.cn/v1/tools/timeline/companies', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ num: 20 })
});

const data = await response.json();
console.log(`Found ${data.total_count} documents`);

响应示例

{
  "docs": [
    {
      "doc_id": "doc_abc123",
      "title": "Apple Q4 2024 Earnings Preview",
      "summary": "分析师预计苹果将在本季度实现...",
      "category": "reports",
      "published_at": "2024-01-15T08:00:00Z",
      "source": "Morgan Stanley",
      "channel_name": "Morgan Stanley Research",
      "symbols": ["US:AAPL"]
    }
  ],
  "total_count": 150,
  "took_ms": 45
}

错误响应

状态码描述
422请求参数验证失败

Authorizations

Authorization
string
header
required

Enter your Bearer token

Body

application/json

Request model for timeline tools

num
integer
default:10

Number of results to return

Required range: 1 <= x <= 100
page
integer
default:1

Page number, starting from 1

Required range: x >= 1

Response

Successful Response

Response model for timeline tools

docs
ToolAPIDocument · object[]

Timeline result documents

total_count
integer
default:0

Total number of matching documents

took_ms
integer
default:0

Timeline execution time in milliseconds

page
integer
default:1

Current page number

total_page
integer
default:0

Total number of pages