Skip to content
news-watch docs — menu

Getting Started

news-watch supports Python 3.10 through 3.12. It provides keyword/date search and latest-news collection through the CLI and Python API.

Install

python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install news-watch

Browser-backed sources also require Chromium:

playwright install chromium

For repository development:

git clone https://github.com/okkymabruri/news-watch.git
cd news-watch
uv sync --all-extras
uv run newswatch --list_scrapers

Verify

newswatch --help
newswatch --list_scrapers
newswatch --method latest --list_scrapers

The current registry contains 77 sources: 72 support search and all 77 support latest mode.

Search by topic and date

newswatch \
  --method search \
  --keywords "ihsg,saham" \
  --start_date "2025-01-01" \
  --scrapers "cnbcindonesia,kontan,kompas" \
  --output_format csv \
  --output_path ihsg-news.csv

Search mode requires keywords and a start date. The CLI defaults to CSV when --output_format is omitted.

Collect latest articles

newswatch \
  --method latest \
  --scrapers "antaranews,kompas,viva" \
  --limit 20 \
  --output_path latest.csv

Latest mode ignores keywords and the search start date.

Python API

import newswatch as nw

search = nw.scrape_to_dataframe(
    keywords="ihsg,saham",
    start_date="2025-01-01",
    scrapers="cnbcindonesia,kontan,kompas",
)

latest = nw.latest_to_dataframe(
    scrapers="antaranews,kompas,viva",
    limit=20,
)

Every article contains eight output fields:

FieldMeaning
titleHeadline
publish_datePublication date and time
authorAuthor when available
contentExtracted article text
keywordSearch term that matched
categorySource section or category
sourceRegistry slug
linkCanonical article URL

Reliability controls

Start with a few sources and a short date window. Expand only after checking output quality.

newswatch \
  --keywords "ekonomi" \
  --start_date "2026-07-01" \
  --scrapers "kompas,antaranews" \
  --scraper-timeout 60 \
  --progress

--max-concurrent-scrapers bounds how many sources run at once (default 6). Lower it on small machines; browser-driven sources are already limited to 2.

Cloud and shared IPs are blocked more often than local connections. See Troubleshooting for proxies and source-level diagnosis.

Next

Synced from okkymabruri/news-watch at main@f1c8fbf9 on 2026-08-17. These docs are ahead of the v1.2.5 release.