# 구글 뉴스 검색



키워드의 구글 뉴스 검색 결과(제목·언론사·게시 시각·링크)를 조회합니다.



인증: Authorization: Bearer $APICK_API_KEY

본문 있는 REST 요청: multipart/form-data. GET 본문 및 MCP JSON-RPC 규격은 해당 명세를 따릅니다.

인증키는 서버에 보관하세요. 모든 예제는 정적 자료입니다.



## POST /rest/google_news_search 응답 필드

- `data` (object): 조회 데이터. 실패하면 error 에 안내 문구가 담깁니다.

- `data.keyword` (string): 요청한 검색어

- `data.page` (integer): 조회한 페이지

- `data.count` (integer): items 개수

- `data.items` (array): 뉴스 목록

- `data.items[].rank` (integer): 결과 내 순서

- `data.items[].title` (string): 기사 제목

- `data.items[].link` (string): 기사 주소

- `data.items[].source` (string): 언론사

- `data.items[].published` (string): 게시 시각 표기 (예: 1일 전)

- `data.items[].description` (string): 요약. 없으면 빈 문자열

- `data.items[].image_url` (string): 대표 이미지 주소. 없으면 빈 문자열

- `api` (object): API 호출 공통 데이터

- `api.success` (boolean): API 서버 정상 응답 여부

- `api.cost` (integer): 차감된 포인트. 실패한 응답은 0

- `api.pl_id` (integer): API 결제 로그 ID

- `api.ms` (integer): API 응답 시간(밀리초)

## API 요청: POST /rest/google_news_search



### 입력

- `keyword` (string, 필수): 검색어 (1~200자)

- `page` (string, 선택): 결과 페이지 1~10 (기본값 1)



### 응답 명세

```json

{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "keyword": {
          "type": "string",
          "description": "요청한 검색어"
        },
        "page": {
          "type": "integer",
          "description": "조회한 페이지"
        },
        "count": {
          "type": "integer",
          "description": "items 개수"
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "rank": {
                "type": "integer",
                "description": "결과 내 순서"
              },
              "title": {
                "type": "string",
                "description": "기사 제목"
              },
              "link": {
                "type": "string",
                "description": "기사 주소"
              },
              "source": {
                "type": "string",
                "description": "언론사"
              },
              "published": {
                "type": "string",
                "description": "게시 시각 표기 (예: 1일 전)"
              },
              "description": {
                "type": "string",
                "description": "요약. 없으면 빈 문자열"
              },
              "image_url": {
                "type": "string",
                "description": "대표 이미지 주소. 없으면 빈 문자열"
              }
            }
          },
          "description": "뉴스 목록"
        }
      },
      "description": "조회 데이터. 실패하면 error 에 안내 문구가 담깁니다."
    },
    "api": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "API 서버 정상 응답 여부"
        },
        "cost": {
          "type": "integer",
          "description": "차감된 포인트. 실패한 응답은 0"
        },
        "pl_id": {
          "type": "integer",
          "description": "API 결제 로그 ID"
        },
        "ms": {
          "type": "integer",
          "description": "API 응답 시간(밀리초)"
        }
      },
      "description": "API 호출 공통 데이터"
    }
  }
}

```

### 정적 응답 예시

```json

{
  "data": {
    "keyword": "반도체",
    "page": 1,
    "count": 1,
    "items": [
      {
        "rank": 1,
        "title": "이번주 코스피, 삼성전자 실적에 달렸다",
        "link": "https://www.khan.co.kr/article/202610051343001",
        "source": "경향신문",
        "published": "1일 전",
        "description": "",
        "image_url": ""
      }
    ]
  },
  "api": {
    "success": true,
    "cost": 5,
    "pl_id": 1595635,
    "ms": 6120
  }
}

```

### curl

```curl

curl --fail-with-body --request POST 'https://apick.app/rest/google_news_search' \
  --header "Authorization: Bearer $APICK_API_KEY" \
  --form-string 'keyword=반도체' \
  --form-string 'page=1'

```

### Node.js (서버 ESM)

```javascript

const form = new FormData();
form.append("keyword", "반도체");
form.append("page", "1");
const response = await fetch("https://apick.app/rest/google_news_search", {
  method: "POST",
  headers: { Authorization: "Bearer " + process.env.APICK_API_KEY },
  body: form,
  signal: AbortSignal.timeout(120_000),
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
const result = await response.json();
console.log(result);

```

### python

```python

import os
import requests
parts = [
    ("keyword", (None, "반도체")),
    ("page", (None, "1")),
]
response = requests.request("POST", "https://apick.app/rest/google_news_search",
    headers={"Authorization": "Bearer " + os.environ["APICK_API_KEY"]},
    files=parts,
    timeout=(10, 120))
response.raise_for_status()
result = response.json()
print(result)

```

### php

```php

<?php
$headers = ["Authorization: Bearer " . getenv("APICK_API_KEY")];
$form = [
    'keyword' => '반도체',
    'page' => '1',
];
$curl = curl_init('https://apick.app/rest/google_news_search');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_POSTFIELDS => $form,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CONNECTTIMEOUT => 10, CURLOPT_TIMEOUT => 120,
]);
$body = curl_exec($curl);
if ($body === false) { throw new RuntimeException(curl_error($curl)); }
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($status >= 400) { throw new RuntimeException($body); }
$result = json_decode($body, true, 512, JSON_THROW_ON_ERROR);
print_r($result);

```

## 코드·오류

## 상세 기능·요금

Method URL POST https://apick.app/rest/google_news_search 페이지를 입력하지 않으면 1페이지 결과를 조회합니다. 실패한 호출(입력 오류, 시간 초과, 대상 없음)은 과금하지 않습니다. 같은 요청은 최대 10분 동안 같은 결과가 반환될 수 있습니다. API 호출 요청 요청하기 Key Value keyword page 응답

## 상세 요청

Header 이름 필수 설명 Authorization O Bearer 인증키

## 상세 응답

Body 이름 타입 설명 data Object 조회 데이터. 실패하면 error 에 안내 문구가 담깁니다. keyword String 요청한 검색어 page Integer 조회한 페이지 count Integer items 개수 items Array 뉴스 목록 rank Integer 결과 내 순서 title String 기사 제목 link String 기사 주소 source String 언론사 published String 게시 시각 표기 (예: 1일 전) description String 요약. 없으면 빈 문자열 image_url String 대표 이미지 주소. 없으면 빈 문자열 api Object API 호출 공통 데이터 success Boolean API 서버 정상 응답 여부 cost Integer 차감된 포인트. 실패한 응답은 0 ms Integer API 응답 시간(밀리초) pl_id Integer API 결제 로그 ID

## 상세 예제

요청 예시 form-data 전체 예제 보기 응답 예시 { "data": { "keyword": "반도체", "page": 1, "count": 1, "items": [ { "rank": 1, "title": "이번주 코스피, 삼성전자 실적에 달렸다", "link": "https://www.khan.co.kr/article/202610051343001", "source": "경향신문", "published": "1일 전", "description": "", "image_url": "" } ] }, "api": { "success": true, "cost": 5, "pl_id": 1595635, "ms": 6120 } }
