Home›Developer Center›Google News API

Google News API

API DocumentationOpenAI ChatGPT APIAnthropic (Claude) APIGoogle Gemini APIGoogle Search APIGoogle News APIOpenRouter APIAPI Pricing
CLI & Agent Guidescc-switch macOScc-switch Windowscc-switch LinuxOpenCode macOSOpenCode WindowsOpenCode LinuxOpenClaw macOSOpenClaw WindowsOpenClaw LinuxHermes Agent macOSHermes Agent WindowsHermes Agent LinuxClaude Code CLI macOSClaude Code CLI WindowsClaude Code CLI LinuxCodex CLI macOSCodex CLI WindowsCodex CLI Linux
MYAI168 API & MCPMYAI168 MCP CLIMYAI168 MCP Web & App
No matching questions on this page.Search the whole site
Google News

Google News API

Query Google News articles by keyword, returned as structured JSON (title, link, source, date). Authenticate with an Authorization: Bearer YOUR_API_KEY header (an X-Dev-Key header is also accepted), or a logged-in web session; never place keys in URL query strings (they end up in server logs). GET only; the q (query, string) parameter is required. Successful calls deduct credits automatically; failed or empty results are not charged. For web search, see the Google Search API page.

GET https://www.myai168.com/en/api/google/news

Google News, returns news articles (each with title / link / source / date; links are resolved to the original article URL when possible). Optional: hl UI language, gl region, ceid (format country:language, e.g. US:en), num number of results (1-20, default 10).

curl "https://www.myai168.com/en/api/google/news?q=Taiwan&hl=en&gl=us&num=10" \
  -H "Authorization: Bearer YOUR_DEV_KEY"
import requests

r = requests.get(
    "https://www.myai168.com/en/api/google/news",
    headers={"Authorization": "Bearer YOUR_DEV_KEY"},
    params={"q": "Taiwan", "hl": "en", "gl": "us", "num": "10"},
)
print(r.json())

Response format

Success returns HTTP 200 with a JSON object: the effective query parameters (q / hl / gl etc.), count (number of results), results (result array), cost (points charged) and credits (balance after the call); the response also carries X-Cost-Points (points charged) and X-Credits-Remaining (balance) headers. Each results item contains title / link / source / date (links are resolved to the original article URL when possible).

{
  "q": "Taiwan",
  "count": 10,
  "results": [
    {"title": "...", "link": "https://...", "source": "...", "date": "..."}
  ],
  "cost": 66,
  "credits": 12345
}

Error codes

HTTP statusMeaning
401Missing or invalid API key (repeated failures from the same IP are temporarily blocked).
402Insufficient credits (please top up).
400Missing q parameter or invalid parameters.
502Search temporarily failed — never charged.
‹ Previous page: Google Search APINext page: OpenRouter API ›
↑
Question link copied.

Other FAQ pages

API Documentation

  • OpenAI ChatGPT API
  • Anthropic (Claude) API
  • Google Gemini API
  • Google Search API
  • OpenRouter API
  • API Pricing

CLI & Agent Guides

  • cc-switch macOS
  • cc-switch Windows
  • cc-switch Linux
  • OpenCode macOS
  • OpenCode Windows
  • OpenCode Linux
  • OpenClaw macOS
  • OpenClaw Windows
  • OpenClaw Linux
  • Hermes Agent macOS
  • Hermes Agent Windows
  • Hermes Agent Linux
  • Claude Code CLI macOS
  • Claude Code CLI Windows
  • Claude Code CLI Linux
  • Codex CLI macOS
  • Codex CLI Windows
  • Codex CLI Linux

MYAI168 API & MCP

  • MYAI168 MCP CLI
  • MYAI168 MCP Web & App