---
title: "WeChat 공식 계정 게시글 검색 API (V2)"
description: "팔로우한 계정, 최신, 최근 읽은 글, 인기 등 선택한 카테고리에서 위챗 공식 계정 글을 키워드로 검색합니다. 검색을 이어서 조회할 수 있으며 특정 결과 유형에 집중해 글을 찾을 때 사용하세요."
aiUsagePrompt: true
---

# WeChat 공식 계정 게시글 검색 API \(V2\)

<ApiTester
  method="POST"
  :path='JSON.parse("\"/api/weixin/search-article/v2\"")'
  :summary='JSON.parse("\"게시글 검색 (V2)\"")'
  openapiDefinitionUrl="https://docs.justoneapi.com/openapi/wechat-official-accounts/article-search-v2-ko.json"
  openapiVersion="3.1.0"
  :parameters='JSON.parse("[]")'
  :requestBody='JSON.parse("{\"content\":{\"application/x-www-form-urlencoded\":{\"schema\":{\"type\":\"object\",\"properties\":{\"token\":{\"type\":\"string\",\"description\":\"이 API 서비스의 액세스 토큰입니다.\"},\"keyword\":{\"type\":\"string\",\"description\":\"위챗 공식 계정 글의 카테고리별 웹 검색에서 사용할 키워드입니다.\"},\"subSearchType\":{\"type\":\"string\",\"default\":\"ALL\",\"description\":\"위챗 공식 계정 글의 카테고리별 웹 검색에 적용할 하위 카테고리 필터입니다.\\n\\n사용 가능한 값\\n- `ALL`: 전체\\n- `FOLLOWED`: 팔로우한 계정\\n- `LATEST`: 최신\\n- `RECENT_READ`: 최근 읽은 글\\n- `HOT`: 인기\",\"enum\":[\"ALL\",\"FOLLOWED\",\"LATEST\",\"RECENT_READ\",\"HOT\"]},\"currentPage\":{\"type\":\"integer\",\"format\":\"int32\",\"default\":1,\"description\":\"위챗 웹 검색의 현재 페이지 번호입니다. 1부터 시작합니다.\"},\"offset\":{\"type\":\"integer\",\"format\":\"int32\",\"default\":0,\"description\":\"직전 응답에서 반환한 검색 결과 오프셋입니다. 첫 페이지에는 0을 사용하세요.\"},\"cookies_buffer\":{\"type\":\"string\",\"default\":\"\",\"description\":\"직전 위챗 웹 검색 응답에서 반환되며 내부 구조가 공개되지 않은 페이지네이션 상태입니다. 첫 페이지에는 비워 두세요. 이 POST 엔드포인트에서는 application/x-www-form-urlencoded 형식의 폼 본문으로 전달하세요.\"}},\"required\":[\"keyword\",\"token\"]}}},\"required\":true}")'
  :responses='JSON.parse("{\"200\":{\"description\":\"정상 응답(OK)\",\"content\":{\"application/json\":{\"schema\":{\"if\":{\"properties\":{\"code\":{\"const\":0}},\"required\":[\"code\"]},\"then\":{\"properties\":{\"data\":{\"type\":\"object\",\"description\":\"요청된 페이지에 대한 검색 결과 및 계속 정보. 계속 상태가 사용할 수 없을 경우 성공적인 API 응답에는 빈 객체가 포함될 수 있습니다.\",\"properties\":{\"data\":{\"type\":\"array\",\"description\":\"요청된 페이지에 대해 반환된 기사 결과 그룹.\",\"items\":{\"type\":\"object\",\"description\":\"기사 검색 결과의 하나의 그룹.\",\"properties\":{\"count\":{\"type\":\"integer\",\"description\":\"현재 페이지에 대해 이 그룹에서 보고된 기사 수.\"},\"totalCount\":{\"type\":\"integer\",\"description\":\"결과 그룹에 대한 보고된 총계. 페이지마다 변경될 수 있습니다.\"},\"items\":{\"type\":\"array\",\"description\":\"현재 페이지에서 이 그룹에 포함된 기사들.\",\"items\":{\"type\":\"object\",\"description\":\"검색 결과 그룹당 하나의 기사.\",\"properties\":{\"docID\":{\"type\":\"string\",\"description\":\"이 기사 검색 결과에 대해 보고된 문서 식별자.\"},\"title\":{\"type\":\"string\",\"description\":\"검색 결과에 표시되는 기사 제목.\"},\"desc\":{\"type\":\"string\",\"description\":\"검색 결과에 표시되는 기사 발췌문.\"},\"doc_url\":{\"type\":\"string\",\"description\":\"WeChat 공식 계정 기사에 대한 링크.\"},\"thumbUrl\":{\"type\":\"string\",\"description\":\"검색 결과에 표시된 축소판 이미지에 대한 링크.\"},\"timestamp\":{\"type\":\"integer\",\"description\":\"검색 결과에 의해 보고된 기사 시간, 유닉스 에포크 초로 표시.\"},\"date\":{\"type\":\"integer\",\"description\":\"검색 결과에서 반환된 숫자형 기사 날짜 값.\"},\"docType\":{\"type\":\"integer\",\"description\":\"검색 결과에 대해 보고된 숫자형 문서 유형 코드.\"},\"src_type\":{\"type\":\"integer\",\"description\":\"기사에 대해 보고된 숫자형 소스 유형 코드.\"},\"source\":{\"type\":\"object\",\"description\":\"기사에 대한 출판 소스 정보가 표시됩니다.\",\"properties\":{\"title\":{\"type\":\"string\",\"description\":\"반환될 때 기사 소스의 표시 이름.\"},\"dateTime\":{\"type\":\"string\",\"description\":\"기사 소스와 함께 표시되는 포맷된 시간 라벨.\"},\"tag\":{\"type\":\"array\",\"description\":\"이 소스와 관련된 태그의 표시.\",\"items\":{\"type\":\"object\",\"description\":\"소스에 대한 하나의 표시 태그.\",\"properties\":{\"title\":{\"type\":\"string\",\"description\":\"소스 태그의 가시적 텍스트.\"},\"type\":{\"type\":\"integer\",\"description\":\"소스 태그에 대해 보고된 숫자형 유형 코드.\"},\"noBg\":{\"type\":\"boolean\",\"description\":\"소스 태그가 배경 없이 표시되도록 표시되었는지 여부.\"}}}}}}}}}}}},\"continueFlag\":{\"type\":\"integer\",\"description\":\"검색 보고서가 더 많은 페이지를 나타내는지 여부를 나타내는 플래그. 관찰된 값은 더 많을 경우 1, 끝일 경우 0입니다. 마지막 페이지에도 여전히 기사가 포함될 수 있습니다.\"},\"offset\":{\"type\":\"integer\",\"description\":\"다른 페이지가 사용 가능할 때 계속 요청으로 전송할 오프셋.\"},\"pageNumber\":{\"type\":\"integer\",\"description\":\"현재 검색 응답에 보고된 페이지 번호.\"},\"cookies\":{\"type\":\"string\",\"contentMediaType\":\"application/json\",\"contentSchema\":{\"type\":\"object\",\"description\":\"응답 문자열 내부에 인코딩된 계속 객체.\"},\"description\":\"JSON로 인코딩된 연속 데이터. 다음 페이지에서는 이 문자열을 파싱하고, 그에 포함된 cookies_buffer 값을 반환된 offset 및 다음 currentPage와 함께 form body에 전달해야 합니다.\"},\"ret\":{\"type\":\"integer\",\"description\":\"결과 데이터 내에서 보고된 검색 상태 코드.\"},\"query\":{\"type\":\"string\",\"description\":\"응답에 반영된 검색 쿼리 텍스트.\"},\"lang\":{\"type\":\"string\",\"description\":\"결과 데이터에 대해 보고된 언어 라벨.\"},\"timeStamp\":{\"type\":\"integer\",\"description\":\"검색 응답에 대한 타임스탬프, Unix epoch 초로 보고됨.\"},\"nomoreText\":{\"type\":\"string\",\"description\":\"검색 결과 끝에 보고된 표시 메시지, 사용 가능할 때.\"},\"category\":{\"type\":\"array\",\"description\":\"결과와 함께 반환된 검색 카테고리 레이블, 사용 가능할 때.\",\"items\":{\"type\":\"object\",\"description\":\"하나의 검색 카테고리.\",\"properties\":{\"word\":{\"type\":\"string\",\"description\":\"검색 카테고리의 표시 라벨.\"},\"type\":{\"type\":\"integer\",\"description\":\"검색으로 반환된 숫자형 카테고리 유형 코드.\"},\"selected\":{\"type\":\"integer\",\"description\":\"이 카테고리에 대한 숫자 선택 플래그, 반환될 때.\"}}}},\"slideFilter\":{\"type\":\"object\",\"description\":\"검색 결과와 함께 표시된 필터의 메타데이터를 표시합니다.\",\"properties\":{\"filters\":{\"type\":\"array\",\"description\":\"결과 목록 옆에 필터가 표시됩니다.\",\"items\":{\"type\":\"object\",\"description\":\"하나의 표시된 결과 필터.\",\"properties\":{\"title\":{\"type\":\"string\",\"description\":\"검색 필터의 표시 제목.\"},\"options\":{\"type\":\"array\",\"description\":\"필터에 대해 보고된 표시 옵션.\",\"items\":{\"type\":\"object\",\"description\":\"검색 결과 필터의 하나의 표시 옵션.\",\"properties\":{\"title\":{\"type\":\"string\",\"description\":\"필터 옵션의 표시 레이블.\"},\"selected\":{\"type\":\"integer\",\"description\":\"이 필터 옵션에 대한 숫자형 선택 플래그, 반환될 때.\"},\"iconUrl\":{\"type\":\"string\",\"description\":\"이 필터 옵션에 대한 아이콘 링크가 표시됩니다.\"},\"selectedIconUrl\":{\"type\":\"string\",\"description\":\"선택된 필터 옵션 상태에 대한 아이콘 링크.\"}}}}}}}}}}}}},\"allOf\":[{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"string\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}]}}}},\"400\":{\"description\":\"유효하지 않은 요청 매개변수 또는 본문\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"string\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"401\":{\"description\":\"유효하지 않거나 비활성화된 접근 토큰\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"string\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"403\":{\"description\":\"권한 거부\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"string\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"429\":{\"description\":\"요청 속도 또는 일일 할당량 한도 초과\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"string\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"500\":{\"description\":\"내부 서버 오류\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"string\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"503\":{\"description\":\"서비스 일시적으로 사용 불가\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"string\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}}}")'
  :servers='JSON.parse("[{\"url\":\"https://api.justoneapi.com\",\"description\":\"글로벌 프로덕션 API (기본)\"}]")'
  :security='JSON.parse("[]")'
  :securitySchemes='JSON.parse("{}")'
  :schemas='JSON.parse("{}")'
/>

<ApiHealthSection :api='JSON.parse("\"/api/weixin/search-article/v2\"")' />

<p>팔로우한 계정, 최신, 최근 읽은 글, 인기 등 선택한 카테고리에서 위챗 공식 계정 글을 키워드로 검색합니다. 검색을 이어서 조회할 수 있으며 특정 결과 유형에 집중해 글을 찾을 때 사용하세요.</p>

## 요청 본문

<div class="api-doc-table api-doc-table--params">

| 이름 | 위치 | 유형 | 필수 | 기본값 | 설명 |
| --- | --- | --- | --- | --- | --- |
| <code>token</code> | form | <code>string</code> | 예 | - | 이 API 서비스의 액세스 토큰입니다. |
| <code>keyword</code> | form | <code>string</code> | 예 | - | 위챗 공식 계정 글의 카테고리별 웹 검색에서 사용할 키워드입니다. |
| <code>subSearchType</code> | form | <code>string</code> | 아니요 | <code>ALL</code> | 위챗 공식 계정 글의 카테고리별 웹 검색에 적용할 하위 카테고리 필터입니다.<br /><br><br>사용 가능한 값<br /><br>- <code>ALL</code>: 전체<br /><br>- <code>FOLLOWED</code>: 팔로우한 계정<br /><br>- <code>LATEST</code>: 최신<br /><br>- <code>RECENT_READ</code>: 최근 읽은 글<br /><br>- <code>HOT</code>: 인기 |
| <code>currentPage</code> | form | <code>integer</code> | 아니요 | <code>1</code> | 위챗 웹 검색의 현재 페이지 번호입니다. 1부터 시작합니다. |
| <code>offset</code> | form | <code>integer</code> | 아니요 | <code>0</code> | 직전 응답에서 반환한 검색 결과 오프셋입니다. 첫 페이지에는 0을 사용하세요. |
| <code>cookies_buffer</code> | form | <code>string</code> | 아니요 | <code></code> | 직전 위챗 웹 검색 응답에서 반환되며 내부 구조가 공개되지 않은 페이지네이션 상태입니다. 첫 페이지에는 비워 두세요. 이 POST 엔드포인트에서는 application/x-www-form-urlencoded 형식의 폼 본문으로 전달하세요. |

</div>

## 코드 예제

::: code-group

```bash [🐚 cURL]
curl --max-time 120 -X POST 'https://api.justoneapi.com/api/weixin/search-article/v2' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'token=YOUR_API_KEY&keyword=string&subSearchType=ALL&currentPage=1&offset=0&cookies_buffer='
```

```text [🤖 AI 프롬프트]
JustOneAPI의 "게시글 검색 (V2)" API를 사용하고 싶습니다.
기본 URL: https://api.justoneapi.com.
API 경로: /api/weixin/search-article/v2
API 주소: BASE_URL + /api/weixin/search-article/v2
HTTP 메서드: POST
인증: application/x-www-form-urlencoded 요청 본문에 "token" 필드를 넣으세요.
OpenAPI 정의: https://docs.justoneapi.com/openapi/wechat-official-accounts/article-search-v2-ko.json
요청 헤더:
- Content-Type: application/x-www-form-urlencoded

요청 본문 (폼):
- token (form): 이 API 서비스의 액세스 토큰입니다. (필수)
- keyword (form): 위챗 공식 계정 글의 카테고리별 웹 검색에서 사용할 키워드입니다. (필수)
- subSearchType (form): 위챗 공식 계정 글의 카테고리별 웹 검색에 적용할 하위 카테고리 필터입니다.

사용 가능한 값
- `ALL`: 전체
- `FOLLOWED`: 팔로우한 계정
- `LATEST`: 최신
- `RECENT_READ`: 최근 읽은 글
- `HOT`: 인기
- currentPage (form): 위챗 웹 검색의 현재 페이지 번호입니다. 1부터 시작합니다.
- offset (form): 직전 응답에서 반환한 검색 결과 오프셋입니다. 첫 페이지에는 0을 사용하세요.
- cookies_buffer (form): 직전 위챗 웹 검색 응답에서 반환되며 내부 구조가 공개되지 않은 페이지네이션 상태입니다. 첫 페이지에는 비워 두세요. 이 POST 엔드포인트에서는 application/x-www-form-urlencoded 형식의 폼 본문으로 전달하세요.

응답 형식: 실제 Content-Type에 따라 JSON 또는 텍스트를 안전하게 처리하세요.

응답 처리 및 오류 코드
1. 응답 본문의 "code" 필드에서 처리 결과를 확인하세요. 0은 성공을 뜻합니다.
2. 권장 요청 제한 시간은 120초입니다. 120초가 너무 길다면 최소 60초로 설정하세요. 일부 요청은 응답을 받기 전에 시간 초과될 수 있습니다.
3. API 결과 코드
   - 0: 성공
   - 100: 유효하지 않거나 비활성화된 토큰
   - 301: 데이터 수집에 실패했습니다. 다시 시도해 주세요.
   - 302: 호출 빈도 제한 초과
   - 303: 일일 호출 한도 초과
   - 400: 잘못된 파라미터
   - 500: 서버 내부 오류
   - 600: 호출 권한 없음
   - 601: 계정 잔액 부족
   - 602: API 토큰의 누적 예산 한도 초과
4. 601은 공유 계정 잔액이 부족하다는 뜻입니다. 602는 현재 API 토큰의 누적 예산 한도에 도달했다는 뜻입니다. 토큰 예산을 설정해도 공유 계정 잔액은 별도로 배정되지 않습니다.

제가 사용하는 프로그래밍 언어로 이 API를 호출하고 응답을 처리하는 스크립트를 작성해 주세요.
```

```python [🐍 Python]
import requests

BASE_URL = "https://api.justoneapi.com"  # OpenAPI 서버 설정에서 제공

url = BASE_URL + "/api/weixin/search-article/v2"
headers = {
    "Content-Type": "application/x-www-form-urlencoded"
}
data = "token=YOUR_API_KEY&keyword=string&subSearchType=ALL&currentPage=1&offset=0&cookies_buffer="
response = requests.post(url, headers=headers, data=data, timeout=120)
print(response.status_code)
if response.content:
    content_type = response.headers.get("content-type", "").lower()
    if "json" in content_type:
        try:
            print(response.json())
        except ValueError:
            print(response.text)
    elif content_type.startswith("text/") or "xml" in content_type or content_type.split(";", 1)[0].strip() in {"application/javascript", "application/x-www-form-urlencoded", "application/graphql"}:
        print(response.text)
    else:
        with open("response.bin", "wb") as output:
            output.write(response.content)
        print(f"Saved {len(response.content)} bytes to response.bin")
```

```js [🌐 JavaScript]
const BASE_URL = "https://api.justoneapi.com"; // OpenAPI 서버 설정에서 제공
const url = BASE_URL + "/api/weixin/search-article/v2";

const response = await fetch(url, {
  method: "POST",
  headers: Object.fromEntries([
    ["Content-Type", "application/x-www-form-urlencoded"],
  ]),
  body: "token=YOUR_API_KEY&keyword=string&subSearchType=ALL&currentPage=1&offset=0&cookies_buffer=",
  signal: AbortSignal.timeout(120000)
});
console.log(response.status);
const responseBytes = await response.arrayBuffer();
if (responseBytes.byteLength) {
  const contentType = (response.headers.get("content-type") || "").toLowerCase();
  const mediaType = contentType.split(";", 1)[0].trim();
  const textual = contentType.startsWith("text/") || contentType.includes("json") || contentType.includes("xml") || ["application/javascript", "application/x-www-form-urlencoded", "application/graphql"].includes(mediaType);
  if (textual) {
    const responseText = new TextDecoder().decode(responseBytes);
    let data = responseText;
    if (contentType.includes("json")) {
      try { data = JSON.parse(responseText); } catch { /* Keep the raw body. */ }
    }
    console.log(data);
  } else {
    console.log(`Received ${responseBytes.byteLength} binary bytes`);
  }
}
```

```java [☕ Java]
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;

public class Main {
    public static void main(String[] args) throws Exception {
        final String BASE_URL = "https://api.justoneapi.com"; // OpenAPI 서버 설정에서 제공
        final String url = BASE_URL + "/api/weixin/search-article/v2";

        HttpClient client = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(120)).build();
        HttpRequest.Builder builder = HttpRequest.newBuilder()
            .uri(URI.create(url))
            .timeout(Duration.ofSeconds(120))
            .header("Content-Type", "application/x-www-form-urlencoded")
            .method("POST", HttpRequest.BodyPublishers.ofString("token=YOUR_API_KEY&keyword=string&subSearchType=ALL&currentPage=1&offset=0&cookies_buffer="));

        HttpRequest request = builder.build();

        HttpResponse<byte[]> response = client.send(request, HttpResponse.BodyHandlers.ofByteArray());
        System.out.println(response.statusCode());
        String contentType = response.headers().firstValue("content-type").orElse("").toLowerCase();
        String mediaType = contentType.split(";", 2)[0].trim();
        if (contentType.startsWith("text/") || contentType.contains("json") || contentType.contains("xml") || mediaType.equals("application/javascript") || mediaType.equals("application/x-www-form-urlencoded") || mediaType.equals("application/graphql")) {
            System.out.println(new String(response.body(), StandardCharsets.UTF_8));
        } else {
            Files.write(Path.of("response.bin"), response.body());
            System.out.println("Saved " + response.body().length + " bytes to response.bin");
        }
    }
}
```

```go [🐹 Go]
package main

import (
	"fmt"
	"io"
	"os"
	"strings"
	"net/http"
	"time"
)

const BASE_URL = "https://api.justoneapi.com" // OpenAPI 서버 설정에서 제공

func main() {
	client := &http.Client{Timeout: 120 * time.Second}
	url := BASE_URL + "/api/weixin/search-article/v2"
	var data = strings.NewReader("token=YOUR_API_KEY&keyword=string&subSearchType=ALL&currentPage=1&offset=0&cookies_buffer=")
	req, _ := http.NewRequest("POST", url, data)
	req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	fmt.Println(resp.StatusCode)
	bodyBytes, _ := io.ReadAll(resp.Body)
	contentType := strings.ToLower(resp.Header.Get("Content-Type"))
	mediaType := strings.TrimSpace(strings.SplitN(contentType, ";", 2)[0])
	if strings.HasPrefix(contentType, "text/") || strings.Contains(contentType, "json") || strings.Contains(contentType, "xml") || mediaType == "application/javascript" || mediaType == "application/x-www-form-urlencoded" || mediaType == "application/graphql" {
		fmt.Println(string(bodyBytes))
	} else {
		os.WriteFile("response.bin", bodyBytes, 0600)
		fmt.Printf("Saved %d bytes to response.bin\n", len(bodyBytes))
	}
}
```

```php [🐘 PHP]
<?php
$BASE_URL = 'https://api.justoneapi.com'; // OpenAPI 서버 설정에서 제공
$url = $BASE_URL . '/api/weixin/search-article/v2';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, 'token=YOUR_API_KEY&keyword=string&subSearchType=ALL&currentPage=1&offset=0&cookies_buffer=');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/x-www-form-urlencoded',
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
$contentType = strtolower((string) curl_getinfo($ch, CURLINFO_CONTENT_TYPE));
curl_close($ch);
echo $status . PHP_EOL;
$mediaType = trim(explode(';', $contentType, 2)[0]);
if (str_starts_with($contentType, 'text/') || str_contains($contentType, 'json') || str_contains($contentType, 'xml') || in_array($mediaType, ['application/javascript', 'application/x-www-form-urlencoded', 'application/graphql'], true)) {
    echo $response;
} else {
    file_put_contents('response.bin', $response);
    echo 'Saved ' . strlen($response) . ' bytes to response.bin' . PHP_EOL;
}
```

:::

<div style="text-align: right; margin-top: -20px; margin-bottom: 20px;">
<a href="/openapi/wechat-official-accounts/article-search-v2-ko.json" target="_blank" style="font-size: 12px; color: var(--vp-c-text-3); text-decoration: none; opacity: 0.8;">[OpenAPI 정의(JSON)]</a>
</div>

## 응답 필드

성공 응답(`code = 0`)의 주요 필드입니다.

<div class="api-doc-table api-doc-table--response">

| 필드 경로 | 유형 | 설명 |
| --- | --- | --- |
| <code>data</code> | <code>object</code> | 요청된 페이지에 대한 검색 결과 및 계속 정보. 계속 상태가 사용할 수 없을 경우 성공적인 API 응답에는 빈 객체가 포함될 수 있습니다. |
| <code>data.data</code> | <code>array</code> | 요청된 페이지에 대해 반환된 기사 결과 그룹. |
| <code>data.data[]</code> | <code>object</code> | 기사 검색 결과의 하나의 그룹. |
| <code>data.data[].count</code> | <code>integer</code> | 현재 페이지에 대해 이 그룹에서 보고된 기사 수. |
| <code>data.data[].totalCount</code> | <code>integer</code> | 결과 그룹에 대한 보고된 총계. 페이지마다 변경될 수 있습니다. |
| <code>data.data[].items</code> | <code>array</code> | 현재 페이지에서 이 그룹에 포함된 기사들. |
| <code>data.data[].items[]</code> | <code>object</code> | 검색 결과 그룹당 하나의 기사. |
| <code>data.data[].items[].docID</code> | <code>string</code> | 이 기사 검색 결과에 대해 보고된 문서 식별자. |
| <code>data.data[].items[].title</code> | <code>string</code> | 검색 결과에 표시되는 기사 제목. |
| <code>data.data[].items[].desc</code> | <code>string</code> | 검색 결과에 표시되는 기사 발췌문. |
| <code>data.data[].items[].doc_url</code> | <code>string</code> | WeChat 공식 계정 기사에 대한 링크. |
| <code>data.data[].items[].thumbUrl</code> | <code>string</code> | 검색 결과에 표시된 축소판 이미지에 대한 링크. |
| <code>data.data[].items[].timestamp</code> | <code>integer</code> | 검색 결과에 의해 보고된 기사 시간, 유닉스 에포크 초로 표시. |
| <code>data.data[].items[].date</code> | <code>integer</code> | 검색 결과에서 반환된 숫자형 기사 날짜 값. |
| <code>data.data[].items[].docType</code> | <code>integer</code> | 검색 결과에 대해 보고된 숫자형 문서 유형 코드. |
| <code>data.data[].items[].src_type</code> | <code>integer</code> | 기사에 대해 보고된 숫자형 소스 유형 코드. |
| <code>data.data[].items[].source</code> | <code>object</code> | 기사에 대한 출판 소스 정보가 표시됩니다. |
| <code>data.data[].items[].source.title</code> | <code>string</code> | 반환될 때 기사 소스의 표시 이름. |
| <code>data.data[].items[].source.dateTime</code> | <code>string</code> | 기사 소스와 함께 표시되는 포맷된 시간 라벨. |
| <code>data.data[].items[].source.tag</code> | <code>array</code> | 이 소스와 관련된 태그의 표시. |
| <code>data.data[].items[].source.tag[]</code> | <code>object</code> | 소스에 대한 하나의 표시 태그. |
| <code>data.data[].items[].source.tag[].title</code> | <code>string</code> | 소스 태그의 가시적 텍스트. |
| <code>data.data[].items[].source.tag[].type</code> | <code>integer</code> | 소스 태그에 대해 보고된 숫자형 유형 코드. |
| <code>data.data[].items[].source.tag[].noBg</code> | <code>boolean</code> | 소스 태그가 배경 없이 표시되도록 표시되었는지 여부. |
| <code>data.continueFlag</code> | <code>integer</code> | 검색 보고서가 더 많은 페이지를 나타내는지 여부를 나타내는 플래그. 관찰된 값은 더 많을 경우 1, 끝일 경우 0입니다. 마지막 페이지에도 여전히 기사가 포함될 수 있습니다. |
| <code>data.offset</code> | <code>integer</code> | 다른 페이지가 사용 가능할 때 계속 요청으로 전송할 오프셋. |
| <code>data.pageNumber</code> | <code>integer</code> | 현재 검색 응답에 보고된 페이지 번호. |
| <code>data.cookies</code> | <code>string</code> | JSON로 인코딩된 연속 데이터. 다음 페이지에서는 이 문자열을 파싱하고, 그에 포함된 cookies_buffer 값을 반환된 offset 및 다음 currentPage와 함께 form body에 전달해야 합니다. |
| <code>data.cookies (JSON)</code> | <code>object</code> | 응답 문자열 내부에 인코딩된 계속 객체. |
| <code>data.ret</code> | <code>integer</code> | 결과 데이터 내에서 보고된 검색 상태 코드. |
| <code>data.query</code> | <code>string</code> | 응답에 반영된 검색 쿼리 텍스트. |
| <code>data.lang</code> | <code>string</code> | 결과 데이터에 대해 보고된 언어 라벨. |
| <code>data.timeStamp</code> | <code>integer</code> | 검색 응답에 대한 타임스탬프, Unix epoch 초로 보고됨. |
| <code>data.nomoreText</code> | <code>string</code> | 검색 결과 끝에 보고된 표시 메시지, 사용 가능할 때. |
| <code>data.category</code> | <code>array</code> | 결과와 함께 반환된 검색 카테고리 레이블, 사용 가능할 때. |
| <code>data.category[]</code> | <code>object</code> | 하나의 검색 카테고리. |
| <code>data.category[].word</code> | <code>string</code> | 검색 카테고리의 표시 라벨. |
| <code>data.category[].type</code> | <code>integer</code> | 검색으로 반환된 숫자형 카테고리 유형 코드. |
| <code>data.category[].selected</code> | <code>integer</code> | 이 카테고리에 대한 숫자 선택 플래그, 반환될 때. |
| <code>data.slideFilter</code> | <code>object</code> | 검색 결과와 함께 표시된 필터의 메타데이터를 표시합니다. |
| <code>data.slideFilter.filters</code> | <code>array</code> | 결과 목록 옆에 필터가 표시됩니다. |
| <code>data.slideFilter.filters[]</code> | <code>object</code> | 하나의 표시된 결과 필터. |
| <code>data.slideFilter.filters[].title</code> | <code>string</code> | 검색 필터의 표시 제목. |
| <code>data.slideFilter.filters[].options</code> | <code>array</code> | 필터에 대해 보고된 표시 옵션. |
| <code>data.slideFilter.filters[].options[]</code> | <code>object</code> | 검색 결과 필터의 하나의 표시 옵션. |
| <code>data.slideFilter.filters[].options[].title</code> | <code>string</code> | 필터 옵션의 표시 레이블. |
| <code>data.slideFilter.filters[].options[].selected</code> | <code>integer</code> | 이 필터 옵션에 대한 숫자형 선택 플래그, 반환될 때. |
| <code>data.slideFilter.filters[].options[].iconUrl</code> | <code>string</code> | 이 필터 옵션에 대한 아이콘 링크가 표시됩니다. |
| <code>data.slideFilter.filters[].options[].selectedIconUrl</code> | <code>string</code> | 선택된 필터 옵션 상태에 대한 아이콘 링크. |

</div>

## 응답 예시

<ApiExampleSection :api='JSON.parse("\"/api/weixin/search-article/v2\"")' />

