---
title: "How to Monitor News Headlines: RSS, Frequency and Country"
description: "News headlines are tracked from RSS feeds and news sitemaps with conditional GET. Polling intervals, 304 responses, deduplication and country editions."
url: https://proxynet.io/blog/news-headline-monitoring-data
date: 2026-12-02
author: "Acar Diveroli"
category: "Use Cases"
lang: en
---

# How to Monitor News Headlines: RSS, Frequency and Country

News headline monitoring is the job of collecting the new headlines published by chosen sources at regular intervals and storing them. The cleanest route is the publisher's own channels: an RSS or Atom feed, a news sitemap and, where one exists, an API. The trap is frequency. Downloading an unchanged feed in full on every round wastes both your traffic and the publisher's. This post covers the official channels, polling frequency, conditional requests, deduplication and headlines that change by country.

> **Note: Short answer**
>
> Read headlines from the RSS or Atom feed, add `If-None-Match` and `If-Modified-Since` to every request, and process nothing when a 304 comes back. Deduplicate by `guid` and normalized link, and use a proxy that exits in the country whose edition you need.

## Official channels

Publishers offer three channels for machines, and you try them in order. In an RSS 2.0 feed, each story is an `<item>` element. The item carries `title`, `link`, `pubDate` and an optional `guid`. In Atom the equivalent is `<entry>`, and every entry must have `id`, `title` and `updated`.

The quick way to find a feed is to look at the page's HTML. The `<link rel="alternate" type="application/rss+xml">` tag gives the feed address. Some publishers have a separate feed for each section, such as business or sports.

The news sitemap is the second channel. In Google's format, each story carries `<news:title>` and `<news:publication_date>`. The date is in W3C format: `2026-12-02T09:30:00+03:00`. The file lists only stories from the last two days and holds at most 1,000 of them. The sitemap's location is usually given on the `Sitemap:` line of the robots.txt file.

| Channel | Field that identifies the story | Date field |
|---|---|---|
| RSS 2.0 | `guid`, otherwise `link` | `pubDate` (RFC 822) |
| Atom | `id` | `updated`, `published` |
| News sitemap | `loc` | `news:publication_date` (W3C) |
| Publisher API | ID field in the docs | Date field in the docs |

The third channel is the publisher's API. It needs a key and has a quota, but its fields are documented. Without a feed or an API, page change tracking is what remains. We covered it in the post on [website change monitoring](/blog/website-change-monitoring).

Five fields are enough to store: headline, normalized link, source, country and publication time. You do not need the full text of the story.

## Polling frequency per source

The source's publishing rate sets the frequency. Start with what the feed itself declares. In RSS 2.0, `ttl` says how many minutes the feed may be cached. `skipHours` and `skipDays` list the hours and days that need no reading. If `ttl` is 15, do not request the feed more often than every 15 minutes.

Without `ttl`, look at the `pubDate` values of recent stories. The average gap across the last 20 stories is the source's real rate. Keeping the interval at about half that gap is enough for most jobs. The values below are starting suggestions, not measurements:

| Source | Publishing rate | Starting interval |
|---|---|---|
| News agency feed | Many per hour | 2-5 minutes |
| Newspaper section feed | A few per hour | 10-15 minutes |
| Institutional announcements page | A few per day | Hourly |
| Weekly magazine | A few per week | Once or twice a day |

Do not leave the interval fixed. After consecutive 304s, double the interval and stop at an upper limit. When a new story arrives, go back to the starting interval. Add a few seconds of random delay to the checks so that all sources are not requested in the same second.

## Conditional requests and 304

A conditional request asks the server whether the version you hold is still current. You store the `ETag` and `Last-Modified` values from the first response. On the next request you send them back in the `If-None-Match` and `If-Modified-Since` headers. If the feed has not changed, the server returns `304 Not Modified` and sends no body.

RFC 9110 states two rules plainly. If the request has `If-None-Match`, the server ignores `If-Modified-Since`, because a tag is more precise than a date. A 304 response cannot carry content, but it does carry headers such as `ETag` and `Cache-Control` that a 200 would have sent. Sending both is harmless.

An ETag that starts with `W/` is a weak validator: `W/"a1b2"`. Weak tags are valid in an `If-None-Match` comparison. Send the value back as it is and do not strip the prefix.

Check with curl whether a feed supports conditional requests. The first command prints the response headers:

```bash
curl -s -D - -o /dev/null \
  -x http://user:pass@pr.proxynet.io:8000 \
  https://example.com/rss.xml
```

If the response has no `ETag` or `Last-Modified`, the server most likely does not support conditional requests. If it does, send back the tag from the first response and print only the status code:

```bash
curl -s -o /dev/null -w "%{http_code}\n" \
  -x http://user:pass@pr.proxynet.io:8000 \
  -H 'If-None-Match: "a1b2c3"' \
  https://example.com/rss.xml
```

If you see `304`, the setup is ready. The proxy does not change this exchange. For an HTTPS target the proxy only carries the tunnel and does not see the headers. In our test, the 304 came through an authenticating local proxy unchanged.

## A function that returns new headlines

The function below reads an RSS 2.0 feed with a conditional GET and returns only headlines it has not seen before. The `state` dictionary holds the feed's validators, and the `seen` set holds the keys of stories already seen. Keep both separate for each feed and country, and write them to a file or database between runs.

```python
import xml.etree.ElementTree as ET
from urllib.parse import parse_qsl, urlencode, urlsplit, urlunsplit

import requests

PROXY = "http://user:pass@pr.proxynet.io:8000"
HEADERS = {"User-Agent": "example-news-monitor/1.0 (+https://example.com/bot)"}

def normalize_url(url):
    """Drops utm_* parameters, the #fragment and the trailing slash."""
    p = urlsplit(url.strip())
    query = [(k, v) for k, v in parse_qsl(p.query) if not k.startswith("utm_")]
    path = p.path.rstrip("/") or "/"
    return urlunsplit((p.scheme.lower(), p.netloc.lower(), path, urlencode(query), ""))

def new_headlines(feed_url, state, seen):
    """Reads the feed with a conditional GET and returns only new headlines."""
    headers = dict(HEADERS)
    if state.get("etag"):
        headers["If-None-Match"] = state["etag"]
    if state.get("last_modified"):
        headers["If-Modified-Since"] = state["last_modified"]

    r = requests.get(feed_url, headers=headers, timeout=15,
                     proxies={"http": PROXY, "https": PROXY})
    if r.status_code == 304:
        return []  # feed unchanged, no body sent
    r.raise_for_status()
    items = ET.fromstring(r.content).iter("item")  # broken XML stops here

    fresh = []
    for item in items:
        link = normalize_url(item.findtext("link", ""))
        key = (item.findtext("guid") or link).strip()
        if key in seen:
            continue
        seen.add(key)
        fresh.append({"title": (item.findtext("title") or "").strip(),
                      "link": link, "pubDate": item.findtext("pubDate")})
    # store the validators only after the feed has been parsed
    state["etag"] = r.headers.get("ETag")
    state["last_modified"] = r.headers.get("Last-Modified")
    return fresh

state, seen = {}, set()
for h in new_headlines("https://example.com/rss.xml", state, seen):
    print(h["pubDate"], h["title"], h["link"])
```

Two details in the function matter. The validators are stored after the feed has been parsed. If you store the ETag of a broken response, the next request gets a 304 and that round's stories disappear silently. As the key, `guid` comes first, then the normalized link. The RSS 2.0 specification also says aggregators may use `guid` to decide whether a story is new.

The function is for RSS 2.0. For an Atom feed, read the `{http://www.w3.org/2005/Atom}entry` elements and use the `id` field as the key.

## Duplicate stories

The same story comes back in three ways. The link arrives with different tracking parameters, the publisher corrects the story and changes its `guid`, or another source runs the same story. Link normalization catches the first; headline comparison catches the other two.

`normalize_url` lowercases the scheme and host. It drops parameters that start with `utm_`, everything after `#`, and the trailing `/`. In our test, `HTTP://Example.test/economy/rate-decision/?utm_source=rss&id=5#top` became `http://example.test/economy/rate-decision?id=5`. Parameters that change the page, such as `id` or `page`, must stay.

Python's `difflib` module is enough for headline comparison. `SequenceMatcher` gives a ratio between 0 and 1 based on the common blocks of two strings:

```python
from difflib import SequenceMatcher

def is_duplicate(title, recent_titles, threshold=0.85):
    """Catches the same story from another source by headline similarity."""
    a = title.casefold()
    return any(SequenceMatcher(None, a, b.casefold()).ratio() >= threshold
               for b in recent_titles)
```

In our test, we compared the headline "Central Bank announces interest rate decision" with four others:

| Compared headline | Ratio | Decision at 0.85 |
|---|---|---|
| Same, exclamation mark at the end | 0.989 | Duplicate ✓ |
| Same, "bank" in lowercase | 1.0 | Duplicate ✓ |
| Same, plus ": policy rate unchanged for third month" | 0.698 | New ✗ |
| "Central Bank announces inflation report" | 0.714 | New ✓ |

The trap is in the third row. An added subtitle pushed the ratio below that of an entirely different story. A single threshold cannot separate the two. Limit the comparison to headlines from the last 24-48 hours, and flag pairs near the threshold as "possible duplicate" instead of deleting them. Be careful with short headlines: "New metro line opens" and "New tram line opens" scored 0.872 and would be merged.

## Headlines that change by country

Some outlets build the homepage around the country they infer from the visitor's IP address. The same address can show one lead story to a reader in Türkiye and another to a reader in Germany. Others redirect you to a country edition. If the edition has its own feed address, you do not need to look from that country. A homepage without a feed and a "most read" box do require it.

The proxy's role here is to make the request leave from the reader's country. How country selection works at the gateway is covered in the post on [country and city targeting in proxies](/blog/geo-targeting-proxy-explained).

For the page a home reader in that country sees, use a [Residential Proxy](https://proxynet.io/residential-proxy).

Three rules prevent storing the wrong headline:

- **Separate state per country.** Tie `state` and `seen` to the feed and country pair. If countries share one state, the tags of different editions overwrite each other and a 304 never comes.
- **Separate session per country.** The site may write the chosen edition into a cookie. A shared `requests.Session` carries the previous country's edition into the next request.
- **A country field in the record.** The same headline can lead in two countries at different times. Without a country field, that difference is lost.

A proxy does not open a paywall and does not raise the site's rate limit. Follow the site's terms and its robots.txt file.

## Troubleshooting

Start from the symptom. Most problems come down to where and when the state is stored.

- **Every round returns 200.** The response has no `ETag` or `Last-Modified`, or the server ignores them. Look at the headers with curl. Without support, `guid` deduplication still works; you just save no traffic.
- **304 arrives but a story was missed.** The validators were stored before parsing. The order in the function prevents this: in our test, the old ETag was kept on the round that returned broken XML.
- **The same story appears twice.** The publisher may have changed the `guid` while correcting the story. In our test, a story with a changed `guid` counted as new again, and headline comparison caught it with a ratio of 1.0.
- **A 403 or 429 response.** The frequency is too high. Widen the interval and honor the `Retry-After` header. Details are in the post on [429 Too Many Requests](/blog/http-429-too-many-requests). Do not try to get around the limit by changing IPs.
- **The wrong country's headline.** First confirm the exit IP's country with an IP echo service. Then delete that country's cookies and try again.
- **407 Proxy Authentication Required.** The username or password is missing or wrongly encoded. In our test, a request without credentials got a 407.

## How we tested

We ran the tests on December 2, 2026, on Windows 11. We used Python 3.13.17, Requests 2.34.2 and curl 8.23.0. Two small servers ran on `127.0.0.1`. The first was an RSS server that sent `ETag` and `Last-Modified` and returned 304 on a matching `If-None-Match`. The second was an HTTP proxy that required `user:pass` and logged every request. We ran the function for six rounds: first read, unchanged feed, new story, unchanged feed again, broken XML and a story with a changed `guid`. The target was plain HTTP, so the HTTPS tunnel was outside this test. In the post we replaced the local address with `pr.proxynet.io:8000`.

## The bottom line

Find the feed, set the frequency from `ttl` and the publishing rate, send every request conditionally, and deduplicate by `guid`, link and headline. A [Datacenter Proxy](https://proxynet.io/datacenter-proxy) is enough to keep feed traffic off your office IP. Above all, do not store the validators before the feed is parsed: that is the bug that silently loses stories.

## Sources

- [RFC 9110, §13 Conditional Requests and §15.4.5 304 Not Modified: rfc-editor.org](https://www.rfc-editor.org/rfc/rfc9110.html#name-conditional-requests)
- [RFC 4287, The Atom Syndication Format: rfc-editor.org](https://www.rfc-editor.org/rfc/rfc4287.html)
- [RSS 2.0 Specification, `guid`, `ttl` and `skipHours`: rssboard.org](https://www.rssboard.org/rss-specification)
- [Google Search Central, creating a news sitemap: developers.google.com](https://developers.google.com/search/docs/crawling-indexing/sitemaps/news-sitemap)
- [Python documentation, `difflib.SequenceMatcher`: docs.python.org](https://docs.python.org/3/library/difflib.html#difflib.SequenceMatcher)

## Frequently asked questions

### Do I need a proxy to monitor news headlines?

Usually not. RSS feeds and news sitemaps are published for automated reading and need no proxy. A proxy helps in two cases: seeing a country-dependent homepage from that country, and keeping monitoring traffic off your office IP. A proxy does not raise the site's rate limit. You still need to set the frequency from the source's `ttl` and publishing rate.

### How often should I check an RSS feed?

No more often than the feed's `ttl`. Without `ttl`, look at the gaps between recent `pubDate` values and keep the check interval at about half that gap. A few minutes is enough for agency feeds, once an hour for institutional announcements. After consecutive 304s, double the interval. When a new story arrives, go back to the starting interval.

### What is the difference between ETag and Last-Modified?

An ETag is a tag given to a version; Last-Modified is the time of the last change. The ETag is sent back with `If-None-Match`, the date with `If-Modified-Since`. Under RFC 9110, if both arrive, the server ignores the date and checks the tag. The date has one-second precision and cannot tell apart two changes in the same second. If the server provides both, store both.

### Is a 304 Not Modified response an error?

No. A 304 is a successful response saying the feed has not changed since your last read. It carries no body, so there is nothing to parse and the list you hold is still valid. Requests does not treat 304 as an error, and `raise_for_status()` does not raise. Checking for 304 separately in your code and returning an empty list is enough.

### How do I deduplicate the same story from different sites?

By headline similarity. In Python, `difflib.SequenceMatcher` gives two headlines a ratio between 0 and 1. Limit the comparison to headlines from the last 24-48 hours and flag pairs near the threshold instead of deleting them. In our test, the same story with an added subtitle scored 0.698 and an entirely different story 0.714. Link normalization only catches repeats from the same publisher.

### What is the difference between a news sitemap and RSS?

A news sitemap is published for search engines, RSS for readers. In Google's format, the sitemap lists only stories from the last two days, at most 1,000 of them. Each story has a headline and a publication date in W3C format. RSS is often per section and carries a `guid`. If there is no feed, or it is incomplete, the sitemap is a good second source.
