Search Channels
curl --request POST \
--url https://api.reportify.cn/v1/channels/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"page_num": 1,
"page_size": 10
}
'import requests
url = "https://api.reportify.cn/v1/channels/search"
payload = {
"query": "<string>",
"page_num": 1,
"page_size": 10
}
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>', page_num: 1, page_size: 10})
};
fetch('https://api.reportify.cn/v1/channels/search', 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/channels/search",
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>',
'page_num' => 1,
'page_size' => 10
]),
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/channels/search"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"page_num\": 1,\n \"page_size\": 10\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/channels/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"page_num\": 1,\n \"page_size\": 10\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reportify.cn/v1/channels/search")
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 \"page_num\": 1,\n \"page_size\": 10\n}"
response = http.request(request)
puts response.read_body{
"channels": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"avatar_url": "<string>",
"following": false
}
],
"total_count": 0,
"total_page": 0,
"page_num": 1,
"page_size": 10
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}账号关注
Channels Search
Search for channels by query string
POST
/
v1
/
channels
/
search
Search Channels
curl --request POST \
--url https://api.reportify.cn/v1/channels/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"page_num": 1,
"page_size": 10
}
'import requests
url = "https://api.reportify.cn/v1/channels/search"
payload = {
"query": "<string>",
"page_num": 1,
"page_size": 10
}
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>', page_num: 1, page_size: 10})
};
fetch('https://api.reportify.cn/v1/channels/search', 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/channels/search",
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>',
'page_num' => 1,
'page_size' => 10
]),
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/channels/search"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"page_num\": 1,\n \"page_size\": 10\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/channels/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"page_num\": 1,\n \"page_size\": 10\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reportify.cn/v1/channels/search")
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 \"page_num\": 1,\n \"page_size\": 10\n}"
response = http.request(request)
puts response.read_body{
"channels": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"avatar_url": "<string>",
"following": false
}
],
"total_count": 0,
"total_page": 0,
"page_num": 1,
"page_size": 10
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}搜索账号
URL:/v1/channels/search方法:
POST描述: 根据条件搜索账号
请求参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| query | str | 搜索账号名关键词或者账号链接(现在支持公众号文章链接) |
| page_num | int | 当前页码,默认值为 1。 |
| page_size | int | 每页条目数,默认值为 10。 |
响应参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| page_num | int | 当前页码。 |
| page_size | int | 每页条目数。 |
| total_page | int | 总页数。 |
| total_count | int | 总条目数。 |
| channels | array | 文档数组,每个文档包含以下字段: |
| id | str | 账号唯一 ID。 |
| name | str | 账号名称。 |
| avatar_url | str | 账号头像。 |
| description | str | 账号描述。 |
| following | bool | 账号关注状态。 |
Authorizations
Enter your Bearer token
Body
application/json
⌘I
