CLI

Installing news-fetch provides the news-fetch command.

news-fetch --version
news-fetch --help

Fetch one article

Bare URL (maps to get):

news-fetch https://www.example.com/news/story

JSON:

news-fetch https://www.example.com/news/story --json
# or
news-fetch get URL --json

From a local HTML file (no network):

news-fetch get --html page.html --json https://example.com/story

Options: --proxy, --strict, --debug.

Human-readable output includes title, publisher, published date, authors, confidence, page type, and a text preview.

Batch → JSONL

news-fetch batch urls.txt -o articles.jsonl --workers 20
news-fetch batch urls.txt --jsonl --proxy http://p1:8080 --proxy http://p2:8080 --delay 0.05
  • urls.txt — one URL per line (# comments allowed)
  • -o / --output — write JSONL (streamed; first result is written before the job finishes)
  • --jsonl — also print JSONL to stdout
  • Failed URLs emit {"url": "...", "error": true}

Discover

news-fetch discover https://www.theguardian.com --limit 10
news-fetch discover https://www.bbc.com --limit 20 --json