AI Web Scraping: How It Differs From Traditional Scraping
AI web scraping means using AI models, usually large language models (LLMs), to read web pages and pull out the data you ask for: instead of writing CSS selectors for each site, you describe the fields once, as a list or a JSON schema, and the model finds them on any page and returns structured data. The pages still have to be downloaded first, so AI scrapers need the same IPs, rendering and pacing as traditional scrapers, and they add a model cost per page and a risk of invented values. ProxyField supplies that download layer with residential proxies from $1.95/GB; start with the Easy Trial: 1 GB for $2.95.
- residential IPs
- 412M+
- from, traffic never expires
- $1.95/GB
- Easy Trial
- 1 GB for $2.95
On this page 10 sections
- What "AI scraping" means
- AI vs traditional web scraping: selectors or a schema
- How AI web scraping works
- How do I give a LangChain agent web access through a proxy?
- Which tools track brand mentions in Perplexity answers across hundreds of prompts?
- AI crawlers and the sites you scrape
- Is AI scraping legal?
- AI web scraping guides
- Sources
- AI Web Scraping FAQ
In this guide
- Can ChatGPT Scrape Websites? ChatGPT can read and summarize individual web pages with its web search and browser, and it can write a working scraper for you, but it does not run…
- Web Scraping With Claude Can Claude Scrape Websites? Claude Skills and MCP.
- How to Scrape a Website With OpenClaw To scrape a website with OpenClaw, ask the agent to use its built-in web_fetch tool for plain pages, its managed browser for pages that need…
- Web Crawl MCP: Scraping Tools With an MCP Server for AI Agents Playwright MCP, Chrome DevTools MCP, Fetch, Crawl4AI and Firecrawl, with install commands, limits and proxy settings.
- Web Scraping for AI Training: From Crawl to Clean Dataset The pipeline from crawl to clean JSONL dataset, RFC 9309 robots.txt rules, tested Python code and proxy costs.
- AI Web Crawlers: Crawl4AI and LLM-Ready Crawling Crawl4AI, LLM-Ready Crawling, vs Scrapy.
What "AI scraping" means
The phrase is used for two different things, and it helps to know which one a page is talking about.
| Meaning | Who does it | What it involves | Read more |
|---|---|---|---|
| Scraping with AI | You, your scraper or your AI agent | An LLM extracts data from pages your scraper fetched, or an AI assistant browses and scrapes for you | This page, can ChatGPT scrape websites, web scraping with Claude |
| Scraping for AI | AI companies and teams building models | Crawlers collect web pages as training data or for retrieval (RAG) | Web scraping for AI training and RAG |
Both meet the same websites, the same blocks and the same rules; the law on both is in is AI scraping legal.
AI vs traditional web scraping: selectors or a schema
A traditional scraper finds each field by its place in the HTML, with a CSS selector or XPath you write for each site; an AI scraper finds each field by its meaning, from a schema you write once for every site. The difference in code:
# Traditional: one selector per field, per site (Scrapy)
price = response.css(".product-card .price::text").get()
# AI: one schema for every shop; the model finds the field on each page
schema = {
"type": "object",
"properties": {
"name": {"type": "string"},
"price": {"type": ["number", "null"]},
"currency": {"type": "string"},
"in_stock": {"type": "boolean"},
},
"required": ["name", "price", "currency", "in_stock"],
}The selector line is Scrapy's selector syntax; .get() returns the first match or None. When the shop renames .price, that line returns None until you fix it. The schema goes to the model with the cleaned page text, and the model answers with JSON in that shape. Open-source tools package this step: Crawl4AI, for example, fetches a page, turns it into Markdown and can pass it to an LLM with your schema. Selectors in detail: HTML scraping with CSS selectors and XPath.
How the two behave (typical behaviour of the tools, not measured figures):
| Feature | Traditional scraping | AI web scraping |
|---|---|---|
| How fields are found | CSS selectors or XPath you write per site | The model reads the page and finds the fields you describe |
| Setup for a new site | Inspect the HTML, write and test selectors | Reuse the field list or schema; often no new code |
| When the layout changes | Selectors return nothing or the wrong element until you fix them | Usually keeps working, because the field is found by meaning |
| Cost per page | Bandwidth and compute only | Bandwidth plus the model's token cost, which grows with page length: 20,000 characters of page text is roughly 5,000 input tokens (about 4 characters per token, a rule of thumb) |
| Speed | Milliseconds to parse | Typically seconds per page for the model call |
| Accuracy | Exact, or visibly broken | Usually right, sometimes a plausible but wrong value; validate |
| Blocks, CAPTCHAs, JavaScript | Your problem | Still your problem: the model only sees what your fetcher downloaded |
The model cost per month, to fill in with your own figures: input tokens per page ÷ 1,000,000 × the model's price per million input tokens × pages per month, plus the output tokens of the JSON. At 20,000 characters (about 5,000 tokens) per page, 100,000 pages a month are about 500 million input tokens; cleaning pages to text before the call is what keeps that number down.
The hybrid most teams end up with: the model writes the selectors, not the data. You ask an AI assistant to generate the scraper for a site, review the code, and run it as an ordinary scraper: cheap and exact per page, and when the layout changes you ask the model to repair the selectors. Keep model-per-page extraction for varied or messy pages, such as hundreds of shops with different layouts.
How AI web scraping works
An AI scraper is a pipeline of 5 steps, and only one of them is AI.
-
Fetch
Download the page with an HTTP client, or with a headless browser if it is built by JavaScript. This is where proxies, headers and pacing decide whether you get the page or a block.
-
Clean
Strip scripts, styles and navigation, and convert the rest to text or Markdown, so the model reads less and costs less.
-
Extract
Send the cleaned page to the model with the schema above and ask for JSON back; ask for
nullwhen a field is absent. -
Validate
Check types, ranges and required fields; compare a sample against the page. Drop or re-run values that fail.
-
Store
Write rows to a database, a sheet or a vector store for retrieval.
The fetch and clean steps in Python, through a ProxyField residential IP:
import requests
from bs4 import BeautifulSoup
PROXY = "http://<login>-country-us-city-new_york:<password>@gate.proxyfield.io:7000"
UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/156.0.0.0 Safari/537.36" # use your browser's current string
html = requests.get(
"https://example.com/product/123",
proxies={"http": PROXY, "https": PROXY},
headers={"User-Agent": UA},
timeout=30,
).text
soup = BeautifulSoup(html, "html.parser")
for tag in soup(["script", "style", "nav", "footer"]):
tag.decompose()
page_text = soup.get_text(" ", strip=True)[:20000] # about 5,000 tokens; what you send to the model with the schemaRegion, session and session time go in the same username: -region-<region>, -session-<id> and -ttl-<seconds> (30 to 129,600 seconds, 20 minutes by default), as in <login>-country-us-region-new_york-city-new_york-session-he9f2qga-ttl-600; every part after the login is optional.
The extract step: any LLM API with structured output (a JSON schema) takes page_text and the schema. With OpenAI's Python SDK, for example:
import json
from openai import OpenAI # other providers' structured-output APIs work the same way
schema["additionalProperties"] = False # strict mode needs a closed schema
client = OpenAI() # reads OPENAI_API_KEY
resp = client.responses.create(
model="gpt-5-mini",
input=[
{"role": "system", "content": "Extract the product from the page text. Use null for a missing price; never guess."},
{"role": "user", "content": page_text},
],
text={"format": {"type": "json_schema", "name": "product", "schema": schema, "strict": True}},
)
product = json.loads(resp.output_text)
print(product) # e.g. {'name': 'Trail Runner 2', 'price': 89.0, 'currency': 'USD', 'in_stock': True}Then validate before you store: a price that is not a positive number, or a name that does not occur in page_text, sends the page back for a re-run or a review. Step-by-step versions with specific assistants are in can ChatGPT scrape websites and web scraping with Claude.
Vibe scraping is the newest variant: you describe the data in plain language, and an AI coding assistant writes, runs and fixes the scraper for you. It is fast for one-off jobs; for a recurring job, keep the generated code, review it and run it like any other scraper.
How do I give a LangChain agent web access through a proxy?
Put the proxy in the tool that fetches pages, not in the model: an agent reaches the web only through its tools. Either pass the proxy to the loader or tool you use, or set HTTP_PROXY and HTTPS_PROXY for tools you did not write.
In LangChain, the page loader WebBaseLoader (package langchain-community) takes a proxies dictionary:
from langchain_community.document_loaders import WebBaseLoader
# one sticky US IP for the whole task (30 min); drop -session-...-ttl-... to rotate per request
PROXY = "http://<login>-country-us-session-agent01-ttl-1800:<password>@gate.proxyfield.io:7000"
loader = WebBaseLoader(
["https://example.com/pricing", "https://example.com/faq"],
proxies={"http": PROXY, "https": PROXY},
requests_per_second=2,
)
docs = loader.load() # a list of Documents, one per URL
print(docs[0].page_content[:300])What to expect: docs[0].page_content holds the page text, fetched from a ProxyField US IP; docs[0].metadata["source"] holds the URL. Things that trip people up:
proxiescoversload()only. In the current source the async path (aload,alazy_load) opens its own aiohttp session and ignoresproxies. For async loading, set the environment variables below and passtrust_env=True.- Tools you did not write: use environment variables.
requestsandhttpxreadHTTP_PROXY,HTTPS_PROXYandNO_PROXY. List your model provider's API host inNO_PROXY, so LLM calls go direct and only page fetches use (and are counted on) your proxy balance:
export HTTP_PROXY="http://<login>-country-us:<password>@gate.proxyfield.io:7000"
export HTTPS_PROXY="$HTTP_PROXY"
export NO_PROXY="localhost,127.0.0.1,<your model provider's API host>"- httpx changed its keyword. Current httpx takes
httpx.Client(proxy=PROXY);proxies=is the older keyword, and httpx 0.28 and later reject it withTypeError: Client.__init__() got an unexpected keyword argument 'proxies'. - SOCKS5 works too: the same gateway and credentials as
socks5h://<login>-country-us:<password>@gate.proxyfield.io:7000, afterpip install "requests[socks]"; withsocks5hthe proxy resolves the host names. HTTPS pages go through a CONNECT tunnel that the gateway does not decrypt, so no certificate setup is needed. - Encode special characters in the password inside a proxy URL (
@becomes%40;urllib.parse.quote(password, safe="")). - A browser tool takes the proxy at launch, for example Playwright's
proxy={"server": "http://gate.proxyfield.io:7000", "username": "<login>", "password": "<password>"}.
A fetch tool for the agent. To let the agent decide which pages to open, give it a tool of your own that fetches through the proxy:
import requests
from bs4 import BeautifulSoup
from langchain_core.tools import tool
@tool
def fetch_page(url: str) -> str:
"""Fetch a public web page and return its visible text."""
r = requests.get(url, proxies={"http": PROXY, "https": PROXY}, timeout=30)
r.raise_for_status()
return BeautifulSoup(r.text, "html.parser").get_text(" ", strip=True)[:20000]
print(fetch_page.invoke({"url": "https://api.ipify.org"})) # expect the proxy's exit IP, not your server'sPass fetch_page in the agent's list of tools; every page the agent opens then leaves from a ProxyField IP. Only if your network requires the model calls to go through a proxy too, give the chat model its own client: ChatOpenAI(model=..., http_client=httpx.Client(proxy=PROXY)). Otherwise keep the model's API host in NO_PROXY, so model calls are not counted on your proxy balance.
Three checks before an agent runs at volume:
-
Test one IP first
Fetch
https://api.ipify.orgthrough the proxy and compare the IP with your server's. -
Rotate for independent pages, stick for a task
50 unrelated product pages: a new IP per request. Clicking through one site: one session id for the task. A sticky IP that sits idle for 120 seconds is replaced, so an agent that pauses longer between steps (a long model call) may continue on a new IP.
-
Cap concurrency per site
Agents can fire many requests at once;
requests_per_secondabove, or your own limit, keeps the pace human-scale.
Which proxy type an agent needs, one session per agent and fleet sizing: the guide to proxies for AI agents. Agents connect to scraping tools through MCP servers more and more often: web crawl and scraping MCP servers. For self-hosted agent frameworks, see web scraping with OpenClaw.
Which tools track brand mentions in Perplexity answers across hundreds of prompts?
Six AI-visibility platforms name Perplexity, and one publishes a plan with hundreds of prompts on it: OtterlyAI Premium, 400 prompts checked daily on a monthly plan. Larger Perplexity prompt sets are on custom Enterprise plans (OtterlyAI from 1,000 prompts, Gauge, GetMentioned). For the raw answers in your own database, a pipeline on a Perplexity scraper API costs $13.50 for 300 prompts a day for 30 days (ProxyField's, in development).
Vendor pages (plans and prices change, so check before you buy):
| Tool | Hundreds of Perplexity prompts? | Your own prompts: quota and price | What it reports |
|---|---|---|---|
| OtterlyAI | Yes: Premium, 400 | Lite 15 prompts, Standard 100, Premium 400, each a monthly plan (prices on its pricing page); +100 prompts as a monthly add-on on Standard and Premium; Enterprise from 1,000. ChatGPT, AI Overviews, Perplexity and Copilot included; checked daily | Brand coverage, mentions, domain citations, competitors |
| Gauge | On Enterprise only | Growth plan: 600 prompts daily, 54,000 answers a month, on ChatGPT, Google AI Mode and Copilot, not Perplexity. Enterprise (custom price and prompt count) adds Perplexity among 6 platforms | Mention rate, citation rate, visibility score, competitors |
| GetMentioned | On Enterprise only | Starter €89 a month for 25 prompts, Growth €199 for 100, Enterprise unlimited (custom); each prompt runs daily on ChatGPT, Perplexity and Gemini | Visibility score, mention counts, trends, position per prompt |
| Ahrefs Brand Radar | No: up to 83 checks a day | Custom prompts from $50 a month: 5, 10 or 20 prompts (150, 300 or 600 checks a month); Enterprise from 2,500 checks. Each prompt uses 1 check per platform, location and update, so 2,500 checks a month is 83 prompts a day on one engine, or about 14 on six. AI Visibility Index: $199 a month, 83 prompts a day, 2,500+ checks, $0.020 per extra check. Plus a prebuilt index of 512M+ monthly prompts, 28.4M+ of them on Perplexity | Mentions, citations, AI share of voice, estimated impressions |
| Semrush AI Visibility Toolkit | Check the plan | Brand Performance reports by platform, Perplexity included; check the plan for custom prompt tracking | Share of voice, mentions, average position, sentiment, citations |
| Peec AI | Not stated | Names ChatGPT, Perplexity and Gemini; its pricing page shows no prompt counts or prices per plan | Visibility, position, sentiment, share of voice, sources |
Pick by prompt count:
| Your prompts on Perplexity | Fits |
|---|---|
| Up to 25 | Ahrefs custom prompts (5 to 20), OtterlyAI Lite (15), GetMentioned Starter (25) |
| 26 to 100 | OtterlyAI Standard (100), GetMentioned Growth (100) |
| 100 to 400 a day | OtterlyAI Premium (400), or Standard with +100 blocks |
| 600 to 1,000+ a day | Enterprise plans: OtterlyAI (from 1,000), Gauge, GetMentioned |
| Any count, raw answers in your database | Your own pipeline on a Perplexity scraper API: 300 prompts a day = 9,000 answers a month = $13.50 |
Past a platform's quota, or when you want the raw answers in your own database, building your own is the cheaper route. ProxyField's Perplexity scraper API is in development (Contact sales), so the pipeline column is its design and price, not a service you can call today:
| Feature | AI-visibility platform | Your own pipeline on a scraper API |
|---|---|---|
| What you get | Ready dashboards, competitor views | Every raw answer and its cited sources, in your database; no dashboards |
| Prompt count | The plan's quota | As many as you pay for |
| Price basis | Monthly plan | ProxyField's Perplexity scraper API: $1.50 per 1,000 successful results, or $1.00 from 10,000 results in one purchase |
| 400 prompts a day, 30 days | OtterlyAI Premium's monthly plan, 4 engines, with dashboards | 12,000 answers = $12.00 at $1.00 per 1,000 (from 10,000 in one purchase), Perplexity only, raw answers |
| 300 prompts a day, 30 days | Between OtterlyAI's Standard and Premium quotas | 9,000 answers = $13.50 at $1.50 per 1,000 |
| Your work | Choosing prompts | Scheduling, storing, parsing brands and sources, building reports |
ProxyField's scraper APIs are in development: the design is in the API documentation, and access goes through Contact sales. They are billed on successful results only and paid from the same crypto balance as proxies, with no subscription:
| API | What it returns | Price per 1,000 successful results |
|---|---|---|
| Perplexity scraper API | The Perplexity answer | $1.50, or $1.00 from 10,000 results |
| ChatGPT scraper API | The ChatGPT answer | $1.50, or $1.00 from 10,000 results |
| Google AI Mode API | The AI Mode answer | $1.50, or $1.00 from 10,000 results |
| Google SERP API | The results page as JSON, with the AI Overview, People Also Ask and the local pack parsed | $1.20, or $0.80 from 10,000 results |
All four are on the AI search scraper page.
AI crawlers and the sites you scrape
The other side of AI scraping is the crawlers AI companies run. OpenAI's GPTBot and OAI-SearchBot, Anthropic's ClaudeBot and Claude-SearchBot, and Common Crawl's CCBot announce themselves by user agent and follow robots.txt rules addressed to them, and many sites now block some or all of them. Two consequences for your own scraping:
robots.txtis getting longer and stricter. Read it before you scrape, and respect rules that apply to all agents: how to check if a website allows scraping.- Bot protection is tighter. Sites that fight AI crawlers also challenge other automated traffic more often; the checklist in how to avoid getting blocked while scraping applies to AI scrapers too.
Is AI scraping legal?
The same rules apply as to any scraping: public data, no logins you are not entitled to, respect for copyright and personal data law, and extra rules when the data trains a model. The detail, with the main court cases and the EU rules, is in is AI scraping legal. ProxyField's acceptable use policy allows public data collection and forbids access to data behind logins you are not entitled to. This is not legal advice.
AI web scraping guides
- Can ChatGPT scrape websites?: what it can fetch, and when you still need a scraper.
- Web scraping with Claude: web fetch, browser use and Claude Code.
- Web scraping with OpenClaw: a self-hosted agent that browses.
- Web crawl and scraping MCP servers: tools AI clients call.
- Web scraping for AI training and RAG: datasets, pipelines and costs.
- Is AI scraping legal?
Sources
- Scrapy: selectors: CSS and XPath selectors,
.get()and.getall(). - LangChain
WebBaseLoadersource: theproxies,requests_per_secondandtrust_envparameters;proxiesis applied to the requests session used byload(). - HTTPX: API: the
proxyargument. - Ahrefs Brand Radar, OtterlyAI pricing, Gauge pricing, GetMentioned pricing, Semrush: Brand Performance reports, Peec AI pricing: engines, prompt quotas, prices, check rules and metrics as each vendor states them.
- OpenAI: overview of OpenAI crawlers, Anthropic: crawling and how site owners can block it, Common Crawl: CCBot.
AI Web Scraping FAQ
How much does AI web scraping cost?
ProxyField's residential proxies for the fetch step cost $2.95/GB for 1 GB down to $1.95/GB from 1,000 GB, and the Easy Trial is 1 GB for $2.95. On top comes the model's token cost per page, which grows with page length, so cleaning pages to text before extraction cuts the bill. For high-volume pages with a stable layout, plain selectors avoid the model cost entirely.
What is AI scraping?
Web scraping in which an AI model, usually an LLM, reads the downloaded pages and extracts the data you describe, instead of selectors you write per site. The term is also used for AI companies crawling the web to collect training data.
Is AI web scraping better than traditional scraping?
It is better at varied or changing layouts and faster to set up, and worse at cost, speed and exactness per page. For stable, high-volume pages, selectors are cheaper and exact; many teams use AI to write and repair scrapers, and selectors to run them.
How does AI web scraping work?
A fetcher downloads the page through proxies, a cleaner strips it to text or Markdown, an LLM extracts the requested fields as JSON, and a validation step checks the values before they are stored. Only the extraction step is AI; blocks and JavaScript are handled by the fetcher as in any scraper.
What is an AI scraper?
A tool or script that uses an AI model to find and extract data on web pages, from a browser extension that reads the open page to a pipeline that processes millions of pages. Most also include a fetcher, and the larger ones a proxy pool.
What is vibe scraping?
Describing the data you want in plain language and letting an AI coding assistant write, run and fix the scraper, by analogy with "vibe coding". It works well for one-off jobs; for recurring ones, review and keep the generated code.
What counts as an LLM scraper?
Any scraper in which a large language model decides what to extract or where to go next: an extraction step that turns page text into JSON, or an agent that browses and chooses links itself. A scraper that only uses an LLM to write its code once is ordinary code afterwards.
Do AI scrapers hallucinate data?
They can: a model may fill a missing price, merge two products or reformat a value wrongly. Ask for null when a field is absent, use a JSON schema, validate types and ranges, and check a sample against the source pages.
Can AI scrapers handle JavaScript websites?
Only if their fetcher renders JavaScript: the model reads whatever HTML it is given, so a page built in the browser must be loaded in a headless browser first. Agents that drive a real browser handle it, at the cost of more time and traffic per page.
Do AI agents need proxies?
For a few pages, no. For many pages, protected sites or results from another country, yes: an agent's requests come from a server IP and get rate-limited and challenged like any scraper's, so its fetch tool needs rotating residential IPs and a location setting.
Show 7 more questionsShow fewer questions
What is an AI agent proxy?
A proxy configured for the tools an AI agent uses to reach the web, its HTTP fetcher or its browser, so the agent's requests leave from the proxy's IPs and location. It is an ordinary proxy; what changes is how rotation and sessions are set for the agent's tasks.
How do I give an AI agent built with LangChain web access through proxies?
Set the proxy in the tool that fetches pages: WebBaseLoader(url, proxies={"http": PROXY, "https": PROXY}).load(), with PROXY = "http://<login>:<password>@gate.proxyfield.io:7000" for ProxyField. For tools you did not write, set HTTP_PROXY, HTTPS_PROXY and NO_PROXY; the async loader needs those variables and trust_env=True. The model's own API calls do not need the proxy.
How should AI agents handle proxy IP rotation?
Rotate per request when the agent fetches independent pages, and keep a sticky session for any task that clicks through one site, signs in or fills a cart. Cap concurrency per site and retry failed fetches on a new IP after a pause.
Do ChatGPT answers vary by country, and how can I check them from different locations?
They can differ with the language and location of the question, especially for local, shopping and news queries. To compare, send the same prompts from IPs in each country, or use an API that returns the answers by location: ProxyField's ChatGPT scraper API, in development, is priced at $1.50 per 1,000 successful results, or $1.00 from 10,000 results.
How do companies monitor their brand's visibility in AI search answers at scale?
They run a fixed set of prompts on a schedule across ChatGPT, Perplexity, Google AI Mode and AI Overviews, from the countries they sell in, then store the answers, the brands named and the sources cited, and track changes over time. An AI-visibility platform does this inside its prompt quota; a pipeline on scraper APIs does it at any prompt count.
Which tools track brand mentions in Perplexity answers across hundreds of prompts?
With a published plan, OtterlyAI Premium: 400 prompts checked daily on Perplexity, ChatGPT, AI Overviews and Copilot on its monthly plan, with +100 prompts as a monthly add-on. Gauge and GetMentioned put Perplexity at that scale only on custom Enterprise plans (Gauge's Growth plan covers 600 prompts but not Perplexity), and Ahrefs Brand Radar counts one check per prompt, platform, location and update, so its 2,500 checks a month are 83 prompts a day on one engine. For raw answers in your own database, a pipeline on ProxyField's Perplexity scraper API, in development through Contact sales, costs $13.50 for 300 prompts a day for 30 days at $1.50 per 1,000 successful results.
Can AI scrape competitor prices?
Yes: an AI extractor can read prices from many differently built shops with one schema, which saves writing a scraper per shop. Fetch the pages through residential IPs in the shop's country so you see local prices, and validate prices against the page before you act on them; more in price monitoring.
Every guide in this series
- Can ChatGPT Scrape Websites?
- How to Scrape a Website With OpenClaw
- Web Scraping for AI Training: From Crawl to Clean Dataset
- Web Scraping With Claude
- AI Web Crawlers: Crawl4AI and LLM-Ready Crawling
- Web Crawl MCP: Scraping Tools With an MCP Server for AI Agents
- Free AI Web Scrapers: Open-Source Tools
- Best AI Web Scrapers: What Works on Bot-Protected Sites
- Proxies for AI Agents
Related pages
Easy Trial: 1 GB for $2.95.
Try for the price of 1 GB, no subscription, traffic never expires.