Skip to main content
GET
/
v1
/
institutions
List Institutions
curl --request GET \
  --url https://api.reportify.cn/v1/institutions \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.reportify.cn/v1/institutions"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.reportify.cn/v1/institutions', 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/institutions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.reportify.cn/v1/institutions"

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))

}
HttpResponse<String> response = Unirest.get("https://api.reportify.cn/v1/institutions")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.reportify.cn/v1/institutions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "total_count": 0,
  "total_page": 0,
  "page_num": 1,
  "page_size": 50,
  "institutions": [
    {
      "id": "<string>",
      "name": "<string>"
    }
  ]
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

机构列表

URL: /v1/institutions 方法: GET
描述: 获取研究机构列表(可按名称过滤)。返回的 name 即为在文档搜索中传入 institutions[] 过滤条件的取值。

请求参数

参数名类型必填描述
querystr机构名称过滤,不区分大小写。
page_numint页码,默认 1
page_sizeint每页数量,默认 50

响应参数

参数名类型描述
total_countint机构总数。
total_pageint总页数。
page_numint当前页码。
page_sizeint每页数量。
institutionsarray机构列表。
  idstr机构 ID(symbol)。
  namestr机构名称,将其作为 institutions[] 搜索过滤条件的取值传入。

请求示例

cURL
curl -X GET "https://api.reportify.cn/v1/institutions?query=中金&page_num=1&page_size=50" \
-H "Authorization: Bearer YOUR_API_KEY"
Python
import requests

url = "https://api.reportify.cn/v1/institutions"
headers = {
    "Authorization": "Bearer YOUR_API_KEY"
}
params = {
    "query": "中金",
    "page_num": 1,
    "page_size": 50,
}

response = requests.get(url, headers=headers, params=params)
print(response.json())

响应示例

{
  "total_count": 1,
  "total_page": 1,
  "page_num": 1,
  "page_size": 50,
  "institutions": [
    {
      "id": "cicc",
      "name": "中国国际金融股份有限公司"
    }
  ]
}
将响应中的 name 字段值传入文档搜索接口的 institutions[] 过滤条件,即可按该机构筛选研报。

错误响应

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

Authorizations

Authorization
string
header
required

Enter your Bearer token

Query Parameters

query
string

Case-insensitive institution name filter

page_num
integer
default:1
page_size
integer
default:50

Response

Successful Response

total_count
integer
default:0
total_page
integer
default:0
page_num
integer
default:1
page_size
integer
default:50
institutions
OAIInstitutionResponse · object[]