Skip to content

Pages by country

Cookie consent banners in fetched pages: why EU reads differ

Learn why a page read from an EU country can carry cookie consent text that a US read lacks, how to spot it in Markdown and when to strip or keep it.

By Curtis Mccann, Live Web Data team · Published

This article was drafted with AI assistance from the sources listed below and edited and published by the Live Web Data team. Disclosure: the Live Web Data API, which this article mentions, is this site's own product.

Consent text in a fetched page
  1. 1Note the countryStore the country each page was read from; EU and UK reads are where opt-in banners appear.
  2. 2Strip in HTMLRemove banner elements with a cookie filter list before converting to Markdown.
  3. 3Check the MarkdownScan the result for consent phrases in the page's language, such as Accept all or Reject all.
  4. 4Keep it on purposeLeave the banner in only when the question is about the consent notice itself.

You read the same public URL twice, once from the US and once from an EU country. The US read is the article. The EU read is the article plus a block of text about cookies and consent choices, sometimes in a language your users do not speak. If that text reaches the model, it sits in the context next to the facts and costs input tokens on every call.

This is a country problem first and a cleanup problem second. The decision has three parts: which reads pick up consent text, where to remove it, and when to keep it.

Why the read country changes the banner

Consent tools decide what to show from where the visitor seems to be. CookieYes's guide to geo-targeting says an IP address can be matched to a country or region with geolocation databases, and that browser language and time zone are secondary signals. The same guide says the GDPR and the ePrivacy Directive require prior, explicit consent for non-essential cookies in the EU and UK, while California's CCPA/CPRA works with opt-out consent. So one site can serve an opt-in banner with Accept, Customise and Reject buttons to an EU read, a "Do Not Sell or Share My Personal Information" link to a California read, and a simpler notice where the rules are lighter.

Not every site works this way. A study by van Eijk, Asghari, Winter and Narayanan crawled websites from 18 vantage points in January 2019: 15 countries they counted as EU, plus Canada, Switzerland and the United States. It detected a cookie banner on 40.2% of the sites, averaged over all vantage points. The site's top-level domain explained much of the variation in cookie notices, and the visitor's location did not, with one exception: .com sites showed different notices inside and outside the EU.

The working default follows from that: expect consent text on EU and UK reads, and treat .com sites as the ones most likely to change with the read country.

Where the banner text lives

A banner is rarely plain text in the article body. A 2025 study by Nouwens, Kristensen, Maalt and Bagge looked at the top 10,000 websites across 31 countries, read from a vantage point in Denmark. It found consent interfaces on 67% of the sites, and consent management platforms supplied 67% of those interfaces. Its scraper looked for fixed-position elements with a z-index above 10 in the DOM, in Shadow DOM and in iframes. It waited for DOMContentLoaded and then 10 more seconds, because some sites load the consent interface only after a delay or after user activity.

Two things follow for a fetch pipeline:

  • Whether banner text reaches your Markdown depends on how the page was read. A read that runs the page's scripts and waits can collect text that a read of the first HTML response does not. Compare two reads of the same URL from the same country before you assume either one is clean.
  • The text is in the local language. The study's phrase corpus held 363 phrases across the official languages of its 31 countries, and one of its examples is the Swedish "Neka alla" ("Reject all"). An English-only phrase check misses banners in every other language.

Strip it in the HTML, check it in the Markdown

Start with removal before conversion, while the banner is still a set of elements. The EasyList Cookie List is a filter list that, in its own words, "blocks cookies banners, GDPR overlay windows and other privacy-related notices." The 2019 study used a similar list from the "I don't care about cookies" extension, with over 9,000 CSS element names. It reported a false positive rate under 1% and a false negative rate of about 18 to 20%, and noted that cookie walls were not on that list.

That false negative rate is the reason for a second check after conversion. Once the page is Markdown, selectors are gone and only text remains, so scan for consent phrases in the languages of the countries you read from:

CONSENT_PHRASES = ["accept all", "reject all", "cookie settings", "neka alla"]

def consent_lines(markdown: str) -> list[str]:
    hits = []
    for line in markdown.splitlines():
        lowered = line.lower()
        if any(phrase in lowered for phrase in CONSENT_PHRASES):
            hits.append(line)
    return hits

page = """# Opening hours
We are open 9 to 5.
We use cookies. Accept all | Reject all
"""

print(consent_lines(page))
# ['We use cookies. Accept all | Reject all']

Drop the matching lines, or flag the page for a human look when many lines match. Grow the phrase list one country at a time, starting with the countries you read from most.

When to keep the banner

Keep the consent text when the question is about consent. If you check your own site's EU pages before an AI reads them, or you compare what readers in two markets are told, the banner is the content. In that case, read the page from each country you care about and keep the full page. The country guide covers the general rules for comparing reads, and locale-adaptive pages covers why one read country shows you one version only.

Whatever you keep, store the country next to the content and pass it to the model. A banner in Swedish tells the model nothing useful unless it also knows the page was read from Sweden.

Limits that apply to every read

Read public pages only. A consent banner is not a login or a paywall, but robots.txt and the site's terms of service still apply to every read. Privacy law differs by country, and nothing here is legal advice.

On Live Web Data API, countryCode sets the country the page is fetched from, with us as the default, and verbosity returns either compact (main content) or full. To see how much consent text a page carries in your target market, read one of your own URLs with each setting in the playground and compare the two results.

Frequently asked questions

Why does a page fetched from Germany contain cookie banner text when a US fetch does not?

Many consent tools show the banner by visitor location. CookieYes, for example, describes matching the IP address to a country with geolocation databases, and opt-in banners for the EU and UK. A fetch from an EU country can therefore receive a banner that a US fetch never sees.

Does every site show a different cookie banner by country?

No. A 2019 crawl from 18 vantage points found that a site's top-level domain explained much of the variation in cookie notices, while the visitor's location did not. The exception was .com sites, whose notices differed between vantage points inside and outside the EU.

Should I remove the cookie banner before an LLM reads the page?

Usually yes, because the banner text says nothing about the page's topic. Remove it in the HTML with a cookie filter list such as the EasyList Cookie List, then scan the Markdown for consent phrases. Keep it only when the question is about the site's consent notice.

Is it legal to read a page without answering its cookie banner?

This is not legal advice. Keep to public pages, check robots.txt and the site's terms of service, and ask counsel about the rules in the countries you read from.

Sources

  1. The Impact of User Location on Cookie Notices (Inside and Outside of the European Union) (Paper)
  2. A Cross-Country Analysis of GDPR Cookie Banners and Flexible Methods for Scraping Them (Paper)
  3. How Geo-Targeting Makes Your Cookie Banner GDPR & CCPA Ready (CookieYes) (Blog)
  4. EasyList filter lists (Documentation)