接口详情
新闻
- 接口 ID
- getlist-pcnewsflash
- 分组
- 资讯题材
- 调用地址
- /v1/endpoints/getlist-pcnewsflash/call
可传参数
| 参数 | 名称 | 说明 | 必填 | 类型 | 示例值 |
|---|---|---|---|---|---|
| page_offset | 分页起点 | 分页偏移量。第一页通常为 0,后续页按接口的分页步长递增。 | 否 | string | 0 |
| type | 类型 | 接口业务类型或分类值。不同接口含义不同,默认使用示例值。 | 否 | string | 0 |
在线测试
在线测试需要登录,会使用控制台中的默认 API Key 并计入用量。
响应结构
基于最近一次接口体检样本自动生成,仅展示主要字段。
| 字段路径 | 类型 | 样例值 |
|---|---|---|
| List[].AiRate | null | null |
| List[].CID | string | 1720821 |
| List[].Content | string | 【印度马哈拉施特拉邦至少21人因饮用私酿劣质酒死亡】根据印度警方5月31日最新通报,近日该国马哈拉施特拉邦有21人因... |
| List[].IsSDXZ | string | 0 |
| List[].PushUrl | string | |
| List[].Source | string | 界面新闻 |
| List[].Time | string | 1780202838 |
| List[].Title | string | 印度马哈拉施特拉邦至少21人因饮用私酿劣质酒死亡 |
| List[].Type | string | 0 |
| List[].ai_rate | string | -- |
| List[].ai_read | string | 0 |
| List[].list_data1 | string | |
| List[].list_data2 | string | |
| List[].status | string | 2 |
| Time | integer | 1780203019 |
| errcode | string | 0 |
| t | number | 0.023700000000000054 |
调用示例
curl -X POST http://127.0.0.1:8080/v1/endpoints/getlist-pcnewsflash/call \
-H "X-API-Key: <api_key>" \
-H "Content-Type: application/json" \
-d '{"params":{"page_offset":"0","type":"0"}}'import requests
resp = requests.post(
"http://127.0.0.1:8080/v1/endpoints/getlist-pcnewsflash/call",
headers={"X-API-Key": "<api_key>"},
json={"params": {"page_offset":"0","type":"0"}},
)
print(resp.status_code)
print(resp.text)package main
import (
"bytes"
"fmt"
"net/http"
)
func main() {
body := []byte(`{"params":{"page_offset":"0","type":"0"}}`)
req, _ := http.NewRequest("POST", "http://127.0.0.1:8080/v1/endpoints/getlist-pcnewsflash/call", bytes.NewReader(body))
req.Header.Set("X-API-Key", "<api_key>")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
fmt.Println(resp.StatusCode, err)
}