企业招投标信息
请求Header:
| 名称 | 值 | |
|---|---|---|
| Content-Type | application/x-www-form-urlencoded |
请求参数说明:
| 名称 | 必填 | 类型 | 说明 | |
|---|---|---|---|---|
| key | 是 | string | 在个人中心->我的数据,接口名称上方查看 | |
| relatedName | 否 | string | 关联方名称;精准查询,同时支持查询曾用名数据 | |
| fuzzyRelatedName | 否 | string | 关联方名称模糊匹配 | |
| relatedType | 否 | string | 关联方类型;筛选查询,多个用英文逗号隔开;枚举值:招标人、招标代理、招采单位、建设单位、代理单位、中标单位、中标候选人、投标单位。输入关联方类型时,必须输入关联方名称 | |
| proNo | 否 | string | 项目编号精准查询 | |
| keyWord | 否 | string | 综合查询关键词:模糊查询,同时查询关联方名称以及项目的标题 | |
| proKeyword | 否 | string | 项目关键词;模糊查询,当前仅查询标题字段 | |
| province | 否 | string | 省份模糊查询 | |
| purchaseType | 否 | string | 筛选查询,多个用英文逗号隔开;枚举值:房屋建筑 ,科教文卫,医疗卫生,服务采购,机械设备,水利水电,能源化工,弱电安防,信息通信,交通工程,电力工程,市政公用,农林牧渔,PPP项目,日用百货,服装布料,食品饮品,工程建筑,环保绿化,广场工程,环境工程,环卫设施,仪器仪表 ,分析仪器,光学仪器,测量仪表,贸易食宿,住宿餐饮,其他 | |
| annoType | 否 | string | 公告类型:筛选查询,多个用英文逗号隔开;枚举值:10-拟建公告,20-招标公告,30-中标公告 | |
| annoBeginTime | 否 | string | 公告时间起;查询公告时间范围 | |
| annoEndTime | 否 | string | 公告时间止;查询公告时间范围 | |
| isDetail | 否 | string | 是否输出招标详情:1:推送0:不推送,默认不推送 | |
| pageIndex | 否 | string | 页数,请求显示第几页,默认显示第一页 | |
| pageSize | 否 | string | 1. 每页显示记录数目,默认20条,上限300条,如果超出上限,则返回300条;2. 输出数据优先按公告日期降序排序;再按id降序排序 | |
| topIndChoice | 否 | string | 涉及10大行业筛选:可多选。多个用英文逗号隔开;枚举值:政府单位;财政;社保;社团组织;教育;住建公积金;公检法;医疗;烟草;军队; |
请求代码示例:
curl -k -i "https://apis.juhe.cn/api_credit/query847?key=key&relatedName=&fuzzyRelatedName=&relatedType=&proNo=&keyWord=&proKeyword=&province=&purchaseType=&annoType=&annoBeginTime=&annoEndTime=&isDetail=&pageIndex=&pageSize=&topIndChoice="
<?php
/**
* 2036-企业招投标信息 - 代码参考(根据实际业务情况修改)
*/
// 基本参数配置
$apiUrl = "https://apis.juhe.cn/api_credit/query847"; // 接口请求URL
$method = "GET"; // 接口请求方式
$headers = ["Content-Type: application/x-www-form-urlencoded"]; // 接口请求header
$apiKey = "您申请的调用APIkey"; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
$requestParams = [
'key' => $apiKey,
'relatedName'=> '',
'fuzzyRelatedName'=> '',
'relatedType'=> '',
'proNo'=> '',
'keyWord'=> '',
'proKeyword'=> '',
'province'=> '',
'purchaseType'=> '',
'annoType'=> '',
'annoBeginTime'=> '',
'annoEndTime'=> '',
'isDetail'=> '',
'pageIndex'=> '',
'pageSize'=> '',
'topIndChoice'=> '',
];
$requestParamsStr = http_build_query($requestParams);
// 发起接口网络请求
$curl = curl_init();
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($curl, CURLOPT_URL, $apiUrl . '?' . $requestParamsStr);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_FAILONERROR, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
if (1 == strpos("$" . $apiUrl, "https://")) {
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
}
$response = curl_exec($curl);
$httpInfo = curl_getinfo($curl);
curl_close($curl);
// 解析响应结果
$responseResult = json_decode($response, true);
if ($responseResult) {
// 网络请求成功。可依据业务逻辑和接口文档说明自行处理。
var_dump($responseResult);
} else {
// 网络异常等因素,解析结果异常。可依据业务逻辑自行处理。
// var_dump($httpInfo);
var_dump("请求异常");
}
import requests
# 2036-企业招投标信息 - 代码参考(根据实际业务情况修改)
# 基本参数配置
apiUrl = 'https://apis.juhe.cn/api_credit/query847' # 接口请求URL
apiKey = '您申请的调用APIkey' # 在个人中心->我的数据,接口名称上方查看
# 接口请求入参配置
requestParams = {
'key': apiKey,
'relatedName': '',
'fuzzyRelatedName': '',
'relatedType': '',
'proNo': '',
'keyWord': '',
'proKeyword': '',
'province': '',
'purchaseType': '',
'annoType': '',
'annoBeginTime': '',
'annoEndTime': '',
'isDetail': '',
'pageIndex': '',
'pageSize': '',
'topIndChoice': '',
}
# 发起接口网络请求
response = requests.get(apiUrl, params=requestParams)
# 解析响应结果
if response.status_code == 200:
responseResult = response.json()
# 网络请求成功。可依据业务逻辑和接口文档说明自行处理。
print(responseResult)
else:
# 网络异常等因素,解析结果异常。可依据业务逻辑自行处理。
print('请求异常')
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
)
func main() {
// 基本参数配置
apiUrl := "https://apis.juhe.cn/api_credit/query847"
apiKey := "您申请的调用APIkey"
// 接口请求入参配置
requestParams := url.Values{}
requestParams.Set("key", apiKey)
requestParams.Set("relatedName", "")
requestParams.Set("fuzzyRelatedName", "")
requestParams.Set("relatedType", "")
requestParams.Set("proNo", "")
requestParams.Set("keyWord", "")
requestParams.Set("proKeyword", "")
requestParams.Set("province", "")
requestParams.Set("purchaseType", "")
requestParams.Set("annoType", "")
requestParams.Set("annoBeginTime", "")
requestParams.Set("annoEndTime", "")
requestParams.Set("isDetail", "")
requestParams.Set("pageIndex", "")
requestParams.Set("pageSize", "")
requestParams.Set("topIndChoice", "")
// 发起接口网络请求
resp, err := http.Get(apiUrl + "?" + requestParams.Encode())
if err != nil {
fmt.Println("网络请求异常:", err)
return
}
defer resp.Body.Close()
var responseResult map[string]interface{}
err = json.NewDecoder(resp.Body).Decode(&responseResult)
if err != nil {
fmt.Println("解析响应结果异常:", err)
return
}
fmt.Println(responseResult)
}
using System;
using System.Net;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Linq;
namespace Common_API_Test.Test_Demo
{
class Csharp_get
{
static void Main(string[] args)
{
string url = "https://apis.juhe.cn/api_credit/query847";
string apiKey = "您申请的调用APIkey";
Dictionary<string, string> data = new Dictionary<string, string>();
data.Add("key", apiKey);
data.Add( "relatedName", "");
data.Add( "fuzzyRelatedName", "");
data.Add( "relatedType", "");
data.Add( "proNo", "");
data.Add( "keyWord", "");
data.Add( "proKeyword", "");
data.Add( "province", "");
data.Add( "purchaseType", "");
data.Add( "annoType", "");
data.Add( "annoBeginTime", "");
data.Add( "annoEndTime", "");
data.Add( "isDetail", "");
data.Add( "pageIndex", "");
data.Add( "pageSize", "");
data.Add( "topIndChoice", "");
using (WebClient client = new WebClient())
{
string fullUrl = url + "?" + string.Join("&", data.Select(x => x.Key + "=" + x.Value));
try
{
string responseContent = client.DownloadString(fullUrl);
dynamic responseData = JsonConvert.DeserializeObject(responseContent);
if (responseData != null)
{
Console.WriteLine("Return Code: " + responseData["error_code"]);
Console.WriteLine("Return Message: " + responseData["reason"]);
}
else
{
Console.WriteLine("json解析异常!");
}
}
catch (Exception)
{
Console.WriteLine("请检查其它错误");
}
}
}
}
}
const axios = require('axios'); // npm install axios
// 基本参数配置
const apiUrl = 'https://apis.juhe.cn/api_credit/query847'; // 接口请求URL
const apiKey = '您申请的调用APIkey'; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
const requestParams = {
key: apiKey,
relatedName: '',
fuzzyRelatedName: '',
relatedType: '',
proNo: '',
keyWord: '',
proKeyword: '',
province: '',
purchaseType: '',
annoType: '',
annoBeginTime: '',
annoEndTime: '',
isDetail: '',
pageIndex: '',
pageSize: '',
topIndChoice: '',
};
// 发起接口网络请求
axios.get(apiUrl, {params: requestParams})
.then(response => {
// 解析响应结果
if (response.status === 200) {
const responseResult = response.data;
// 网络请求成功。可依据业务逻辑和接口文档说明自行处理。
console.log(responseResult);
} else {
// 网络异常等因素,解析结果异常。可依据业务逻辑自行处理。
console.log('请求异常');
}
})
.catch(error => {
// 网络请求失败,可以根据实际情况进行处理
console.log('网络请求失败:', error);
});
package cn.juhe.test;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;
public class JavaGet {
public static void main(String[] args) throws Exception {
String apiKey = "你申请的key";
String apiUrl = "https://apis.juhe.cn/api_credit/query847";
HashMap<String, String> map = new HashMap<>();
map.put("key", apiKey);
map.put("relatedName", "");
map.put("fuzzyRelatedName", "");
map.put("relatedType", "");
map.put("proNo", "");
map.put("keyWord", "");
map.put("proKeyword", "");
map.put("province", "");
map.put("purchaseType", "");
map.put("annoType", "");
map.put("annoBeginTime", "");
map.put("annoEndTime", "");
map.put("isDetail", "");
map.put("pageIndex", "");
map.put("pageSize", "");
map.put("topIndChoice", "");
URL url = new URL(String.format("%s?%s", apiUrl, params(map)));
BufferedReader in = new BufferedReader(new InputStreamReader((url.openConnection()).getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response);
}
public static String params(Map<String, String> map) {
return map.entrySet().stream()
.map(entry -> {
try {
return entry.getKey() + "=" + URLEncoder.encode(entry.getValue(), StandardCharsets.UTF_8.toString());
} catch (Exception e) {
e.printStackTrace();
return entry.getKey() + "=" + entry.getValue();
}
})
.collect(Collectors.joining("&"));
}
}
// 基本参数配置
NSString *apiUrl = @"https://apis.juhe.cn/api_credit/query847"; // 接口请求URL
NSString *apiKey = @"您申请的调用APIkey"; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
NSDictionary *requestParams = @{
@"key": apiKey,
@"relatedName": @"",
@"fuzzyRelatedName": @"",
@"relatedType": @"",
@"proNo": @"",
@"keyWord": @"",
@"proKeyword": @"",
@"province": @"",
@"purchaseType": @"",
@"annoType": @"",
@"annoBeginTime": @"",
@"annoEndTime": @"",
@"isDetail": @"",
@"pageIndex": @"",
@"pageSize": @"",
@"topIndChoice": @"",
};
// 发起接口网络请求
NSURLComponents *components = [NSURLComponents componentsWithString:apiUrl];
NSMutableArray *queryItems = [NSMutableArray array];
[requestParams enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *value, BOOL *stop) {
[queryItems addObject:[NSURLQueryItem queryItemWithName:key value:value]];
}];
components.queryItems = queryItems;
NSURL *url = components.URL;
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
// 网络请求异常处理
NSLog(@"请求异常");
} else {
NSError *jsonError;
NSDictionary *responseResult = [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonError];
if (!jsonError) {
// 网络请求成功处理
// NSLog(@"%@", [responseResult objectForKey:@"error_code"]);
NSLog(@"%@", responseResult);
} else {
// 解析结果异常处理
NSLog(@"解析结果异常");
}
}
}];
[task resume];
返回参数说明:
| 名称 | 类型 | 说明 | |
|---|---|---|---|
| biddingInfo | JSONARRAY | 招投标信息 | |
| provinceStatistic | JSONARRAY | 省份维度统计 | |
| biddingInfo(招投标信息) | |||
| serialNo | VARCHAR(100) | 序列号 | |
| bidCode | VARCHAR(100) | 正文id | |
| annoType | VARCHAR(100) | 公告类型, | |
| annoSubType | VARCHAR(100) | 公告小类环评,可研,审批,备案,核准,立项,许可证,竣工,其他,预告,招标,邀标,询价,竞谈,竞磋,单一来源,资审,变更,其他,中标,流标,废标,其他 | |
| proName | VARCHAR(500) | 项目名称 | |
| proNo | VARCHAR(200) | 项目编号 | |
| province | VARCHAR(20) | 省份 | |
| provCode | VARCHAR(20) | 省份编码 | |
| title | VARCHAR(500) | 标题 | |
| details | TEXT | 招标详情 | |
| annoDate | VARCHAR(20) | 公告日期 | |
| biddingLabel | VARCHAR(200) | 招投标标签 | |
| budgetAmount | VARCHAR(100) | 预算金额 | |
| prjLimit | VARCHAR(50) | 工期 | |
| beginDate | VARCHAR(50) | 报名开始日期 | |
| endDate | VARCHAR(50) | 报名结束日期 | |
| openDate | VARCHAR(50) | 开标时间 | |
| openAddr | VARCHAR(200) | 开标地点 | |
| fundSrc | VARCHAR(50) | 资金来源 | |
| role | VARCHAR(50) | 查询角色;查询企业名称对应关联方类型字段,枚举值:招标人、招标代理 | |
| tenderMoney | VARCHAR(50) | 成交金额 | |
| purchaseType | VARCHAR(50) | 项目行业分类 | |
| website | VARCHAR(200) | 链接 | |
| relatedParties | JSONARRAY | 关联方 | |
| provinceStatistic(省份维度统计) | |||
| key | VARCHAR(50) | 省份 | |
| num | NUMBER(10) | 对应统计数量 | |
| biddingInfo. | relatedParties(关联方) | ||
| relatedName | VARCHAR(300) | 关联方名称 | |
| relatedType | VARCHAR(50) | 关联方类型;枚举值:招标人、中标人、招标代理、中标候选人、其他 | |
| creditCode | VARCHAR(100) | 关联方统一社会信用代码 | |
| VARCHAR(100) | 关联方邮箱 | ||
| address | VARCHAR(200) | 关联方地址 | |
| bankType | VARCHAR(100) | 金融机构类型;招标人类型时有效 | |
| entType | VARCHAR(100) | 招标人性质类型;招标人类型时有效 | |
| top10Ind | VARCHAR(300) | 涉及10大行业;多个行业使用英文逗号隔开 |
JSON返回示例:JSON在线格式化工具 >
{
"reason": "成功",
"result": {
"orderid": "JH847260720105015pQA3v",
"data": [
{
"biddingInfo": [
{
"serialNo": "859ac8c2c82bb6a5be6c365e137c8d4e",
"bidCode": "ecb4d8756bf2d20feb9004173ab64f78",
"annoType": "10",
"annoSubType": "备案",
"proName": "(备案)2209-320571-89-04-951858天聚地合(苏州)科技股份有限公司数据处理标准化技术服务升级建设项目",
"proNo": "",
"province": "江苏省",
"provCode": "320000",
"title": "(备案)2209-320571-89-04-951858天聚地合(苏州)科技股份有限公司数据处理标准化技术服务升级建设项目",
"details": "",
"annoDate": "2022-09-07",
"biddingLabel": "",
"budgetAmount": "",
"prjLimit": "",
"beginDate": "",
"endDate": "",
"openDate": "",
"openAddr": "",
"fundSrc": "",
"role": "招标人",
"tenderMoney": "",
"purchaseType": "信息通信",
"website": "http://www.qianlima.com/zb/detail/20220907_291769491.html",
"relatedParties": [
{
"relatedName": "聚地合(苏州)科技股份有限公司",
"relatedType": "招标人",
"creditCode": "",
"email": "",
"address": "",
"bankType": "",
"entType": "",
"top10Ind": ""
}
]
},
{
"serialNo": "ebb4ad55cffdd662c9b1a57f41faeade",
"bidCode": "a9cbd33bb71a32073750b5c77d1c2b0e",
"annoType": "10",
"annoSubType": "备案",
"proName": "(备案)2209-320571-89-04-968937天聚地合(苏州)科技股份有限公司数据处理技术工具箱升级项目",
"proNo": "2209-320571-89-04-968937天",
"province": "江苏省",
"provCode": "320000",
"title": "(备案)2209-320571-89-04-968937天聚地合(苏州)科技股份有限公司数据处理技术工具箱升级项目",
"details": "",
"annoDate": "2022-09-06",
"biddingLabel": "",
"budgetAmount": "",
"prjLimit": "",
"beginDate": "",
"endDate": "",
"openDate": "",
"openAddr": "",
"fundSrc": "",
"role": "招标人",
"tenderMoney": "",
"purchaseType": "信息通信",
"website": "http://www.qianlima.com/zb/detail/20220906_291650329.html",
"relatedParties": [
{
"relatedName": "聚地合(苏州)科技股份有限公司",
"relatedType": "招标人",
"creditCode": "",
"email": "",
"address": "",
"bankType": "",
"entType": "",
"top10Ind": ""
}
]
}
],
"provinceStatistic": [
{
"key": "江苏省",
"num": 2
}
]
}
],
"totalCount": 2,
"totalPage": 1,
"pageSize": 20,
"pageIndex": 1
},
"error_code": 0
}
服务级错误码参照(error_code):
| 错误码 | 说明 | |
|---|---|---|
| 284701 | 参数错误 | |
| 284702 | 查无记录 | |
| 284703 | 网络错误 | |
| 284704 | 查询失败 |
系统级错误码参照:
| 错误码 | 说明 | 旧版本(resultcode) | |
|---|---|---|---|
| 10001 | 错误的请求KEY | 101 | |
| 10002 | 该KEY无请求权限 | 102 | |
| 10003 | KEY过期 | 103 | |
| 10004 | 错误的OPENID | 104 | |
| 10005 | 应用未审核超时,请提交认证 | 105 | |
| 10007 | 未知的请求源 | 107 | |
| 10008 | 被禁止的IP | 108 | |
| 10009 | 被禁止的KEY | 109 | |
| 10011 | 当前IP请求超过限制 | 111 | |
| 10012 | 请求超过次数限制 | 112 | |
| 10013 | 测试KEY超过请求限制 | 113 | |
| 10014 | 系统内部异常(调用充值类业务时,请务必联系客服或通过订单查询接口检测订单,避免造成损失) | 114 | |
| 10020 | 接口维护 | 120 | |
| 10021 | 接口停用 | 121 |
错误码格式说明(示例:200201):
| 2 | 002 | 01 | |
|---|---|---|---|
| 服务级错误(1为系统级错误) | 服务模块代码(即数据ID) | 具体错误代码 |
接口文档下载
苏公网安备 32059002001776号