Guides · Screening and compliance
How do I check a website for common GDPR signals with an AI agent?
Bind gdpr-website-check from the Strale LangChain toolkit to your model and give it a URL. The tool looks for a cookie consent banner, a privacy policy link, known tracking scripts and basic security headers, and costs €0.10 a call. It is a quick scan, not a legal audit.
- LangChain
- Python
Steps
- Install
langchain-straleand a chat-model package. - Create the toolkit with your Strale API key.
- Bind
gdpr-website-checkto your model. - Ask it to check a URL and run the tool call the model returns.
The solution
# pip install langchain-strale langchain-openai
from langchain_strale import StraleToolkit
from langchain_openai import ChatOpenAI
toolkit = StraleToolkit(api_key="sk_live_YOUR_KEY")
tools = [t for t in toolkit.get_tools() if t.name == "gdpr-website-check"]
llm = ChatOpenAI(model="gpt-4o").bind_tools(tools)
result = llm.invoke("Check https://example.com for GDPR signals: cookie consent, privacy policy and tracking")
# The model picks the tool and its arguments; your code runs the call.
for call in result.tool_calls:
tool = next(t for t in tools if t.name == call["name"])
print(tool.invoke(call["args"])) How it works
The tool fetches the page and looks for a cookie consent mechanism, a privacy policy link, known tracking scripts such as analytics and advertising pixels, and the HSTS header.
The answer has a letter grade, a numeric gdpr_score and a findings list of plain-language issues, such as "No cookie consent mechanism detected". Findings have no severity, so use the grade and score to decide what to look at first.
Detection is based on page signatures and headers; no language model reads the page. The scan does not check internal data-processing practices and does not replace legal review.
bind_tools only lets the model propose a call. To have the model read the result and answer in words, put the same tools in one of LangChain's agent loops.
Tools in this guide
| Tool | Price per call |
|---|---|
| GDPR Website Check | €0.10 |
| SSL Certificate Check | €0.03 |
| Security Header Check | €0.05 |
| Tech Stack Detection | €0.03 |