# FlashData Google News API

Googleニュース記事を見出し、ソース出版物、リンク、出版物の日付で取得します。 各国、言語、日付範囲でフィルタリングします。

キャニシニカル参照: https://flashdata.dev/ja/docs/sources/google_news
レビュー: 2026-10-23

エンドポイント: POST https://data.flashdata.dev/v1/queries/realtime
認証: X-API-Key: YOUR_API_KEY
モード: [Realtime](https://flashdata.dev/ja/docs/reference/realtime-and-async/reference.md#realtime) · [Async](https://flashdata.dev/ja/docs/reference/realtime-and-async/reference.md#async) · [Batch](https://flashdata.dev/ja/docs/reference/batch-and-bulk/reference.md#batch)

必要なソース権限: google_news

YOUR_API_KEYをAPIキーに置き換え、このソースの許可と利用可能なクレジットを持っています。 サーバやエージェントホストのリクエストを実行します。

[認証の設定](https://flashdata.dev/ja/docs/guides/headers-and-authentication/reference.md)

[Google検索を選択および精製](https://flashdata.dev/ja/docs/guides/google-search-guide/reference.md)

<a id="quickstart"></a>

## リクエストを送信

### Python

```bash
python3 -m pip install requests
```

```python
import json

import requests

api_key = "YOUR_API_KEY"
payload = {
    "source": "google_news",
    "query": "renewable energy",
    "params": {
        "gl": "us",
        "hl": "en",
        "num": 10,
        "page": 1,
    },
}

response = requests.post(
    "https://data.flashdata.dev/v1/queries/realtime",
    headers={"X-API-Key": api_key},
    json=payload,
    timeout=120,
)
response.raise_for_status()
print(json.dumps(response.json(), ensure_ascii=False, indent=2))
```

### Bash / cURL

```bash
api_key="YOUR_API_KEY"
curl --fail-with-body --max-time 120 --request POST "https://data.flashdata.dev/v1/queries/realtime" \
  --header "Content-Type: application/json" \
  --header "X-API-Key: $api_key" \
  --data-binary @- <<'FLASHDATA_JSON'
{
  "source": "google_news",
  "query": "renewable energy",
  "params": {
    "gl": "us",
    "hl": "en",
    "num": 10,
    "page": 1
  }
}
FLASHDATA_JSON
```

<a id="parameters"></a>

## パラメーター

<a id="parameters-group-0"></a>

### リクエストボディ

| パラメータ | 種類 | 必須 | 既定値 | 説明: |
| --- | --- | --- | --- | --- |
| <a id="parameter-source"></a> source | string | はい はい | — | google_newsに設定します。  |
| <a id="parameter-query"></a> query | string | はい はい | 設定なし | クエリを検索します。 Googleの検索演算子をサイト: と intitle などのサポートします。 最少の長さ: 1。 最高長さ: 2000。 |
| <a id="parameter-params"></a> params | object | ノーザン | {} | この要求のためのSettings。  |
| <a id="parameter-callback_url"></a> callback_url | string · nullable | ノーザン | 設定なし | Asyncとバッチだけ。 パブリック HTTPS エントリーフォーム URL 港に 443まで、 2,048 文字。 ユーザーの資格情報や URL フラグメントはありません。 Omit は、通知なしの null または空の文字列を使用します。 バッチでは、各クエリで、外部のパラメータで設定します。  |

<a id="parameters-group-1"></a>

### 国、言語、場所

| パラメータ | 種類 | 必須 | 既定値 | 説明: |
| --- | --- | --- | --- | --- |
| <a id="parameter-params-gl"></a> params.gl | string | ノーザン | 設定なし | 私たち、gb、de、sg などの2文字の国コード。 国を選択するために明示的に設定します。 最少の長さ: 2。 最高長さ: 2。 パターン:^[A-Za-z]{2}$ |
| <a id="parameter-params-hl"></a> params.hl | string | ノーザン | 設定なし | Googleインターフェイス言語。 言語を選択するために明示的に設定します。 最少の長さ: 1。 最高長さ: 35。 パターン:^[A-Za-z0-9-]+$ |
| <a id="parameter-params-location"></a> params.location | string | ノーザン | 設定なし | "London, England, United Kingdom"のような都市、好ましく検索場所を要求しました。 空室状況は検索タイプによって異なります。 最少の長さ: 1。 最高長さ: 200。 |

<a id="parameters-group-2"></a>

### パジネーション

| パラメータ | 種類 | 必須 | 既定値 | 説明: |
| --- | --- | --- | --- | --- |
| <a id="parameter-params-num"></a> params.num | integer | ノーザン | 設定なし | リクエストされた結果のカウント。 FlashData は省略時に固定されたデフォルトは追加しません。 返されたカウントはクエリと検索タイプによって異なる場合があります。 最小: 1。 最高: 100。 |
| <a id="parameter-params-page"></a> params.page | integer | ノーザン | 設定なし | リクエスト結果ページ。 明示的に設定します。 各ページは別々のAPIリクエストです。 最小: 1。 最高: 100。 |

<a id="parameters-group-3"></a>

### フィルターを検索

| パラメータ | 種類 | 必須 | 既定値 | 説明: |
| --- | --- | --- | --- | --- |
| <a id="parameter-params-tbs"></a> params.tbs | string | ノーザン | 設定なし | qdr:d などの Google の検索フィルタを、過去の曜日または qdr:w の qdr:d などのリクエストした。 空室状況は検索タイプによって異なります。 最少の長さ: 1。 最高長さ: 200。 |
| <a id="parameter-params-autocorrect"></a> params.autocorrect | boolean | ノーザン | 設定なし | true でスペル補正をリクエストするか、false で無効にリクエストしてください。 応用動作は検索タイプによって異なります。 Googleの動作を使用する省略。  |

<a id="response"></a>

## 結果を読む

response.jsonとして成功するJSON応答を保存します。 これをread-response.pyとして保存し、python read-response.pyを実行します。 Pythonの標準ライブラリのみを使用し、新しいリクエストは使用しません。

### read-response.py

```python
import json
from pathlib import Path

response = json.loads(Path("response.json").read_text(encoding="utf-8-sig"))
if response.get("status") not in ("done", "completed") or not isinstance(response.get("results"), list):
    raise SystemExit("Expected completed result JSON; inspect the response or job status.")
if not response["results"]:
    print("[]")
    raise SystemExit(0)
result = response["results"][0]

output = [
    {"title": item.get("title"), "url": item.get("link"), "publisher": item.get("source"), "date": item.get("date")}
    for item in result.get("news", [])
]
print(json.dumps(output, ensure_ascii=False, indent=2))
```

## レスポンスの例

記録された例; フィールドとカウントは、ソースと要求された入力に依存します。
```json
{
  "source": "google_news",
  "status": "done",
  "results": [
    {
      "searchParameters": {
        "q": "renewable energy",
        "gl": "us",
        "hl": "en",
        "type": "news",
        "num": 10,
        "page": 1,
        "allowSuggested": true,
        "engine": "google"
      },
      "news": [
        {
          "title": "Molder and Hatcher discuss positions on renewable energy, nuclear power ahead of November election",
          "link": "https://tennesseelookout.com/2026/09/14/molder-and-hatcher-discuss-positions-on-renewable-energy-nuclear-power-ahead-of-november-election/",
          "snippet": "District 5 candidates Charlie Hatcher, a Republican farmer and former Tennessee agriculture commissioner, and Chaz Molder, the Democratic...",
          "date": "1 day ago",
          "source": "Tennessee Lookout",
          "imageUrl": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSyHCzprpdTHLlK8zYoWi3-Xyuoj_YpfKHcxb3VhP2GPBH5xvFAhl0fRQA&usqp=CAI&s"
        },
        {
          "title": "Climate Collaborative: Heat pumps key to hitting renewable energy goal",
          "link": "https://www.steamboatpilot.com/news/climate-collaborative-heat-pumps-key-to-hitting-renewable-energy-goal/",
          "snippet": "The Routt County Climate Action Plan Collaborative hosted an open house on Sept. 9 to address various sectors in which it is trying to...",
          "date": "1 day ago",
          "source": "Steamboat Pilot",
          "imageUrl": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHF-XD_fkuYVqCDDwoZezjCneA7C5ysheQyzjqkRXdormLaLj5qR9jvQo&usqp=CAI&s"
        },
        {
          "title": "Iowa scientists push for more renewable energy to meet growing demands",
          "link": "https://iowacapitaldispatch.com/2026/09/15/iowa-scientists-push-for-more-renewable-energy-to-meet-growing-demands/",
          "snippet": "Iowa scientists have asked Iowans to advocate for the deployment of renewable energy systems to meet growing electricity demand.",
          "date": "12 hours ago",
          "source": "Iowa Capital Dispatch",
          "imageUrl": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQZx80m4v67vKDZTGd1NZ-lTkt-5XQm9WUqp6Up0HShJaH3JuOEsItNjgU&usqp=CAI&s"
        },
        {
          "title": "Juniper Green Energy Commissions New Wind Farms Across India",
          "link": "https://www.powermag.com/juniper-green-energy-commissions-new-wind-farms-across-india/",
          "snippet": "Juniper Green Energy, an independent renewable energy power producer in India, said it has expanded its portfolio with a series of projects...",
          "date": "17 hours ago",
          "source": "POWER Magazine",
          "imageUrl": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQLmOuMsiCedjJNR3jjzRAyDxBay7VUAHaG8UZObtGY9vgnOUayFpuwsrI&usqp=CAI&s"
        },
        {
          "title": "Cameco vs. USA Rare Earth: Which Renewable Energy Stock Is a Better Buy in 2026?",
          "link": "https://www.fool.com/coverage/better-buy/2026/09/15/cameco-vs-usa-rare-earth-which-renewable-energy-stock-is-a-better-buy-in-2026/",
          "snippet": "Cameco generates $775M in free cash flow with a 17% net margin, while USA Rare Earth burns cash as it scales. The valuation gap tells a...",
          "date": "9 hours ago",
          "source": "The Motley Fool",
          "imageUrl": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTYBudJa-unYwDH3DCNtPpTMwB1cdsXPWHjYQW2joDghld74kpOZduLcZA&usqp=CAI&s"
        },
        {
          "title": "China may have a green energy overcapacity problem. Experts think AI can help solve it",
          "link": "https://fortune.com/2026/09/15/china-green-energy-ai/",
          "snippet": "Production in China's clean energy sector has grown so much that there's more energy infrastructure than the market needs.",
          "date": "1 day ago",
          "source": "Fortune",
          "imageUrl": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRW6eTu-3FM7KsoZ5q9f82RxxhcWMa29Tt6Dt8ou4p34tRp2slTyR8T5Ac&usqp=CAI&s"
        },
        {
          "title": "The Energy Transition Is Here: Why Renewable Energy Is One of the Most Compelling Investment Opportunities of Our Time",
          "link": "https://www.morningstar.com/news/accesswire/1220508msn/the-energy-transition-is-here-why-renewable-energy-is-one-of-the-most-compelling-investment-opportunities-of-our-time",
          "snippet": "by Kristin Hull, CEO of Nia Impact Capital. NORTHAMPTON, MA / ACCESS Newswire / September 14, 2026 / There is a moment in every major...",
          "date": "1 day ago",
          "source": "Morningstar",
          "imageUrl": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcROeSoUWZNvlGbcsMzYS5NQsEAXL3zePMGFzIuGwy7NHECmjznDKjdobP0&usqp=CAI&s"
        },
        {
          "title": "India's data center boom creates new engine for renewable energy",
          "link": "https://asia.nikkei.com/business/energy/india-s-data-center-boom-creates-new-engine-for-renewable-energy",
          "snippet": "BENGALURU -- India's push to become a major hub for artificial intelligence is creating a massive opportunity for the country's renewable...",
          "date": "2 days ago",
          "source": "Nikkei Asia",
          "imageUrl": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTtvz9DfrdplKh5Td53Yq079nZkvZFB7xCxLHKhhdnPQtWkUS4KuR3JeQg&usqp=CAI&s"
        },
        {
          "title": "2026 Iowa climate statement calls for renewable energy generation",
          "link": "https://cbs2iowa.com/news/local/gallery/2026-iowa-climate-statement-calls-for-renewable-energy-generation",
          "snippet": "KGAN CBS 2 and KFXA Fox 28 provide local news, weather forecasts, notices of events and items of interest in the community, sports and entertainment...",
          "date": "8 hours ago",
          "source": "KGAN",
          "imageUrl": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTnew7UX8YHNNaVBJcRcH-xbPitO4Z04Q0_5dbp6QvGdkwa42lst11tVEtV&usqp=CAI&s"
        },
        {
          "title": "Energy supply concerns push Europe, Asia toward renewable energy",
          "link": "https://www.dailysabah.com/business/energy/energy-supply-concerns-push-europe-asia-toward-renewable-energy",
          "snippet": "The supply and price shock following the start of the U.S.-Iran war has reshaped energy security policies in Europe and Asia, increasing the...",
          "date": "2 days ago",
          "source": "Daily Sabah",
          "imageUrl": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSULmlmX1DQpYr8tnbQvQO353x2S5Gsyr2YQyK9GHIGXNT9PG_5KeA_04U&usqp=CAI&s"
        }
      ]
    }
  ],
  "usage": {
    "credits": 0.02
  },
  "created_at": "2026-09-16T07:38:04.737Z"
}
```

## 応答分野

| フィールド | 種類 | 説明: |
| --- | --- | --- |
| source | string | 要求されたAPIの源。 |
| status | string | リアルタイムリクエストが成功したときに行われる。 |
| created_at | string | ISO 8601 形式の応答作成時間。 |
| usage.credits | number | リクエストに応じて請求されるクレジットは、プランに基づいて行われます。 |
| results[0].searchParameters | object | Googleで報告された検索設定は、クエリがqとして記録されています。 返された設定は、要求された値と異なる場合があります。 |
| results[0].news | array | ニュース検索結果。 |
| results[0].news[].title | string | 記事の見出し。 |
| results[0].news[].link | string | 投稿 URL. |
| results[0].news[].snippet | string · optional | 記事の抜粋。 |
| results[0].news[].source | string · optional | 出版名。 |
| results[0].news[].date | string · optional | Google で返された発行日は、相対的な可能性があります。 |
| results[0].news[].imageUrl | string · optional | 記事サムネイル。 |
| results[0].news[].position | integer · optional | 結果の位置、含まれているとき。 |

- 利用可能なフィールドは、クエリと検索タイプによって異なります。 オプションのフィールドは不在であり、追加のフィールドが返される場合があります。
- params.num は返された項目の数と searchParameters.num と異なることができます。 返された配列を使用して、実際の結果のカウントを決定します。

## レスポンス形式

応答はデフォルトでJSONを使用します。 これらのオプションヘッダーで別の形式を選択します。

- Accept: application/json (デフォルト) または text/plain. プレーンテキストは、読みやすいレイアウトで同じフィールドを提示します。
- X-Respond-With: markdown. 元のフィールドにアンセットを残します。 Markdownは、応答形式のいずれかで動作します。

Markdownはリアルタイムの問い合わせと完了した結果に利用できます。

下のフィールドは、デフォルトのJSON応答を記述します。

[リクエストとレスポンスの形式例](https://flashdata.dev/ja/docs/guides/response-formats/reference.md#headers)

<a id="job-lifecycle"></a>

<a id="async-batch"></a>

## API の基本

上記のビルダーと例は、このソースのパラメーターを使用します。 Python と cURL の例を以下に使用して、共有の投稿、ステータス、結果の手順を実行します。 Batch ボディは、クエリを含む JSON オブジェクトです。各項目は独自のジョブ ID を返します。

- [Asyncリクエストとレシート](https://flashdata.dev/ja/docs/reference/realtime-and-async/reference.md#async)

<a id="job-status"></a>

- [ジョブステータスの確認](https://flashdata.dev/ja/docs/reference/realtime-and-async/reference.md#status)

<a id="job-results"></a>

- [完了した結果を取得する](https://flashdata.dev/ja/docs/reference/realtime-and-async/reference.md#results)
- [Batch JSON リクエスト](https://flashdata.dev/ja/docs/reference/batch-and-bulk/reference.md#batch)
- [顧客OpenAPI](https://flashdata.dev/docs/openapi.json)

<a id="webhooks"></a>

<a id="callbacks"></a>

## 完了通知

- [完了のWebhooksを受信し、確認する](https://flashdata.dev/ja/docs/guides/async-batch/reference.md#webhooks)

<a id="troubleshooting"></a>

## トラブルシューティング

- [エラーとステータスコード](https://flashdata.dev/ja/docs/errors/reference.md#status-codes)
- [再試行するとき](https://flashdata.dev/ja/docs/errors/reference.md#retries)

## 関連API

- [Google Search API](https://flashdata.dev/ja/docs/sources/google_search/reference.md)
- [Google Videos API](https://flashdata.dev/ja/docs/sources/google_videos/reference.md)
