DEV Community

GridForge
GridForge

Posted on

Export Google News results to CSV with Python in 5 minutes

Google News has no official API. If you want news for a keyword in a spreadsheet, for brand monitoring, a weekly PR report, competitor tracking, or feeding an AI agent, you usually end up copy-pasting.

This tutorial gets you a clean CSV in about 5 minutes. Disclosure: I built the tool used here (GridForge Google News Scraper on Apify). It reads Google News' public RSS feeds, so there's no browser automation and nothing to break when the page layout changes.

What you get

One row per article:

Field Example
query site:techcrunch.com startups when:7d
title Example headline - TechCrunch
publisher TechCrunch
publisherUrl https://techcrunch.com/
publishedAt 2026-10-29T14:06:20+00:00
googleNewsUrl https://news.google.com/rss/articles/...

Duplicates across your searches are removed. Google News search operators work: site:, when:7d, "exact phrase", -exclude.

Option 1: no code

  1. Open the tool page and click Try for free.
  2. Type your searches, one per line.
  3. Click Start, then Export to CSV or Excel.

Apify's free plan includes monthly credits, and the tool costs $2 per 1,000 articles, so small monitoring jobs fit inside the free credits.

Option 2: Python

pip install apify-client
Enter fullscreen mode Exit fullscreen mode

Grab your API token from Apify (Settings → API & Integrations) and set it as APIFY_TOKEN.

import csv, os
from decimal import Decimal
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])

run = client.actor("gridforge/google-news-scraper").call(
    run_input={
        "queries": ["artificial intelligence when:7d", "site:techcrunch.com startups when:7d"],
        "language": "en",
        "country": "US",
        "maxArticlesPerQuery": 20,
    },
    max_total_charge_usd=Decimal("0.10"),  # hard spending cap for this run
)

rows = [r for r in client.dataset(run["defaultDatasetId"]).iterate_items() if r.get("status") == "ok"]

with open("news.csv", "w", newline="", encoding="utf-8") as f:
    w = csv.DictWriter(f, fieldnames=["query", "title", "publisher", "publishedAt", "googleNewsUrl", "publisherUrl"], extrasaction="ignore")
    w.writeheader()
    w.writerows(rows)

print(f"Saved {len(rows)} articles to news.csv")
Enter fullscreen mode Exit fullscreen mode

That's it. Open news.csv in Excel or Google Sheets.

Make it a daily monitor

In the Apify console, open the tool → Schedules → run it every morning with the same input. Each run's results land in a new dataset you can pull with the same script, or send to Google Sheets, Slack or a webhook through Apify integrations or Zapier/Make/n8n.

Limits worth knowing

  • Google's feed returns up to about 100 articles per search. For more coverage, split into narrower searches (by site, phrase or when:1d).
  • You get headline, publisher, date and link, not full article text.
  • Results reflect what Google News shows at run time.

Cost

$2 per 1,000 articles plus a tiny per-run start fee. Searches that fail aren't charged per article. Set max_total_charge_usd (or the spending limit in the console) and a run can never cost more than you allow.

Questions or a field you need? Leave a comment and I'll take a look.

Not affiliated with or endorsed by Google.

Top comments (1)

Collapse
 
magia_cc_0f5823d6cb56ed5 profile image
magia c'c •

Deduplicating across searches is useful, but a single query column can hide which searches matched the same article. Could you return matchedQueries as a list before writing one CSV row? Keeping collected_at beside publishedAt would also distinguish feed freshness from the age of the article.