企业工商信息查询
请求Header:
| 名称 | 值 | |
|---|---|---|
| Content-Type | application/x-www-form-urlencoded |
请求参数说明:
| 名称 | 必填 | 类型 | 说明 | |
|---|---|---|---|---|
| key | 是 | string | 在个人中心->我的数据,接口名称上方查看 | |
| name | 是 | string | 企业名称或统一社会信用代码 | |
| orderid | 否 | int | 是否返回流水号(1:返回,默认不返回,建议返回) |
请求代码示例:
curl -k -i "https://v.juhe.cn/industry/query?key=key&name=天聚地合(苏州)科技股份有限公司&orderid="
<?php
/**
* 719-企业工商信息查询 - 代码参考(根据实际业务情况修改)
*/
// 基本参数配置
$apiUrl = "https://v.juhe.cn/industry/query"; // 接口请求URL
$method = "GET"; // 接口请求方式
$headers = ["Content-Type: application/x-www-form-urlencoded"]; // 接口请求header
$apiKey = "您申请的调用APIkey"; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
$requestParams = [
'key' => $apiKey,
'name'=> '天聚地合(苏州)科技股份有限公司',
'orderid'=> '',
];
$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
# 719-企业工商信息查询 - 代码参考(根据实际业务情况修改)
# 基本参数配置
apiUrl = 'https://v.juhe.cn/industry/query' # 接口请求URL
apiKey = '您申请的调用APIkey' # 在个人中心->我的数据,接口名称上方查看
# 接口请求入参配置
requestParams = {
'key': apiKey,
'name': '天聚地合(苏州)科技股份有限公司',
'orderid': '',
}
# 发起接口网络请求
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://v.juhe.cn/industry/query"
apiKey := "您申请的调用APIkey"
// 接口请求入参配置
requestParams := url.Values{}
requestParams.Set("key", apiKey)
requestParams.Set("name", "天聚地合(苏州)科技股份有限公司")
requestParams.Set("orderid", "")
// 发起接口网络请求
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://v.juhe.cn/industry/query";
string apiKey = "您申请的调用APIkey";
Dictionary<string, string> data = new Dictionary<string, string>();
data.Add("key", apiKey);
data.Add( "name", "天聚地合(苏州)科技股份有限公司");
data.Add( "orderid", "");
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://v.juhe.cn/industry/query'; // 接口请求URL
const apiKey = '您申请的调用APIkey'; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
const requestParams = {
key: apiKey,
name: '天聚地合(苏州)科技股份有限公司',
orderid: '',
};
// 发起接口网络请求
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://v.juhe.cn/industry/query";
HashMap<String, String> map = new HashMap<>();
map.put("key", apiKey);
map.put("name", "天聚地合(苏州)科技股份有限公司");
map.put("orderid", "");
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://v.juhe.cn/industry/query"; // 接口请求URL
NSString *apiKey = @"您申请的调用APIkey"; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
NSDictionary *requestParams = @{
@"key": apiKey,
@"name": @"天聚地合(苏州)科技股份有限公司",
@"orderid": @"",
};
// 发起接口网络请求
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];
返回参数说明:
| 名称 | 类型 | 说明 | |
|---|---|---|---|
| enterpriseName | string | 企业名称 | |
| frName | string | 企业法人姓名 | |
| regNo | string | 工商注册号 | |
| creditCode | string | 统一社会信用代码 | |
| regCap | string | 注册资金(单位:万元) | |
| regorg | string | 登记机关 | |
| regCapCur | string | 注册币种 | |
| recCap | string | 接收注册资金(单位:万元) | |
| esDate | string | 开业日期(YYYY-MM-DD) | |
| openFrom | string | 经营期限自(YYYY-MM-DD) | |
| openTo | string | 经营期限至(YYYY-MM-DD) | |
| enterpriseType | string | 企业(机构)类型 | |
| enterpriseStatus | string | 经营状态(在营、注销、吊销、其他) | |
| cancelDate | string | 注销日期 | |
| revokeDate | string | 吊销日期 | |
| address | string | 注册地址 | |
| abuItem | string | 许可经营项目 | |
| cbuItem | string | 一般经营项目 | |
| operateScopeAndForm | string | 经营(业务)范围及方式 | |
| orgCode | string | 组织机构代码 | |
| apprDate | string | 核准时间 | |
| province | string | 省 | |
| city | string | 地级市 | |
| county | string | 区\县 | |
| areaCode | string | 住所所在行政区划代码 | |
| industryPhyCode | string | 行业门类代码 | |
| industryPhyName | string | 行业门类名称 | |
| industryCode | string | 国民经济行业代码 | |
| industryName | string | 国民经济行业名称 |
JSON返回示例:JSON在线格式化工具 >
{
"reason":"成功",
"result":{
"enterpriseName":"天聚地合(苏州)科技股份有限公司",
"enterpriseType":"股份有限公司(非上市、自然人投资或控股)",
"enterpriseStatus":"在营(开业)",
"cancelDate":"",
"revokeDate":"",
"regCap":"4530.000000",
"regCapCur":"人民币",
"regorg":"江苏省市场监督管理局",
"recCap":"3721.146600",
"abuItem":"",
"cbuItem":"",
"operateScopeAndForm":"数据技术开发;计算机软硬件开发;计算机技术服务;网络技术服务;网络信息服务;第二类增值电信业务中的在线数据处理与交易处理业务(服务项目:经营类电子商务不含互联网金融、网络预约出租汽车服务);第二类增值电信业务中的信息服务业务(仅限互联网信息服务、服务项目:不含信息搜索查询服务、信息即时交互服务);网络技术转让、技术推广;会展服务;展览展示服务;设计、制作、代理、发布广告;销售IC卡;电子商务技术咨询;销售计算机软硬件及配件、日用百货、汽车用品;代办汽车过户、年检、上牌、验车服务;汽车信息咨询服务;汽车保险代理;代驾服务;文化艺术交流与策划;文化创意设计;市场营销策划;企业形象策划。(依法须经批准的项目,经相关部门批准后方可开展经营活动)许可项目:第二类增值电信业务(依法须经批准的项目,经相关部门批准后方可开展经营活动,具体经营项目以审批结果为准)一般项目:二手车鉴定评估;机动车修理和维护;汽车拖车、求援、清障服务;汽车租赁;机动车改装服务(除依法须经批准的项目外,凭营业执照依法自主开展经营活动)",
"address":"苏州工业园区东平街286号浩辰大厦315室",
"creditCode":"9132059455117770X5",
"frName":"左磊",
"openFrom":"2010-02-25",
"esDate":"2010-02-25",
"openTo":"长期",
"orgCode":"55117770X",
"regNo":"320512000114943",
"apprDate":"2022-08-29",
"province":"江苏",
"city":"苏州市",
"county":"虎丘区",
"areaCode":"320505",
"industryPhyCode":"M",
"industryPhyName":"科学研究和技术服务业",
"industryCode":"73",
"industryName":"研究和试验发展",
"orderid":"JH20512303081746161203xa"
},
"error_code":0
}
服务级错误码参照(error_code):
| 错误码 | 说明 | |
|---|---|---|
| 220501 | 网络异常,请重试 | |
| 220502 | 查询无记录 | |
| 220503 | 查询失败,具体参照reason | |
| 220504 | 查询的企业名称或统一社会信用代码不能为空 |
系统级错误码参照:
| 错误码 | 说明 | 旧版本(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号