GET /v1/crawl/google/news

Google News API: news search results for a query as RSS

Send search text in q and get Google News results for it as the public RSS feed, an XML document of headlines with their source, link and date. A search with no results is not billed.

Price
$0.0005 per call
Batch
Yes, through /v1/batch
Failed calls
Not charged

Example request

curl
curl 'https://api.virev.ai/v1/crawl/google/news?q=openai' \
  -H "Authorization: Bearer $VIREV_API_KEY"
python
import os
import requests

response = requests.request(
    "GET",
    "https://api.virev.ai/v1/crawl/google/news",
    params={
        "q": "openai",
    },
    headers={"Authorization": f"Bearer {os.environ['VIREV_API_KEY']}"},
    timeout=60,
)
response.raise_for_status()
print(response.json())

Parameters

NameInTypeDescription
q requiredquerystringThe news search text. Example openai.

Example response

The example response of the API reference, with lists cut to their first 3 items and long text shortened.

json
{
  "data": {
    "final_url": "https://news.google.com/rss/search?q=openai&hl=en-US&gl=US&ceid=US%3Aen",
    "status": 200,
    "content_type": "application/xml; charset=utf-8",
    "payload_kind": "text",
    "response_headers": {
      "content-type": "application/xml; charset=utf-8",
      "cache-control": "no-cache, no-store, max-age=0, must-revalidate",
      "expires": "Mon, 01 Jan 1990 00:00:00 GMT"
    },
    "body": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><rss version=\"2.0\" xmlns:media=\"http://search.yahoo.com/mrss/\"><channel><generator>NFE/5.0</generator><title>\"openai\" - Google News</title><link>https://news.google.com/search?q=openai&…"
  },
  "meta": {
    "cost": "$0.0005",
    "balance": "$3.0710",
    "request_id": "req_c28de751e45adbac80d0028fcc65d1e5"
  }
}

How it works

Google News search results for a query, as the public RSS feed (XML). A search with no results is not billed.

Errors

StatusWhen
400The request parameters are invalid.
401Missing, malformed, or revoked API key.
402Balance is too low for this request.
404The page does not exist: its site answered 404 or 410 for this input. You are not charged.
429Over the per-minute limit. The limit belongs to your organization and all its API keys share it: 100 requests per minute unless an increase was granted. Wait for the Retry-After seconds, then retry. On a live read, code rate_limited means the platform itself rate-limited this read; retry after the Retry-After seconds. You are not charged.
502The upstream fetch failed. You are not charged.
503Billing could not be confirmed, so no upstream data was returned.
504The upstream request timed out. You are not charged.