输入参数
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
name |
String | 必填 | |
|
|||
|
|||
|
|||
skip |
Number | 可选 | 跳过条目数 |
|
|||
|
|||
tag_list |
String | 可选 | 舆情分类 |
参考数据字典tag_list字段 |
|||
数组字符串 |
|||
示例 |
|||
|
|||
"132"] |
|||
sentiment |
String | 可选 | 新闻本身情感属性 |
|
|||
|
|||
参考数据字典sentiment字段 |
|||
数组字符串 |
|||
示例 |
|||
|
|||
"pos"] |
|||
company_sentiment |
String | 可选 | |
|
|||
|
|||
|
|||
|
|||
参考数据字典sentiment字段 |
|||
数组字符串 |
|||
示例 |
|||
|
|||
"pos"] |
|||
class_types |
String | 可选 | 新闻类别 |
|
|||
|
|||
参考数据字典class_types字段 |
|||
数组字符串 |
|||
示例 |
|||
|
|||
new_tag_list |
String | 可选 | 事件分类 |
参考数据字典new_tag_list字段 |
|||
数组字符串 |
|||
示例 |
|||
|
|||
"0202016"] |
|||
company_new_tag |
String | 可选 | |
|
|||
参考数据字典new_tag_list字段 |
|||
数组字符串 |
|||
示例 |
|||
|
|||
"0102005"] |
|||
create_time_range |
String | 可选 | |
|
|||
数组字符串 |
|||
示例 |
|||
|
|||
"2019-08-14"] |
返回字段
标题
发布日期
简介
来源
原文链接
情感属性
舆情标签
文章
事件分类
关键词
新闻分类
新闻来源等级
调用示例
curl -X POST 'https://openapi.jiawei.net/api/v1/news.10_1' \
-H 'X-App-Key: ak_xxxxxxxxxxxx' \
-H 'X-App-Sign: <hmac_sha256(timestamp, app_secret)>' \
-H 'X-App-Timestamp: 1700000000' \
-H 'Content-Type: application/json' \
-d '{"company_name":"佳维网络科技有限公司"}'
<?php
$ch = curl_init('https://openapi.jiawei.net/api/v1/news.10_1');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-App-Key: ak_xxxxxxxxxxxx',
'X-App-Sign: ' . hash_hmac('sha256', $timestamp, $appSecret),
'X-App-Timestamp: ' . $timestamp,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'company_name' => '佳维网络科技有限公司',
]),
]);
$response = curl_exec($ch);
echo $response;
import requests, hmac, hashlib, time
app_key = "ak_xxxxxxxxxxxx"
app_secret = "xxxxxxxxxxxxxxxxxxxx"
ts = str(int(time.time()))
sign = hmac.new(app_secret.encode(), ts.encode(), hashlib.sha256).hexdigest()
resp = requests.post(
"https://openapi.jiawei.net/api/v1/news.10_1",
headers={
"X-App-Key": app_key,
"X-App-Sign": sign,
"X-App-Timestamp": ts,
"Content-Type": "application/json",
},
json={"company_name": "佳维网络科技有限公司"},
)
print(resp.json())
OkHttpClient client = new OkHttpClient();
RequestBody body = RequestBody.create(
"{\"company_name\":\"佳维网络科技有限公司\"}",
MediaType.parse("application/json")
);
Request request = new Request.Builder()
.url("https://openapi.jiawei.net/api/v1/news.10_1")
.post(body)
.addHeader("X-App-Key", "ak_xxxxxxxxxxxx")
.addHeader("X-App-Sign", "<hmac_sha256(timestamp, app_secret)>")
.addHeader("X-App-Timestamp", "1700000000")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
返回示例
{
"code": 0,
"message": "success",
"request_id": "req_64a1b2c3d4e5f6",
"data": {
"company_name": "佳维网络科技有限公司",
"credit_code": "91310000XXXXXXXXXX",
"legal_person": "张三",
"reg_status": "在营",
"result": "一致"
}
}
数据来源
-
priority启信宝
qxb· 上游价 ¥0.10
错误码
| 码 | 含义 |
|---|---|
0 | 成功 |
40001 | AppKey 无效 |
40003 | 签名错误 |
42900 | 请求超限 |
40201 | 余额不足 |
40400 | 无数据 |
50000 | 服务器错误 |