# Building a World-Monitor News Engine for Traders: From ~115 Public Sources to a Daily Brief

- URL: https://www.dhruvvakharwala.dev/blogs/saras-world-monitor-news-engine
- Author: Dhruv Vakharwala (https://www.dhruvvakharwala.dev/about)
- Published: April 11, 2026
- Category: Engineering
- Keywords: news intelligence engine, web scraping, scrapling, deduplication, simhash, agentic pipeline

> How we built Saras's agentic news engine: scrape public macro and trade intelligence, dedupe at scale, enrich with structured AI, ship a trader-facing brief.

**TL;DR:** Async news intelligence engine at Saras - aggregates ~115 public macro and trade-intel sources, dedupes at four layers (page snapshot, exact hash, SimHash near-dup, freshness), enriches via Claude + Pydantic-typed outputs, and ships a chain-of-summaries daily brief. Scrapling's `StealthyFetcher` sits in the hot path with hard timeouts.


## Introduction

I work at [Saras](https://www.saras.market/) - a platform that helps India's traders make sense of fragmented market information (advisor performance, sentiment, screeners, and news). Traders live in a firehose: central banks, statistical offices, ministries, exchanges, and global bodies all publish material that can move sectors and commodities. Reading it all, every day, is not human-scale.

So we built an internal **news intelligence engine** - codenamed **SARAS** (Strategic Agentic Research and Analysis System) in our stack - that aggregates **public** web sources across geographies, normalizes them, deduplicates aggressively, and turns raw pages into **structured enrichment**, **trading signals**, and a **daily chain-of-summaries brief**. This post is a technical walkthrough of that system: what problem it solves, how data flows, and where [Scrapling](https://github.com/D4Vinci/Scrapling) fits in the scraping layer.

**Scope and ethics:** We only ingest content that is **already published on public websites** (and similar public endpoints). No paywalled bypass, no authenticated "inside" data - just automation and structure on what anyone could open in a browser, at scale.

---

## The problem: attention is the bottleneck

Professional trading research is not only "faster charts." It is **synthesis under time pressure**:

- Policy and data releases are **distributed** across dozens of official sites.
- The same story **reappears** in near-duplicate form across portals.
- What matters for **India-linked** equities or commodities is often **two hops away** (global macro → channel → local sector).

A "World Monitor" for a desk is not another RSS reader. It needs **change detection** (did this source's listing actually move?), **deduplication** (is this the same circular as yesterday?), **structured extraction** (entities, importance, sentiment), and **downstream products** (signals + a brief you can scan before the open).

```mermaid
flowchart LR
    subgraph Problem["Without a pipeline"]
        A1[100+ public sites] --> B1[Manual tabs & bookmarks]
        B1 --> C1[Missed releases & fatigue]
        C1 --> D1[Slow or inconsistent synthesis]
    end
    subgraph Goal["What we wanted"]
        A2[Same public web] --> B2[Automated fetch + parse]
        B2 --> C2[Dedupe + freshness]
        C2 --> D2[Structured AI + brief]
    end
    style D2 fill:#55efc4,stroke:#00b894,color:#000
    style D1 fill:#ff7675,stroke:#d63031,color:#fff
```

---

## Architecture at a glance

The pipeline is **async end-to-end**: scheduled jobs trigger a full run, **ScraperFactory** picks a strategy per source (static, dynamic, RSS, PDF, document, API), then we **short-circuit** unchanged pages, **dedupe** new items, **store** articles, **enrich** with Claude via Pydantic-typed outputs, extract **signals** for high-importance pieces, and generate **category-parallel summaries** merged into one **daily brief**.

```mermaid
flowchart TB
    subgraph Ingest["Ingestion"]
        SCH[Scheduler] --> P[SARASPipeline]
        P --> F[ScraperFactory]
        F --> ST[Static / Dynamic / RSS / PDF / API / Document]
        ST --> IT[ScrapedItem list]
    end
    subgraph Guardrails["Cost & quality gates"]
        IT --> SN[Page snapshot: items changed?]
        SN -->|no| SK[Skip downstream]
        SN -->|yes| DD[Batch hash dedup + SimHash]
        DD --> FR[Freshness filter]
    end
    subgraph Brain["AI & products"]
        FR --> DB[(PostgreSQL)]
        DB --> EN[Article enrichment<br/>structured fields]
        EN --> SG{Importance high?}
        SG -->|yes| TS[Trading signals]
        SG -->|no| X1[ - ]
        EN --> BR[Chain-of-summaries brief]
        TS --> API[FastAPI + dashboard]
        BR --> API
    end
    style API fill:#74b9ff,stroke:#0984e3,color:#fff
    style SK fill:#dfe6e9,stroke:#636e72,color:#000
```

---

## Scraping: why Scrapling is in the hot path

Government and exchange sites are the worst of both worlds: **high value** and **hostile ergonomics** - rate limits, bot checks, heavy JavaScript, and occasional Cloudflare challenges. For static-style fetches we standardized on **[Scrapling](https://scrapling.readthedocs.io/en/latest/)**, a Python framework that ships fetch tiers from basic HTTP to **`StealthyFetcher`** (stealth-oriented retrieval suited to protected pages).

In our stack, **`StealthyFetcher.async_fetch`** is used for static scraping and is wrapped in a **hard timeout** (`asyncio.wait_for`) so one sticky domain cannot stall the whole run. If Scrapling is unavailable or a fetch fails, we **fall back** to lighter HTTP paths - operational resilience matters more than purity.

**Credit where it's due:** Scrapling is maintained by the community around [D4Vinci/Scrapling on GitHub](https://github.com/D4Vinci/Scrapling); docs live on [Read the Docs](https://scrapling.readthedocs.io/en/latest/). We are not affiliated - we're a production user grateful for a focused abstraction over "open browser / solve challenge / get HTML."

```mermaid
flowchart TB
    U[Target URL] --> T{Strategy}
    T -->|Many static gov sites| SL[Scrapling StealthyFetcher<br/>async_fetch + timeout]
    T -->|JS-heavy SPAs| PW[Playwright path]
    T -->|Feeds| RSS[RSS parser]
    T -->|PDFs / docs| DOC[PDF & document parsers]
    SL --> HTML[Normalized HTML / text]
    PW --> HTML
    RSS --> HTML
    DOC --> HTML
    HTML --> SI[ScrapedItem]
    style SL fill:#fdcb6e,stroke:#e17055,color:#000
```

---

## Deduplication: four layers

Duplication is not "annoying" - it **pollutes embeddings, summaries, and trader attention**. We stack:

1. **Page-level change detection** - hash the set of extracted items; if nothing moved, skip the expensive work.
2. **Exact dedup** - content hash (e.g. SHA-256) with **batched** DB lookups per source.
3. **Near-dedup** - 64-bit **SimHash** with a Hamming threshold for "almost the same" press releases.
4. **Freshness** - time-window filtering so stale reprints do not dominate.

This is the difference between "we ingested 10,000 rows" and "we ingested **net-new information**."

---

## Enrichment, signals, and the daily brief

### Structured enrichment

Raw text is not enough for a desk. We use **Claude** with **`messages.parse()`** and **Pydantic** models so the model returns **typed fields** - sentiment, importance, entities, tags - rather than fragile free-form JSON. That choice pays off in **downstream prompts**: you filter and route on numbers and enums, not vibes.

### Trading signals

High-importance articles feed a second structured pass: **affected sectors, tickers, commodities, direction, horizon, confidence**. This is explicitly **global-to-India aware** in prompt design - macro abroad often matters through transmission channels at home.

### Chain-of-summaries brief

Eleven **category** buckets (trade, industrial, sector, IBEF, US macro, China, EU, energy, commodities, Asia-Pacific, international) each get a **parallel** summary call; results **merge** into one coherent **daily brief**. Empty categories can **carry forward** from the previous day with clear attribution - better an honest "no delta" than hallucinated filler.

```mermaid
flowchart TB
    A[Articles by category] --> B1[Summary: Trade]
    A --> B2[Summary: Industrial]
    A --> B3[Summary: ...]
    A --> B11[Summary: International]
    B1 --> M[Merge → Daily brief]
    B2 --> M
    B3 --> M
    B11 --> M
    M --> OUT[Trader-facing narrative + API]
    style M fill:#a29bfe,stroke:#6c5ce7,color:#fff
```

---

## Operations: async, Postgres, API

- **PostgreSQL** is the system of record (JSONB for flexible AI payloads, timestamptz everywhere).
- **Repository pattern** keeps SQL out of business logic.
- **FastAPI** exposes briefs, articles, signals, and operational endpoints; a small dashboard consumes the same JSON the rest of the org could wire into internal tools.

---

## Lessons learned

1. **Stealth + timeouts** - Anti-bot tech is real; so are hung connections. Wrap your stealth fetcher with **hard deadlines** and backoff per domain.
2. **Skip work early** - Page snapshots that detect "no change" save LLM budget and DB churn.
3. **Typed AI outputs** - Pydantic + `parse()` reduced an entire class of production bugs we used to see with ad-hoc JSON.
4. **Public-only is a product constraint** - It keeps the compliance story simple: we automate reading, not breaking into private data.

---

## Conclusion

Markets reward **speed of understanding**, not speed of tab-switching. This engine exists so a small team can **monitor the world** with the same public sources a diligent human would use - just with **automation, deduplication, and structured intelligence** layered on top.

If you're building something similar: invest first in **change detection and dedup**, then in **typed enrichment**. The LLM is the glitter; the **ingestion contract** is the foundation.

---

**Takeaway:** Invest first in change detection and dedup, then in typed enrichment. The LLM is glitter; the ingestion contract is the foundation. Skip the work you can (page-level snapshots) and type the work you can't (Pydantic on every AI output).


---

## References

- [Saras](https://www.saras.market/) - product home
- [Saras llms.txt](https://www.saras.market/llms.txt) - structured overview for tools and assistants
- [Scrapling on PyPI](https://pypi.org/project/scrapling/)
- [Scrapling documentation](https://scrapling.readthedocs.io/en/latest/)
- [Scrapling (GitHub)](https://github.com/D4Vinci/Scrapling)