企业招聘信息查询
请求Header:
| 名称 | 值 | |
|---|---|---|
| Content-Type | application/x-www-form-urlencoded |
请求参数说明:
| 名称 | 必填 | 类型 | 说明 | |
|---|---|---|---|---|
| key | 是 | string | 在个人中心->我的数据,接口名称上方查看 | |
| name | 是 | string | 企业全名/注册号/统一社会信用代码 | |
| nametype | 是 | string | 1-企业名称;2-注册号;3-统一社会信用代码 | |
| pageIndex | 否 | string | 页数,默认为1,每页20条 |
请求代码示例:
curl -k -i "https://apis.juhe.cn/api_credit/query852?key=key&name=xxx&nametype=xxx&pageIndex="
<?php
/**
* 2047-企业招聘信息查询 - 代码参考(根据实际业务情况修改)
*/
// 基本参数配置
$apiUrl = "https://apis.juhe.cn/api_credit/query852"; // 接口请求URL
$method = "GET"; // 接口请求方式
$headers = ["Content-Type: application/x-www-form-urlencoded"]; // 接口请求header
$apiKey = "您申请的调用APIkey"; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
$requestParams = [
'key' => $apiKey,
'name'=> 'xxx',
'nametype'=> 'xxx',
'pageIndex'=> '',
];
$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
# 2047-企业招聘信息查询 - 代码参考(根据实际业务情况修改)
# 基本参数配置
apiUrl = 'https://apis.juhe.cn/api_credit/query852' # 接口请求URL
apiKey = '您申请的调用APIkey' # 在个人中心->我的数据,接口名称上方查看
# 接口请求入参配置
requestParams = {
'key': apiKey,
'name': 'xxx',
'nametype': 'xxx',
'pageIndex': '',
}
# 发起接口网络请求
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/query852"
apiKey := "您申请的调用APIkey"
// 接口请求入参配置
requestParams := url.Values{}
requestParams.Set("key", apiKey)
requestParams.Set("name", "xxx")
requestParams.Set("nametype", "xxx")
requestParams.Set("pageIndex", "")
// 发起接口网络请求
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/query852";
string apiKey = "您申请的调用APIkey";
Dictionary<string, string> data = new Dictionary<string, string>();
data.Add("key", apiKey);
data.Add( "name", "xxx");
data.Add( "nametype", "xxx");
data.Add( "pageIndex", "");
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/query852'; // 接口请求URL
const apiKey = '您申请的调用APIkey'; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
const requestParams = {
key: apiKey,
name: 'xxx',
nametype: 'xxx',
pageIndex: '',
};
// 发起接口网络请求
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/query852";
HashMap<String, String> map = new HashMap<>();
map.put("key", apiKey);
map.put("name", "xxx");
map.put("nametype", "xxx");
map.put("pageIndex", "");
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/query852"; // 接口请求URL
NSString *apiKey = @"您申请的调用APIkey"; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
NSDictionary *requestParams = @{
@"key": apiKey,
@"name": @"xxx",
@"nametype": @"xxx",
@"pageIndex": @"",
};
// 发起接口网络请求
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];
返回参数说明:
| 名称 | 类型 | 说明 | |
|---|---|---|---|
| error_code | int | 返回码 | |
| reason | string | 返回说明 | |
| result | object | 返回结果 | |
| orderid | string | 流水号 | |
| totalCount | int | 总量 | |
| totalPage | int | 总页数 | |
| pageSize | int | 每页数量 | |
| pageIndex | int | 当前页 | |
| data | jsonArray | 具体结果 | |
| enterpriseName | string | 企业名称 | |
| enterpriseType | string | 企业(机构)类型 | |
| enterpriseSize | string | 企业规模 | |
| position | string | 职位 | |
| positionType | string | 职位类型 | |
| positionLabel | string | 职位标签 | |
| description | string | 职位描述 | |
| salary | string | 薪水 | |
| workYears | string | 工作年限 | |
| workplace | string | 工作地点 | |
| education | string | 教育程度 | |
| recruitNum | string | 招聘人数 | |
| validDate | string | 有效日期 | |
| source | string | 来源 | |
| punlishDate | string | 发布日期 | |
| url | string | 招聘地址 |
JSON返回示例:JSON在线格式化工具 >
{
"reason": "成功",
"result": {
"orderid": "JH854260618094820PWHHU",
"data": [
{
"enterpriseName": "山西尧信融资再担保有限公司",
"enterpriseType": "国有企业",
"enterpriseSize": "",
"position": "会计(山西尧信融资再担保有限公司)",
"positionType": "全职",
"positionLabel": "",
"description": "岗位职责: 1、编制公司总账和明细账; 2、审核原始单据,编制凭证,保证账实相符; 3、负责公司往来账,编制与往来账相关报表; 4、按照税务相关部门的要求及时报税。 任职要求: 1、年龄35周岁(含)及以下,专科及以上学历,会计、财务管理等专业; 2、5年及以上工作经验,具有初级会计职称,中级会计职称者优先; 3、具有符合职位要求的工作能力和技能; 4、遵纪守法,诚实守信,无违规违纪行为;具备严谨的工作态度和保密意识,有良好的团队协作意识",
"salary": "4001-6000",
"workYears": "不限",
"workplace": "临汾市",
"education": "大专",
"recruitNum": "1人",
"validDate": "2018-04-08",
"source": "猎聘网",
"punlishDate": "2018-01-17",
"url": "http://www.liepin.com/job/detail/?returnUrl=https%3A%2F%2Fwww.liepin.com%2Fjob%2F21406860101.shtml%3Fmscid%3Ds_00_002"
},
{
"enterpriseName": "山西尧信融资再担保有限公司",
"enterpriseType": "国企",
"enterpriseSize": "20-99人",
"position": "会计",
"positionType": "全职",
"positionLabel": "五险一金,通讯补贴,餐补",
"description": "岗位职责:1、编制公司总账和明细账,每月按会计流程按时结账、提交报表;2、审核原始单据,编制凭证,保证账实相符;3、负责公司往来账,编制与往来账相关报表;4、建立健全财务管理体系和内部控制制度,组织落实资金、应收款项管理,防范资金风险,并监督完善财务收支、费用控制及操作流程等财务管理相关工作;5、按照税务和统计等相关政府部门的要求及时报税。任职要求:1、专科及以上学历,会计、财务管理等专业;2、5年及以上会计工作经验,具有初级会计职称,中级会计职称者优先,年龄要求35周岁及以下;3、精通会计知识、财务管理知识,了解相关法律知识;4、具备良好协调沟通能力和较强计划执行能力;5、熟练使用常用办公软件和财务软件;6、具备严谨的工作态度和保密意识,为人正直,有良好的团队协作意识。",
"salary": "面议",
"workYears": "不限",
"workplace": "临汾市",
"education": "本科",
"recruitNum": "5人",
"validDate": "2017-12-06",
"source": "58同城",
"punlishDate": "2017-11-21",
"url": "http://linfen.58.com/zpcaiwushenji/32156958641484x.shtml?utm_source=market&spm=b-31580022738699-me-f-825.baidubaipin&pagefrom=baidubaipin"
}
],
"totalCount": 2,
"totalPage": 1,
"pageSize": 20,
"pageIndex": 1
},
"error_code": 0
}
服务级错误码参照(error_code):
| 错误码 | 说明 | |
|---|---|---|
| 285201 | 参数错误 | |
| 285202 | 查无记录 | |
| 285203 | 网络错误 | |
| 285204 | 查询失败 |
系统级错误码参照:
| 错误码 | 说明 | 旧版本(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号