google-news

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Google News API

Google News API

Google News headlines and search as clean JSON — one plain HTTP GET per call, paid as you go. No RSS feed scraping, no redirect-URL decoding by hand, no undocumented internal endpoints.
Base URL:
https://google-news.fetcher.sh
以简洁 JSON 格式获取 Google News 头条与搜索结果——每次调用仅需一个简单的 HTTP GET 请求,按需付费。无需爬取 RSS 源,无需手动解码重定向 URL,无需使用未公开的内部端点。
基础 URL:
https://google-news.fetcher.sh

Authentication

认证方式

Two ways to pay, same data — full mechanics in the
fetcher
skill
:
bash
undefined
两种付费方式,获取的数据一致——完整机制详见
fetcher
技能
bash
undefined

1. Prepaid credits (recommended — get a key at https://fetcher.sh/topup

1. 预付费额度(推荐——可通过 https://fetcher.sh/topup 或 POST /api/credits/topup 获取密钥,详见 fetcher 技能)

or via POST /api/credits/topup, see the fetcher skill)

export FETCHER_API_KEY="bby_live_xxxxxxxxxxxx" curl -H "Authorization: Bearer $FETCHER_API_KEY"
"https://google-news.fetcher.sh/api/search?keyword=hello&languageCode=en-US"
export FETCHER_API_KEY="bby_live_xxxxxxxxxxxx" curl -H "Authorization: Bearer $FETCHER_API_KEY"
"https://google-news.fetcher.sh/api/search?keyword=hello&languageCode=en-US"

2. x402 pay-per-call — omit the header; a GET with no payment returns 402

2. x402 按调用付费——省略请求头;未付费的 GET 请求会返回 402 状态码,附带机器可读的支付要求(支持在 Base、Polygon、Arbitrum、Monad 或 Solana 链上使用 USDC 支付)。@x402/fetch 会自动签名并重试请求。

with machine-readable payment requirements (USDC on Base, Polygon,

Arbitrum, Monad, or Solana). @x402/fetch signs and retries automatically.


Every response is `{ "status": number, "message": string, "data": ... }`; the
HTTP status mirrors `status`.

每个响应格式均为 `{ "status": number, "message": string, "data": ... }`;HTTP 状态码与 `status` 字段值一致。

Endpoints (12 — all GET, $0.005/call)

端点(共12个——均为 GET 请求,每次调用 $0.005)

EndpointWhat it returns
/api/search
Headlines matching a keyword, in one language edition
/api/latest
Latest headlines
/api/world
World section headlines
/api/business
Business section headlines
/api/technology
Technology section headlines
/api/entertainment
Entertainment section headlines
/api/sport
Sport section headlines
/api/science
Science section headlines
/api/health
Health section headlines
/api/topic/{topicId}
Headlines for an arbitrary topic ID
/api/language-regions
Every supported
languageCode
value
/api/decode-article-url
Resolves a Google News redirect URL to the real article URL
languageCode
(e.g.
en-US
,
en-GB
,
fr-FR
) is required on every endpoint except
/api/language-regions
, which takes no parameters at all and exists specifically to list the valid values.
keyword
is additionally required on
/api/search
;
url
is required on
/api/decode-article-url
.
端点返回内容
/api/search
匹配关键词的特定语言版本头条
/api/latest
最新头条
/api/world
国际板块头条
/api/business
商业板块头条
/api/technology
科技板块头条
/api/entertainment
娱乐板块头条
/api/sport
体育板块头条
/api/science
科学板块头条
/api/health
健康板块头条
/api/topic/{topicId}
任意主题 ID 对应的头条
/api/language-regions
所有支持的
languageCode
/api/decode-article-url
将 Google News 重定向 URL 解析为真实文章 URL
languageCode
(例如
en-US
en-GB
fr-FR
)是
/api/language-regions
外所有端点的必填参数
/api/language-regions
无需任何参数,专门用于列出有效的
languageCode
值。
/api/search
额外需要
keyword
参数;
/api/decode-article-url
需要
url
参数。

Scenarios

使用场景

Keyword search, US English edition:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
  --data-urlencode "keyword=stablecoin regulation" -G \
  --data-urlencode "languageCode=en-US" \
  "https://google-news.fetcher.sh/api/search"
Same search, UK English edition:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
  --data-urlencode "keyword=ai policy" -G \
  --data-urlencode "languageCode=en-GB" \
  "https://google-news.fetcher.sh/api/search"
Section headlines (technology, business):
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
  --data-urlencode "languageCode=en-US" -G \
  "https://google-news.fetcher.sh/api/technology"

curl -H "Authorization: Bearer $FETCHER_API_KEY" \
  --data-urlencode "languageCode=en-US" -G \
  "https://google-news.fetcher.sh/api/business"
Headlines for a specific topic ID:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
  --data-urlencode "languageCode=en-US" -G \
  "https://google-news.fetcher.sh/api/topic/CAAqJggKIiBDQkFTRWdvSUwyMHZNRGxqTVdZU0FtVnVHZ0pWVXlnQVAB"
List every supported language/region code before picking one:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
  "https://google-news.fetcher.sh/api/language-regions"
Decode a Google News redirect URL into the real article link:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" -G \
  --data-urlencode "url=https://news.google.com/rss/articles/CBMi..." \
  "https://google-news.fetcher.sh/api/decode-article-url"
关键词搜索(美国英语版本):
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
  --data-urlencode "keyword=stablecoin regulation" -G \
  --data-urlencode "languageCode=en-US" \
  "https://google-news.fetcher.sh/api/search"
相同搜索(英国英语版本):
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
  --data-urlencode "keyword=ai policy" -G \
  --data-urlencode "languageCode=en-GB" \
  "https://google-news.fetcher.sh/api/search"
板块头条(科技、商业):
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
  --data-urlencode "languageCode=en-US" -G \
  "https://google-news.fetcher.sh/api/technology"

curl -H "Authorization: Bearer $FETCHER_API_KEY" \
  --data-urlencode "languageCode=en-US" -G \
  "https://google-news.fetcher.sh/api/business"
特定主题 ID 的头条:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
  --data-urlencode "languageCode=en-US" -G \
  "https://google-news.fetcher.sh/api/topic/CAAqJggKIiBDQkFTRWdvSUwyMHZNRGxqTVdZU0FtVnVHZ0pWVXlnQVAB"
列出所有支持的语言/区域代码后再选择:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
  "https://google-news.fetcher.sh/api/language-regions"
将 Google News 重定向 URL 解码为真实文章链接:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" -G \
  --data-urlencode "url=https://news.google.com/rss/articles/CBMi..." \
  "https://google-news.fetcher.sh/api/decode-article-url"

MCP

MCP

json
{
  "mcpServers": {
    "google-news": {
      "url": "https://google-news.fetcher.sh/mcp",
      "headers": { "Authorization": "Bearer bby_live_..." }
    }
  }
}
Free:
search_endpoints
,
describe_endpoint
,
check_balance
. Paid:
fetch_data
(any endpoint above),
topup_credits
, plus the named shortcut
google_news_search
. Drop the
headers
block to pay per call with x402 instead — see the
fetcher
skill
for the full flow.
json
{
  "mcpServers": {
    "google-news": {
      "url": "https://google-news.fetcher.sh/mcp",
      "headers": { "Authorization": "Bearer bby_live_..." }
    }
  }
}
免费功能:
search_endpoints
describe_endpoint
check_balance
。付费功能:
fetch_data
(上述任意端点)、
topup_credits
,以及命名快捷方式
google_news_search
。若要使用 x402 按调用付费,可移除
headers
块——完整流程详见
fetcher
技能

Errors

错误说明

  • 400
    — missing/invalid parameter (message names it) — most commonly a missing
    languageCode
  • 401
    — unknown or rotated key
  • 402
    — payment required (x402 challenge) or
    topup_required
    (credits exhausted)
  • 404
    — not a priced path
  • No rate limits; no refunds on upstream failures (settlement precedes delivery)
  • 400
    —— 参数缺失/无效(消息中会指明具体参数)——最常见的是缺少
    languageCode
  • 401
    —— 密钥未知或已过期
  • 402
    —— 需要支付(x402 验证挑战)或
    topup_required
    (额度耗尽)
  • 404
    —— 路径未定价
  • 无速率限制;上游失败不予退款(结算先于交付)

Reference

参考链接