Zero-Proxy 128MB Google News Scraper: 5-in-1 URL Decoder, Streaming RAG & Crisis Triggers (MCP v2.8)
If you have ever tried to feed Google News into an LLM/RAG pipeline, a PR crisis monitor, or a B2B sales trigger workflow, you probably hit the same four walls within 20 minutes: Obfuscated news.google.com/rss/article
If you have ever tried to feed Google News into an LLM/RAG pipeline, a PR crisis monitor, or a B2B sales trigger workflow, you probably hit the same four walls within 20 minutes:
-
Obfuscated
news.google.com/rss/articles/CBMi...redirect URLs that broke base64 decoding in late 2024 and now require Google's internalbatchexecuteRPC (Fbv4je) β or spawning a 2β4 GB headless Chromium container just to follow a link. -
Instant
HTTP 429rate limits when spoofing desktopChrome/126User-Agent headers from Node.js/Python (TLS JA3 fingerprint mismatch). -
1.5β3 MB bloated publisher HTML pages packed with inline
<script>,<style>, and<svg>payloads that OOM small containers when extracting full article text for RAG. - Paywalled Tier-1 links (WSJ, Reuters, Nature) returning 80-word teasers, plus duplicate cross-lingual coverage billing you repeatedly on scheduled cron runs.
We solved all four inside a 128 MB pure-HTTP Node.js 22 container (zero Puppeteer/Playwright, zero residential proxy requirement) and measured it live on Apify Cloud AWS Linux containers:
| Cloud Run Mode (128 MB Linux) | Peak RAM | Wall Time | Verified Live Output |
|---|---|---|---|
Mode A (news_headlines_intel Β· EN + KO + JA) |
53.97 MB | 7.85s |
15/15 (100%) real publisher URLs decoded across US:en, KR:ko, JP:ja
|
Mode B (full_article_rag Β· TECHNOLOGY) |
48.94 MB | 4.38s |
8/8 (100%) full-text articles, 72% streaming HTML RAM savings (4.65 MB β 1.30 MB), 26 512-token RAG chunks, 0% block rate, 1 paywall sibling rescued |
Here are the five architectural patterns that made it work.
1. Honest-UA 5-in-1 batchexecute URL Decoding + Automatic Bing News Fallback
Two empirical findings changed everything for Google News URL decoding:
-
Stop spoofing desktop Chrome UAs from pure HTTP. Spoofing
Chrome/126on/articles/...triggeredHTTP 429within ~15 requests due to TLS fingerprint mismatch. Using an honest product User-Agent on/rss/articles/...to extract thedata-n-a-sg,data-n-a-ts, anddata-n-a-idtokens β and packing 5 URLs into a singleFbv4jebatchexecutePOST β cuts RPC round-trips by 80% and returnedHTTP 200cleanly. -
Automatic
5 β 1split fallback + Bing News direct-URL engine. If any 5-item batch hits a malformed token or partial failure, the decoder automatically splits and retries individually. And if Google News RSS itself returns429/503, discovery seamlessly fails over to Bing News RSS, which already embeds unobfuscated canonical publisher URLs in itsurl=query parameter (zero decode hops).
2. On-the-Fly Streaming HTML Tag-Stripper (72β79% RAM Reduction)
Traditional article extractors buffer the entire raw HTML response (1.2β3.0 MB on modern news sites) into a V8 string and build a DOM tree with Cheerio or JSDOM. Inside a 128 MB container with 6 concurrent fetches, that spikes RSS fast.
Instead, we read ReadableStream chunks incrementally and strip <style>, <svg>, <noscript>, HTML comments (<!-- ... -->), and non-JSON-LD <script> blocks on the fly before they ever accumulate in memory, while capturing <script type="application/ld+json"> blocks into a bounded side buffer (even when they sit at the very bottom of the HTML document):
- Raw publisher HTML in our 128 MB Linux cloud run:
4.65 MB - Clean HTML retained in memory:
1.30 MB(72%reduction; up to86%on heavy sites like CNBC) - Combined with 50-article streaming dataset batches (flushing and releasing
cleanPlainText/ragChunksevery 50 items), a 2,000-article full-text RAG run stays flat inside 128β256 MB RAM.
3. 3-Layer Paywall Rescue (Cluster-Sibling Full-Text Recovery)
When a publisher returns 403, 429, or a paywall teaser (isAccessibleForFree: false or < 120 CJK-normalized words):
-
Layer 1: Extract structured JSON-LD
NewsArticle.articleBody+ streaming clean HTML paragraphs. -
Layer 2: If truncated and
<link rel="alternate" type="application/rss+xml">is advertised, fetch the publisher's official RSS feed and match strictly by canonical URL or>= 0.75title token overlap (never grabbing an unrelated recent post from a site-wide feed). -
Layer 3 (Cluster-Sibling Rescue): Google News RSS
<description>embeds curated<ol><li>alternate publishers covering the exact same breaking story at$0. When a paywalled or blocked outlet fails Layers 1β2, we decode up to 2 curated siblings and recover the full text from an open outlet (extractionStatus: "RESCUED_FROM_SIBLING"+rescuedFromPublisher/rescuedFromUrl), preserving full audit provenance.
4. CJK-Safe Word Counting, Negation-Aware Crisis NLP & Cross-Lingual Clustering
Whitespace word splitting (text.split(/\s+/).length) breaks on Japanese and Chinese articles β a 1,800-character WIRED.jp article has almost zero spaces and gets misclassified as paywall-truncated. Normalizing effective word count as spaceWords + Math.round(cjkChars * 0.55) lifted live Japanese full-text classification (WIRED.jp, Yahoo!γγ₯γΌγΉ, ζ₯ζ¬η΅ζΈζ°θ) to 3/3 (100% FULL).
We also run zero-LLM deterministic NLP across 5 core languages (EN, KO, JA, DE, ES) with SOV post-position negation awareness (so "ꡬ쑰쑰μ κ³ν μλ€" / "δΊΊε‘εζΈγθ¦ιγ" / "denies layoff rumors" sets negationSuppressed: true and crisisAlert: false), plus optional BYOK LLM escalation (OpenAI / Anthropic / Gemini) only for high-urgency or unsupported-locale articles.
5. Race-Free Immutable Run-Delta watchDiff ($0 Pre-Decode Skips)
Google News rotates its redirect tokens between runs, so URL-only deduplication fails and re-bills the same headline. Our watchDiff engine hashes three pre-decode keys β canonical URL, normalized headline + publisher domain, and entity + publisher + UTC day β and writes immutable delta_<hash>_<ts>_<rand> records (compacting cleanly every 5 runs) so parallel schedules never clobber each other and previously seen stories are skipped before URL decoding at $0.
Try It Live (Zero-Install MCP, Apify Actor, or Open-Source n8n / Clay / Make Kit)
-
Apify Actor (Pay-Per-Event:
$0.80/1Kheadlines Β·$1.50/1Kfull-text RAG, up to 50% tiered discounts,$0onwatchDiffskips): Google News Scraper β Full Text, RAG, Triggers & Monitor -
Live Unedited
OUTPUT_DASHBOARD.htmlfrom our 128 MB Cloud Run: Open Interactive Newsroom Dashboard -
Zero-Install Remote MCP Server (
v2.8.0β 14 Tools + 12 Prompts, Glama Grade A, mcptry 100/100):https://apify-factory-rapidapi-gateway.apify-factory-rapidapi-gateway.workers.dev/mcp - MIT Open-Source Automation Kit (n8n workflow #12, Clay #6, Make #6, real sample CSVs): github.com/wonderpick/apify-b2b-ecom-automation-kit
{
"mcpServers": {
"apify-b2b-ecom-mcp": {
"url": "https://apify-factory-rapidapi-gateway.apify-factory-rapidapi-gateway.workers.dev/mcp",
"headers": {
"Authorization": "Bearer YOUR_APIFY_TOKEN"
}
}
}
}
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.