50+ 부산포털 오픈 API에서 제공하는 사회적 일자리 사업모집 정보를 검색할 수 있습니다.
URL | https://www.busan50plus.or.kr/openAPI/api/society |
---|---|
요청 방식 | POST |
Charset | UTF-8 |
기본검색(필수 입력 예)
$url = "https://www.busan50plus.or.kr/openAPI/api/society";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_FAILONERROR,1);
curl_setopt($ch, CURLOPT_REFERER,$_SERVER['HTTP_HOST']);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$fields = array(
"userid" => "test",
"auth_key" => "1234"
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
$response = curl_exec($ch);
curl_close($ch)
// json 리턴 시
$arr = json_decode($response);
var_dump($arr);
// xml 리턴 시
$xml = simplexml_load_string($response);
$json = json_encode($xml);
$arr = json_decode($json);
var_dump($arr);
모집상태코드 | 요청결과코드 | |
---|---|---|
0 | 전체 | 요청 성공 |
1 | 모집예정 | 승인되지 않은 인증키입니다. |
2 | 모집종료 | 잘못된 주소로 접근하였습니다. |
3 | 마감 | 잘못된 인증키입니다. |
4 | 모집중 | 해당 API에 신청한 ID가 아닙니다. |
이 표는 좌, 우로 스크롤이 가능합니다.
항목 | 타입 | 필수여부 | 설명 |
---|---|---|---|
userid | String | Y | 신청한 회원 아이디를 입력합니다. |
auth_key | String | Y | 발급받은 인증키를 입력합니다. |
return_type | String | "xml" 또는 "json"을 입력합니다. (기본값은 json) | |
soci_subject | String | 찾고자 하는 사업명을 입력합니다. | |
soci_memo | String | 찾고자 하는 한줄소개를 입력합니다. | |
soci_content | String | 찾고자 하는 사업 내용을 입력합니다. | |
soci_state | Number | 모집상태코드를 입력합니다.(기본값은 0) 모집상태코드 보기 |
이 표는 좌, 우로 스크롤이 가능합니다.
항목 | 타입 | 설명 | |||||
---|---|---|---|---|---|---|---|
<result> | |||||||
<result_code> | Number | 요청 결과 코드 요청결과코드 보기 | </result_code> | ||||
<result_count> | Number | 총 검색결과 건 수 | </result_count> | ||||
<data> | |||||||
<item0> | 결과항목 / item0, item1, ... | ||||||
<subject> | String | 사업명 | </subject> | ||||
<content> | Html | 사업내용 | </content> | ||||
<req_period> | String | 모집기간 | </req_period> | ||||
<act_period> | String | 활동기간 | </act_period> | ||||
<total_num> | String | 모집인원 | </total_num> | ||||
<edu_day> | String | 교육일정 | </edu_day> | ||||
<act_day> | String | 활동일정 | </act_day> | ||||
<join_url> | String | 참고 url 링크 | </join_url> | ||||
<govment> | String | 기관명 | </govment> | ||||
<state> | String | 모집상태 | </state> | ||||
<file> | 첨부파일이 있을 경우에만 출력 | ||||||
<item0> | |||||||
<file_name> | String | 첨부파일 이름 | </file_name> | ||||
<download_url> | String | 첨부파일 다운 링크 | </download_url> | ||||
</item0> | |||||||
</file> | |||||||
</item0> | |||||||
</data> | |||||||
</result> |