What Is Screen Scraping?
Screen scraping is collecting data from what an application or website displays, the text and pixels a person sees, instead of from its files, database or API. A screen scraper captures that data in one of the three ways below, then maps the values to fields and saves them as rows. When the screen is a web page, ProxyField residential proxies give the browser a new IP on every request 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 is screen scraping?
- How does a screen scraper capture data?
- Screen scraping a website
- Python screen scraping: screenshot and OCR
- What is screen scraping used for?
- Screen scraping in banking and open banking
- Screen scraping vs web scraping vs RPA vs OCR
- Drawbacks of screen scraping
- Can websites detect screen scraping?
- What Is Screen Scraping? FAQ
- It reads the interface's structure: the DOM of a rendered web page (elements found by tag, id or CSS selector), the controls of a desktop window through UI automation, or the character grid of a terminal screen.
- It operates the interface like a person: it clicks, types, scrolls and logs in to reach the next screen or record.
- It reads the pixels: it takes a screenshot and turns it into text with OCR (optical character recognition).
What is screen scraping?
Screen scraping means a program copies information from an application's visible output and turns it into data. The program does not ask the application for the data in a machine-readable form; it reads what the application shows, the way a person would, only faster and without typing mistakes.
The term is older than the web. It started with mainframe terminals: programs read the 80-column text screens of a host system and copied fields into newer software. Today it covers three kinds of source:
- Desktop and legacy applications with no export, no database access and no API.
- Terminal screens of mainframe and AS/400 systems, read through a terminal emulator.
- Web pages as displayed, read from the rendered page or a screenshot instead of the HTML the server sent.
"Screen scrape", "screen scraper" and "screen scraping software" all refer to this. On websites, people often say screen scraping when they mean web scraping: a web scraper usually reads the HTML the server sends, a screen scraper what the browser has rendered. The difference is covered in our guide on what web scraping is.
How does a screen scraper capture data?
A screen scraper reads the display with one of four methods, from the most reliable to the least, and usually drives the interface between reads.
| Method | How it reads the screen | Works on | Weak point |
|---|---|---|---|
| DOM reading | Asks the browser for the elements of the rendered page by tag, id or CSS selector and copies their text | Web pages, after their scripts have run | Breaks when the site renames its classes |
| UI element reading | Asks the operating system's accessibility or UI automation layer for the text of each window control | Desktop apps built with standard controls | Fails on apps that draw their own controls |
| Terminal emulation | Reads characters at fixed row and column positions of a terminal screen | Mainframe and AS/400 green screens | Positions move when the host screen changes |
| OCR on screenshots | Takes a screenshot and turns the pixels into text | Anything that can be shown on screen | Slow, and misreads small or stylized text |
Operating the interface. Most screen scrapers also act like a user: they open a screen, type into a search box, click "next", scroll to load more rows or log in, and wait for the new content to draw before they read again. This is where screen scraping overlaps with robotic process automation (RPA); RPA tools and their screen scraping steps are covered in RPA Web Scraping .
After reading, the scraper does what every scraper does: it maps the values to fields, cleans them (a displayed "$19.99" becomes the number 19.99) and writes them to a CSV file, a spreadsheet or a database.
Screen scraping a website
To screen scrape a website, you load it in a real browser, let its scripts run, and read what the browser displays: the text of the rendered elements, or a screenshot.
The DOM is what you read. The browser turns every page into the Document Object Model (MDN), a tree of elements such as headings, table cells and buttons. A scraper finds elements in that tree by tag, id or CSS selector and copies their text: in a browser console, document.querySelectorAll("h1, h2"); in Playwright, page.locator("h1, h2"); in Selenium, driver.find_elements(By.CSS_SELECTOR, "h1, h2") (see Selenium's locator strategies). Selectors in depth: HTML Scraping With CSS Selectors and XPath.
A headless browser driven by Playwright, Puppeteer or Selenium does both kinds of read. Reading the rendered elements is far more accurate than OCR, so keep screenshots for content that exists only as an image, such as a chart or a price drawn on a canvas.
This Python example opens a page through the ProxyField gateway with Playwright, saves a screenshot and reads the text of every heading from the DOM. Replace <login> and <password> with your credentials; <login>-country-us-city-new_york asks for an exit IP in New York.
# pip install playwright && playwright install chromium
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.chromium.launch(proxy={"server": "http://gate.proxyfield.io:7000",
"username": "<login>-country-us-city-new_york", "password": "<password>"})
page = browser.new_page()
page.goto("https://example.com")
page.screenshot(path="page.png", full_page=True) # the screen as an image
print(page.locator("h1, h2").all_inner_texts()) # the screen as text, read from the DOM
browser.close()If the data is in the HTML the server sends, skip the browser and read the HTML directly: it is faster and uses less traffic. Our guide to scraping dynamic web pages shows how to tell which case you have. Region targeting and sticky sessions take further username settings: -region-<region>, -session-<id> and -ttl-<seconds> (30 to 129,600 seconds, 20 minutes by default) after the location, as in <login>-country-us-region-new_york-city-new_york-session-he9f2qga-ttl-600.
Python screen scraping: screenshot and OCR
To screen scrape with OCR in Python, capture a screen region with mss, clean the image with Pillow, read it with the Tesseract engine through pytesseract, then parse the value you need. Four steps:
1. Install the packages and the engine. pytesseract is only a wrapper; it does not install Tesseract.
| System | Command |
|---|---|
| Any (Python packages) | python -m pip install mss pillow pytesseract |
| Ubuntu or Debian | sudo apt install tesseract-ocr (other languages: tesseract-ocr-deu, tesseract-ocr-fra …) |
| macOS (Homebrew) | brew install tesseract |
| Windows | Install Tesseract from the installation guide's Windows build, then add it to PATH or set tesseract_cmd as in the code |
Check the engine with tesseract --version. If Python cannot find it, pytesseract raises pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
2. Capture, 3. clean and OCR, 4. parse:
import re
import mss
import pytesseract
from PIL import Image, ImageOps
# Windows only, if tesseract.exe is not on PATH:
# pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe"
region = {"left": 100, "top": 200, "width": 600, "height": 80} # pixels on screen
# 2. Capture: one mss instance, reused for repeated grabs
with mss.mss() as sct:
shot = sct.grab(region) # sct.monitors[1] is the first monitor, [0] all of them
img = Image.frombytes("RGB", shot.size, shot.bgra, "raw", "BGRX")
# 3. Clean the image (grayscale, enlarge 2x, black and white), then OCR it
img = ImageOps.grayscale(img)
img = img.resize((img.width * 2, img.height * 2))
img = img.point(lambda p: 255 if p > 160 else 0) # use ImageOps.invert(img) first for light text on dark
text = pytesseract.image_to_string(img, config="--psm 6")
print(repr(text)) # 'Total: $19.99 Items: 3\n'
# 4. Parse the value you need
m = re.search(r"\$\s?(\d[\d,]*\.\d{2})", text)
price = float(m.group(1).replace(",", "")) if m else None
print(price) # 19.99We ran steps 3 and 4 with Tesseract 5.3.4 on a rendered image of "Total: $19.99 Items: 3"; the printed output is in the comments.
- Page segmentation mode:
--psm 6reads one uniform block of text;--psm 7a single line.pytesseract.image_to_data()returns each word with its position and a confidence score, which helps you reject misreads. - On Linux,
mssand Pillow'sImageGrabneed an X11 display; on a server, run the app in a virtual display such as Xvfb.ImageGrab.grab(bbox=(left, top, right, bottom))works on Windows and macOS too, butmssis faster for repeated grabs. - Check the output: OCR confuses 0 and O or 1 and l, and loses table structure, so validate numbers before anyone relies on them.
If the text is in the page's HTML or DOM, do not OCR it: read the elements as in the Playwright example. Where a desktop application exposes its controls, a UI automation library reads the exact text and is the better first choice.
What is screen scraping used for?
Screen scraping is used where the data exists only on a screen.
- Legacy system migration. Copying records out of an old application before it is switched off, when it has no export.
- Integration with mainframes. Letting a modern web app read and write a host system's screens, a long-standing use in insurance, government and banking.
- RPA workflows. Software robots that copy values between applications in back-office work, such as invoice entry.
- Financial account aggregation. Apps that logged in to a bank's website with the customer's credentials and read the balances; regulators have been moving this to bank APIs (see below).
- Visual checks of websites. Screenshots that confirm how a page, an ad or a price looks in a given country or city, as in ad verification.
- Content that is drawn, not written. Prices or figures rendered as images or on a canvas.
Screen scraping in banking and open banking
Banking is where screen scraping is most regulated. In the EU, the second Payment Services Directive (PSD2, Directive (EU) 2015/2366) and its technical standard on strong customer authentication (Delegated Regulation (EU) 2018/389) require banks to give licensed third parties access through a dedicated interface, usually an API, and to identify themselves, applying from September 2019. In the UK, the Open Banking standard set up bank APIs for the same purpose. In the US, the Consumer Financial Protection Bureau finalized its Personal Financial Data Rights rule under section 1033 of the Dodd-Frank Act in October 2024 to move account data access to developer interfaces, and opened a reconsideration of the rule in August 2025; check the rule's current status on the CFPB's rule page. The common thread: where an API exists, regulators prefer it to screen scraping with stored passwords.
Screen scraping vs web scraping vs RPA vs OCR
These four overlap, so it helps to separate what each one reads and does.
| Feature | Reads | Main job | Typical tool |
|---|---|---|---|
| Screen scraping | The displayed output of any application | Copy values off a screen | UI automation, terminal emulators, OCR, headless browsers |
| Web scraping | A web page's HTML, DOM or the JSON it loads | Extract structured data from websites | HTTP libraries, headless browsers |
| RPA | Application screens, through clicks and keystrokes | Automate a whole business process | RPA platforms |
| OCR | Images and scanned documents | Turn pixels into text | OCR engines such as Tesseract |
RPA uses screen scraping as one step; OCR is one technique a screen scraper may use. Web scraping is usually more reliable than screen scraping, because page code is more structured than pixels. The tools for each are compared in best web scraping tools.
Drawbacks of screen scraping
Screen scraping is the method of last resort because:
- It breaks with the interface. Move a field or rename a button and the scraper reads the wrong value or nothing.
- It is slow. It waits for screens to draw, and OCR takes time on every image.
- OCR makes mistakes, so numbers need validation before anyone relies on them.
- It often needs credentials. Scrapers that log in as a user hold passwords, which is a security and compliance risk.
- It loads the source system like a very fast user, which matters on old hosts and on websites with rate limits.
Use an API, an export or the page's HTML when any of them exists, and keep screen scraping for the data that has no other way out.
Can websites detect screen scraping?
Yes. A website cannot see your screenshots, but it sees the browser that loads the page: how many requests come from one IP, how fast they come, and whether the browser's fingerprint looks automated. Screen scraping a site at volume needs the same care as any web scraping: polite pacing, realistic browser settings and a varied IP footprint. Rotating proxies give each page load a new IP, or keep one IP for a sticky session when a flow spans several screens. Scrape public data only, and check the rules first in is web scraping legal.
ProxyField residential proxies work with Playwright, Puppeteer and Selenium over HTTP, HTTPS and SOCKS5, with country, region and city targeting and sticky sessions from 30 s to 36 h. Setup guides: Playwright, Puppeteer, Selenium. You pay per GB with no subscription; the traffic never expires, and all purchases are final.
What Is Screen Scraping? FAQ
What is screen scraping, and how does a screen scraper actually capture data from an app or a website?
ProxyField counts 3 ways a screen scraper captures data from what an app or website displays: it reads the interface's structure (a web page's DOM by CSS selector, a desktop window's controls, a terminal's character grid), operates the interface like a person (click, type, scroll, log in), or runs OCR on a screenshot. Screen scraping itself is collecting data from that display instead of from the app's files, database or API. The values are then mapped to fields and saved as rows.
What is screen scraping?
Screen scraping is copying data from what an application displays, by reading its interface, its terminal screen or a screenshot, instead of from a file, a database or an API. It began with mainframe terminals and today also covers desktop apps and web pages as rendered in a browser.
How do I screen scrape data in Python by taking a screenshot and running OCR on it?
Install mss, pillow and pytesseract with pip and the Tesseract engine itself (sudo apt install tesseract-ocr, brew install tesseract, or the Windows build). Grab the region with mss, convert it to grayscale, enlarge and threshold it, and call pytesseract.image_to_string(img, config="--psm 6"). Then parse the value with a regular expression and validate it, because OCR confuses 0 and O; the full script is on this page.
Why does pytesseract say tesseract is not installed?
The error TesseractNotFoundError: tesseract is not installed or it's not in your PATH means the Python wrapper cannot find the engine binary. Install Tesseract itself (pip does not), check it with tesseract --version, or point pytesseract.pytesseract.tesseract_cmd at the full path, such as C:\Program Files\Tesseract-OCR\tesseract.exe on Windows.
What is a screen scraper?
A program that reads data off an application's display and saves it in a structured form. It may read a web page's DOM, window controls through UI automation, characters on a terminal screen, or text in a screenshot through OCR, and many screen scrapers also click and type to move from record to record.
How does screen scraping work?
The scraper reads the display, maps what it reads to fields, and stores them. It reads the display in one of four ways: from the DOM of a rendered web page, by asking the operating system for the text of each control, by reading fixed positions on a terminal screen, or by running OCR on a screenshot.
What is screen scraping used for?
Copying data out of legacy applications that have no export, connecting modern software to mainframe screens, automating back-office tasks with RPA, aggregating financial accounts, and taking screenshots that show how a web page or an ad looks in a given location. In each case the data has no export or API, or the screen itself is what must be checked.
How do you screen scrape a website?
Load the page in a headless browser such as Playwright, let its scripts run, then read the text of the rendered elements by CSS selector, for example page.locator("h1, h2"), or save a screenshot. Reading elements is more accurate than OCR, so use screenshots only for content drawn as images, and route the browser through a proxy if you load many pages.
Is screen scraping the same as OCR?
No. OCR turns images of text into text; screen scraping is the wider job of collecting data from a display. A screen scraper may use OCR, but it often reads the text directly from interface elements or a terminal, which is faster and more accurate.
Is screen scraping the same as RPA?
No. RPA (robotic process automation) automates a whole business process by clicking and typing in applications like a person. Screen scraping is the reading part: RPA tools use it to copy values off screens, but screen scraping alone does not run the process.
Show 5 more questionsShow fewer questions
Can websites detect screen scraping?
They cannot see your screenshots, but they can see the browser that loads the pages: the number of requests per IP, their pace, and signs of automation in the browser's fingerprint. Pace the page loads, use realistic browser settings and spread the traffic over rotating IPs to stay within normal visitor patterns.
What are the main drawbacks of screen scraping?
It breaks when the interface changes, it is slow, OCR misreads characters, and scrapers that log in must store user credentials. Use an API, an export or the page's HTML whenever one exists.
Which is faster: screen scraping or web scraping?
Web scraping. Reading a page's HTML takes one request and no rendering, while screen scraping waits for the display to draw and may run OCR on every image. On websites, a browser-based screen scrape also downloads scripts, images and fonts, so it uses more traffic per page.
Is screen scraping still used in banking?
Less and less. EU rules under PSD2 have required banks to offer dedicated interfaces to licensed third parties since 2019, the UK built Open Banking APIs, and the US rule on personal financial data rights, finalized in October 2024 and reopened in 2025, aims at the same shift. Screen scraping remains where no API exists.
Does screen scraping use AI?
It can. Modern OCR engines use machine learning to read text from images, and AI models can now find fields on a screenshot without fixed positions, which makes scrapers less fragile when layouts change. The basic methods, UI automation and terminal reading, need no AI.
Related pages
Easy Trial: 1 GB for $2.95.
Try for the price of 1 GB, no subscription, traffic never expires.