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/newsGoogle 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())
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
}
| HTTP status | Meaning |
|---|---|
401 | Missing or invalid API key (repeated failures from the same IP are temporarily blocked). |
402 | Insufficient credits (please top up). |
400 | Missing q parameter or invalid parameters. |
502 | Search temporarily failed — never charged. |