Programming

Reuters Scraper in Python: Section Feeds, Keyword Search and Metadata Past DataDome

Reuters publishes a few hundred stories a day across world news, business, markets, energy and tech, and every one of them carries clean metadata: headline, one-sentence summary, section, publish and update times, word count and topic tags. For news monitoring, media research or a dataset of what was covered when, that metadata is the useful part. Here is how to pull it into Python. The wall: DataDome, even on the sitemaps A plain requests.get on reuters.com comes back as HTTP 401 with a 774-byt

Reuters publishes a few hundred stories a day across world news, business, markets, energy and tech, and every one of them carries clean metadata: headline, one-sentence summary, section, publish and update times, word count and topic tags. For news monitoring, media research or a dataset of what was covered when, that metadata is the useful part. Here is how to pull it into Python.

The wall: DataDome, even on the sitemaps

A plain requests.get on reuters.com comes back as HTTP 401 with a 774-byte page that says "Please enable JS and disable any ad blocker". That is DataDome. It answers the same way on section pages, on /sitemap.xml and on the news sitemap feed, so the usual "just read the sitemap" shortcut is closed too.

Through Scrape.do a plain request, with no extra parameters, returns the full page: 200, 1 credit. Adding super=true returned the identical page for 10 credits, so it is not needed.

The shortcut: the data is already JSON

Reuters runs on Arc XP. Every section and article page carries its data in an inline script as Fusion.globalContent={...};, so there is nothing to select in the HTML. Better still, the site loads more stories from its own content API, and that API answers through Scrape.do with the same JSON objects:

  • articles-by-section-alias-or-id-v1 returns a section, 20 articles per request (it ignores larger sizes), and pages with offset as deep as you want.
  • articles-by-search-v2 returns keyword search results, up to 100 per request, with a total_size and optional start_date / end_date.

Each article object has title, description, canonical_url, kicker (the section), published_time, updated_time, display_time, word_count, read_minutes, content_code (metered or free) and a primary topic tag.

The script

import csv
import json
from urllib.parse import quote

import requests

TOKEN = "<your_token>"
REUTERS = "https://www.reuters.com"


def fetch(url):
    r = requests.get("https://api.scrape.do/", params={"token": TOKEN, "url": url}, timeout=90)
    if r.status_code != 200:
        raise RuntimeError(f"status {r.status_code}")
    return r.text


def api(source, query):
    url = f"{REUTERS}/pf/api/v3/content/fetch/{source}?query=" + quote(json.dumps(query, separators=(",", ":")))
    result = json.loads(fetch(url))["result"]
    return result.get("articles") or [], result.get("pagination", {}).get("total_size")


def row(a):
    return {
        "headline": a.get("title", ""),
        "description": (a.get("description") or "").replace("\u200b", ""),
        "url": REUTERS + a.get("canonical_url", ""),
        "section": (a.get("kicker") or {}).get("name", ""),
        "published": a.get("published_time", ""),
        "words": a.get("word_count"),
    }


def section(path="/world/", limit=60):
    out, offset = [], 0
    while len(out) < limit:
        page, _ = api("articles-by-section-alias-or-id-v1",
                      {"offset": offset, "size": 20, "section_id": path, "website": "reuters"})
        if not page:
            break
        out += [row(a) for a in page]
        offset += 20
    return out[:limit]


def search(keyword, start, end, limit=300):
    q = {"keyword": keyword, "orderby": "display_date:desc", "website": "reuters",
         "start_date": start + "T00:00:00Z", "end_date": end + "T00:00:00Z"}
    out, offset = [], 0
    while len(out) < limit and offset < 10000:
        size = min(100, limit - len(out), 10000 - offset)
        page, total = api("articles-by-search-v2", dict(q, offset=offset, size=size))
        out += [row(a) for a in page]
        offset += len(page)
        if len(page) < size:
            break
    return out


rows = search("oil prices", "2026-11-01", "2026-11-30")
with open("reuters.csv", "w", newline="", encoding="utf-8") as f:
    w = csv.DictWriter(f, fieldnames=list(rows[0]))
    w.writeheader()
    w.writerows(rows)
print(len(rows), "articles")

The query is a JSON object in the URL, so quote(json.dumps(...)) builds it, and requests encodes it once more when it goes into the Scrape.do url parameter. Anything other than a 200 stops the script, instead of feeding a block page to json.loads.

What a live run looks like

On the World section, 45 articles took 3 requests. A search for "oil prices" over November 2026 returned 150 results in 2 requests. Each row is ready for a CSV:

{
  "headline": "Example headline number 1",
  "description": "An example summary for story 1.",
  "url": "https://www.reuters.com/world/example-headline-number-1-2026-01-02/",
  "section": "World",
  "published": "2026-01-02T08:00:00.000Z",
  "words": 401
}

(Field values above are from the package's fictional test fixture.)

Four things that will trip you up

The 10,000 cap. A search for "oil" reports 75,234 matches, but offset + size past 10,000 returns HTTP 400. Split long ranges by date: one query per day stays far under the cap. A two-day window for "oil" in early November returned 9 results.

Ordering. Section feeds sort by display_time, which moves when a story is updated. published_time is not monotonic down the list, so keep both.

Topic codes. Article tags mix readable topics ("Climate Change") with internal wire codes such as N2:POL or DEST:OIL; one article carried more than 50 of them. Filter anything that looks like CODE:VALUE.

Zero-width spaces. Some descriptions contain \u200b characters in the middle of a sentence. Strip them before you compare or deduplicate text.

Using it responsibly

Reuters' robots.txt disallows automated access for generic crawlers, including the /pf/api/ path, and its terms of use prohibit automated collection without prior written consent. Read the terms and talk to Reuters about licensing before any commercial or large-scale use. The scripts here read headline-level metadata only, never article text. This is not legal advice.

Open-source package

The same logic, with per-day search, article metadata (parent section, readable topics, keywords, dateline, paragraph count) and a CLI, is on PyPI:

pip install reuters-scraper
reuters-scraper search "oil prices" --from 2026-11-01 --to 2026-11-30 -f csv -o oil.csv

Source: github.com/bugrahansss/reuters-scraper. No-code version: Reuters Scraper on Apify. Notebook-style demo: Hugging Face Space.

Run it at scale with Scrape.do

Every section page, search page or article is one plain Scrape.do call: no browser, no proxy pool, no retries to babysit. A month of headlines for a keyword costs a few dozen credits. Get 1000 free credits and start scraping with Scrape.do.