A link-following crawler cannot reach private sites behind logins, results generated by search forms, or pages built by scripts. How large this deep web is remains unknown: Bergman (2001) estimated 400 to 550 times the indexed web by data volume, not documents, and He and colleagues (2007) about 307,000 deep web sites in 2004. Capture and recapture estimates the ratio of two indexes with some confidence, but the size of the web only as a rough lower bound. Crawlers reach part of the rest by surfacing form results, keeping only query templates whose distinct result pages number at least a quarter of their submissions (Madhavan and colleagues, 2008), by rendering scripts in a headless browser, and by reading sitemaps.
When this site was crawled for crawler architecture, it had a wiki index page at /wiki/ that no other page linked to. As what a web crawler does pointed out, the crawler found all 77 articles and never found the index. Library catalogs, flight schedules, court records, product databases and anything behind a login are out of reach for related reasons. How much of the web can following links never reach, and how can a crawler reach any of it? No one knows the first figure exactly; the published estimates run to hundreds of times the indexed web by volume. A crawler reaches part of it by filling in forms, by running scripts, and by reading the lists of pages that sites publish.
A crawler finds pages by following links, so it can only reach pages that something links to, and only in the form a plain HTTP request returns. Everything else is the deep web, also called the hidden or invisible web: content that is publicly reachable, or reachable by some users, but not by following links from the pages a search engine already knows. It is not the "dark web", which refers to sites reachable only through anonymizing networks such as Tor. Most of the deep web is ordinary.
Here is the route. First we sort what a crawler cannot reach into three kinds, and ask how large the deep web is and how such sizes can be estimated at all. Then come three ways in: filling in forms, running scripts, and reading the lists sites publish. Worked problems close the article.
What a crawler cannot reach
Croft, Metzler, and Strohman (2010, §3.2.5) divide deep web content into three kinds.
Private sites
Some content is meant to be private. Email, bank accounts, company intranets, and course management systems require a login, and no public page links into them. A crawler should not try to reach this content, and a general web crawler has no credentials with which to do so. Search over private content is provided instead by the systems that hold it, as in the enterprise and personal search applications.
Form results
A great deal of public information is reached only by filling in a form. A flight search, a library catalog, a patent database, or a government registry generates its result pages from a database, in response to the values a user enters. There may be no link to any individual result, and the number of possible queries is effectively unlimited. A crawler that only follows links sees the form and nothing behind it.
Scripted pages
Many sites send a nearly empty HTML page and build the visible content in the browser with JavaScript, fetching data from the server as the page runs. A crawler that downloads the HTML and parses it, as the crawl loop describes, sees only the empty shell and the script tags. Links created by scripts are equally invisible.
A flight-status page built this way might send only this much HTML:
<div id="flights">Loading...</div>
<script src="/static/status.js"></script>
In a browser, status.js runs and requests /api/departures?airport=RDU. It receives a list of flights as JSON and writes a table of them into the flights element.
Example (what a crawler without scripts sees). A crawler that parses HTML but runs no scripts indexes from this page a document whose entire text is "Loading...", with no links to the individual flights. The JSON request, by contrast, has a URL of its own and returns the data in a form a program can read directly, which is why it is often the better target. Flash, a browser plug-in, caused the same problem until browsers stopped supporting it.
How large is it?
Bergman (2001) estimated that the deep web held 400 to 550 times as much content as the surface web indexed by search engines. That was about 7,500 terabytes against 19 terabytes, spread across some 200,000 sites.
That does not mean 500 hidden pages for every indexed one. The estimate was extrapolated from a sample of large databases and counted raw data volume. It says more about the size of the databases behind forms than about the number of useful documents. A later survey by He, Patel, Zhang, and Chang (2007) counted sites rather than bytes. It estimated about 307,000 deep web sites in 2004, offering some 450,000 databases. Whatever the exact figure, the conclusion is the same: link-following reaches only a small part of what is on the web.
Estimating a size that cannot be counted
No one can list the pages a crawler missed, so sizes of this kind are estimated by sampling. The basic tool is the capture-recapture method, which the course text applies to the indexes of two search engines (Manning, Raghavan, and Schütze, 2008, §19.5). Bharat and Broder (1998) introduced the approach for comparing search engines.
Here is the idea: if two engines each hold a random part of the web, the share of one engine's pages that the other also holds reveals how large the other is.
The formal version. Let engines $E_1$ and $E_2$ index $\lvert E_1 \rvert$ and $\lvert E_2 \rvert$ pages. Sample pages at random from $E_1$ and test whether each is in $E_2$, and let $x$ be the fraction that is. Do the same from $E_2$ into $E_1$, with fraction $y$. Both experiments estimate the size of the same set, the pages the two engines have in common:
$$x\,\lvert E_1 \rvert \approx \lvert E_1 \cap E_2 \rvert \approx y\,\lvert E_2 \rvert, \qquad \text{so} \qquad \frac{\lvert E_1 \rvert}{\lvert E_2 \rvert} \approx \frac{y}{x}.$$
This much needs only that the samples are fair. One more assumption gives the size of the whole. If $E_1$ is a random subset of a web of $W$ pages, chosen independently of $E_2$, then a page of $E_2$ is in $E_1$ with probability $\lvert E_1 \rvert / W$. So $y \approx \lvert E_1 \rvert / W$, and
$$W \approx \frac{\lvert E_1 \rvert}{y} = \frac{\lvert E_1 \rvert\,\lvert E_2 \rvert}{\lvert E_1 \cap E_2 \rvert}.$$
A check by simulation: on a made-up web of 1,000,000 pages, one engine indexes 300,000 at random and the other 180,000, and 1,000 pages are sampled from each. Over 30 seeded runs the median estimate of the ratio is 1.665 (middle half of the runs 1.541 to 1.744) against a true $300{,}000/180{,}000 = 1.667$. The median estimate of $W$ is 1,003,356 (963,872 to 1,055,411).
The assumptions are the weak point, and the course text says so. Engines do not index independent random subsets. Crawlers reach well-linked pages first, as the first article of this topic showed, so two indexes share more pages than independent choices would give, and a larger overlap makes the estimate of $W$ too small. A fair sample from an engine's index is also hard to draw from outside. The practical method poses random queries and tests for a page's presence with a query built from its rare words, and each step has its own bias. The web itself has no finite size, since servers generate pages without limit. The method gives the relative sizes of two indexes with some confidence and the size of "the web" only as a rough lower bound.
Reaching some of it
Surfacing form results
A crawler can try to fill in forms itself. Raghavan and Garcia-Molina (2001) built HiWE, a crawler that analyzed a form's fields and filled them with values drawn from a task-specific list. Google's approach, described by Madhavan and colleagues (2008), was to surface form results:
- For each form, choose combinations of inputs that produce distinct, informative result pages.
- Generate the URLs of those result pages.
- Add them to the ordinary crawl.
A search box is filled with words taken from the site's own pages, and menus with their listed values. The result pages then become ordinary documents in the index, reachable by any query. The approach works only for forms submitted with GET, whose results have their own URLs. It also covers only a sample of what each database holds.
Why forms cannot simply be enumerated
Consider a used-car search form with three menus, make (40 options), body style (8) and year (20), and a text box for a zip code. With the text box left empty, the menus alone give $40 \times 8 \times 20 = 6{,}400$ combinations. At a polite rate of one request every 10 seconds, submitting them all takes 17.8 hours, for one form on one site. The text box multiplies that by every zip code. Many of the combinations return nothing, and many return the same cars sorted differently or split across pages.
Madhavan and colleagues (2008, §4) describe the choice in terms of query templates. A template names the inputs that will be varied, its binding inputs, and leaves the rest at their defaults. The number of binding inputs is the template's dimension. The template {make} generates 40 submissions, and the template {make, year} generates 800, which take 2.2 hours at the same rate. Instead of submitting every combination, the crawler searches for templates whose results are worth indexing.
A template is judged by an informativeness test: it is worth keeping if different inputs bring back different pages. The crawler submits the template's queries, computes a signature of each result page's content, and counts the distinct signatures. If the result pages are mostly distinct, the template is informative; if many share a signature, it is not. Formally, with $G$ the set of submissions a template generates and $S$ the set of distinct signatures of their result pages, the template is informative if $\lvert S \rvert / \lvert G \rvert \ge \tau$. Madhavan and colleagues define the test in §4.1 and report using $\tau = 0.25$ in their experiments (§4.4), together with a second threshold of 0.2 on signatures not already produced by another template of the same form. Suppose, for illustration, the following counts for the car form:
| Template | Submissions $\lvert G \rvert$ | Distinct pages $\lvert S \rvert$ | Ratio | Verdict |
|---|---|---|---|---|
| {make} | 40 | 37 | 0.925 | informative |
| {style} | 8 | 1 | 0.125 | uninformative |
| {make, style} | 320 | 251 | 0.784 | informative |
The template {style} is uninformative because, in this hypothetical form, the default make returns no records at all. Every body style gives the same "no results" page. This is the kind of form Madhavan and colleagues describe, with one primary input and others that only refine it.
Example (the template {year}). The template {year}, with its 20 submissions, is uninformative for the same reason as {style}. With make at its default, every year returns the same "no results" page: one signature in 20 submissions, a ratio of 0.05.
Their algorithm, ISIT, exploits this (§4.2). It starts from templates of dimension 1 and extends only the informative ones by one more input at a time, so {style} and {year} are never extended on their own. A form with 6 inputs has $2^6 - 1 = 63$ possible templates, 41 of them of dimension 3 or less. In their experiments ISIT tested 17.43 templates per such form on average and found 7.17 informative (§4.4). They also limited templates to dimension 3 and to at most 10,000 generated URLs each (§4.3). The result pages of the informative templates, with duplicate signatures removed, are what enters the index. Problem 3 below runs the whole algorithm on a synthetic form, with counts computed by script in place of the illustrative ones above.
Surfacing raises politeness questions. Every generated query costs the site a database search. A form designed for people choosing one flight was not designed for a crawler choosing thousands. The rate limits of politeness apply with extra force.
Rendering scripts
To see the flight-status page as a person does, a crawler must run its scripts, by loading the page in a headless browser, a browser with no display, and reading the document after the scripts have run. Major search engines now render pages this way. Rendering costs far more than parsing HTML, in processing time and in the additional requests the scripts make. Crawlers therefore typically fetch and parse first, and render later from a separate queue. Google, for example, queues every page that returns status 200 for rendering in a headless Chromium, and a page may wait in that queue for a few seconds or longer before its scripts are run (Google Search Central, n.d.). For a small crawler or a site monitor, the alternative is often better. The data a script displays usually comes from a request to the site's own interface, such as /api/departures?airport=RDU, which can be fetched directly.
Sitemaps and feeds
The simplest route into the deep web is for the site to list its pages. The Sitemaps protocol was introduced by Google in 2005 and adopted jointly with other search engines in 2006, at sitemaps.org. It lets a site publish an XML file of its URLs, with optional last-modified dates. A single sitemap file may list up to 50,000 URLs and be at most 50 MB uncompressed. An index file can point to as many as 50,000 sitemaps. A minimal sitemap with one entry looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://cars.example/listing/48213</loc>
<lastmod>2026-11-02</lastmod>
</url>
</urlset>
Only <loc> is required. The optional <lastmod> is what lets a crawler skip pages that have not changed since its last visit, as described in freshness and recrawling. A product catalog that is reachable only through search can list every product page in its sitemap. A crawler can then reach them all without filling in a form. A sitemap is named in robots.txt or submitted to search engines directly. One entry would have let the crawler find this site's unlinked /wiki/ page.
The limit that remains
Even with all three techniques, a large part of the web stays out of reach, and much of it should. Private content is private by design. Databases with millions of records cannot be fully surfaced through a search form, and a crawler that tried would be indistinguishable from an attack.
The practical lesson for anyone building a crawler is to check, before writing any scraping code, whether a site offers a sitemap, a feed, or an interface intended for programs. These are usually more complete, more stable, and more welcome than anything a crawler can extract from pages designed for people.
The numbers in the car-form example are computed by tools/experiments/crawling/deepweb_examples.py in the site repository.
Worked problems
Problem 1 is Exercise 19.7 of the course text (Manning, Raghavan, and Schütze, 2008), restated in our words. The others are posed on this article's car form and on the Sitemaps limits. The numbers are checked in deepweb_examples.py.
Problem 1 (Exercise 19.7). Search engines $A$ and $B$ each draw a large number of pages uniformly at random from their own indexes. Of $A$'s pages, 30 percent are present in $B$'s index. Of $B$'s pages, 50 percent are present in $A$'s index. How large is $A$'s index relative to $B$'s?
Both fractions measure the pages the two indexes share. From $A$'s side the shared pages number $0.30\,\lvert A \rvert$, and from $B$'s side $0.50\,\lvert B \rvert$. Setting them equal,
$$0.30\,\lvert A \rvert = 0.50\,\lvert B \rvert, \qquad \frac{\lvert A \rvert}{\lvert B \rvert} = \frac{0.50}{0.30} = \frac{5}{3} \approx 1.67.$$
$A$'s index is five thirds the size of $B$'s. The smaller fraction belongs to the larger index: a large index has more pages for the other engine to lack. The absolute sizes cannot be found from these two numbers alone.
Problem 2 (counting templates and submissions). For the car form, how long does the template {make, style, year} take to submit at one request every 10 seconds? How many templates does a form with 8 inputs have, and how many of them have dimension 3 or less?
The template binds all three menus, so it generates $40 \times 8 \times 20 = 6{,}400$ submissions. At 10 seconds each that is 64,000 seconds, or $64{,}000/3{,}600 = 17.8$ hours.
A template is a non-empty set of binding inputs. A form with $n$ inputs has $2^n$ subsets of inputs, one of them empty, so $2^n - 1$ templates: $2^8 - 1 = 255$ for 8 inputs. Those of dimension 3 or less number
$$\binom{8}{1} + \binom{8}{2} + \binom{8}{3} = 8 + 28 + 56 = 92.$$
Restricting to dimension 3 removes almost two thirds of the templates of an 8-input form, and far more of the submissions, since the templates removed are the ones that bind the most inputs. The same count for 6 inputs gives $6 + 15 + 20 = 41$, the figure in the text.
Problem 3 (the informativeness test, run in full). A synthetic car database holds 3,000 records, each with one of 40 makes, 8 body styles and 20 years. Makes are unevenly popular, and styles and years are uniform. The form's default for make matches no record, and its defaults for style and year mean "any". A result page lists at most 10 records, and its signature is that list. Run ISIT with $\tau = 0.25$, a limit of dimension 3 and a limit of 10,000 submissions per template.
The script generates the database from a fixed seed, submits every query of each template, and counts distinct signatures:
| Template | Submissions $\lvert G \rvert$ | Distinct pages $\lvert S \rvert$ | Ratio | Verdict |
|---|---|---|---|---|
| {make} | 40 | 40 | 1.000 | informative |
| {style} | 8 | 1 | 0.125 | uninformative |
| {year} | 20 | 1 | 0.050 | uninformative |
| {make, style} | 320 | 310 | 0.969 | informative |
| {make, year} | 800 | 652 | 0.815 | informative |
| {make, style, year} | 6,400 | 1,781 | 0.278 | informative |
ISIT begins with the three templates of dimension 1. Only {make} passes: every make returns its own list, while every style and every year, submitted with the default make, returns the one empty page. The algorithm then extends {make} by each other input, giving {make, style} and {make, year}. Both pass, with ratios below 1 because some combinations of a rare make with a given style or year have no car and return the empty page. Extending either gives the single template of dimension 3. Its 6,400 submissions are under the limit, and 1,781 distinct pages give a ratio of 0.278, just above $\tau$: with 3,000 cars spread over 6,400 combinations, most combinations are empty.
ISIT tested 6 of the 7 possible templates and found 4 informative. The one it never tested is {style, year}, which extends no informative template. On a form this small the saving is slight. On the forms with 6 inputs in the paper's experiments it was 17.43 tested out of 63. The run here also submits every query of a template, 7,588 in all, where Madhavan and colleagues test a large template on a sample of 200 submissions (§4.3).
Problem 4 (sitemap files for a catalog). A product catalog has 2.3 million product pages, reachable only through its search form. How many sitemap files does it need, and how many URLs can a single sitemap index cover?
A sitemap file lists at most 50,000 URLs, so the catalog needs $\lceil 2{,}300{,}000 / 50{,}000 \rceil = 46$ files, provided each also stays under 50 MB uncompressed. One sitemap index file lists them all, since it may point to as many as 50,000 sitemaps. At that limit a single index covers $50{,}000 \times 50{,}000 = 2.5$ billion URLs. With the index named in robots.txt, a crawler can fetch all 2.3 million pages without submitting the form once.
What we have learned
A link-following crawler misses private pages, form results, and scripted pages, and Bergman's estimate of 400 to 550 times the surface web measured bytes, not documents. Sizes that cannot be counted are estimated by capture and recapture, under assumptions that real indexes do not meet. Surfacing submits only templates that pass the informativeness test, rendering runs the scripts, and sitemaps list pages no link reaches.
Each route adds work to a crawl already too large for one machine. Distributed crawling and connectivity servers shows how a crawl is divided among many.
References
- Bergman, M. K. (2001). The deep web: Surfacing hidden value. Journal of Electronic Publishing, 7(1). record · 2 pages
- Bharat, K., and Broder, A. (1998). A technique for measuring the relative size and overlap of public Web search engines. Computer Networks and ISDN Systems, 30(1–7), 379–388. record
- Croft, W. B., Metzler, D., and Strohman, T. (2010). Search Engines: Information Retrieval in Practice, section 3.2.5. Addison-Wesley. record · 12 pages
- Google Search Central (n.d.). Understand the JavaScript SEO basics. Google developer documentation. developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics (accessed November 2026). record
- He, B., Patel, M., Zhang, Z., and Chang, K. C.-C. (2007). Accessing the deep web. Communications of the ACM, 50(5), 94–101. record
- Madhavan, J., Ko, D., Kot, Ł., Ganapathy, V., Rasmussen, A., and Halevy, A. (2008). Google's deep web crawl. Proceedings of the VLDB Endowment, 1(2), 1241–1252. record
- Manning, C. D., Raghavan, P., and Schütze, H. (2008). Introduction to Information Retrieval, section 19.5. Cambridge University Press. record · 102 pages
- Raghavan, S., and Garcia-Molina, H. (2001). Crawling the hidden web. In Proceedings of VLDB 2001, 129–138. record
- Sitemaps.org. Sitemaps XML format. Protocol documentation, 2006 and later. record
Reviewed: verified, 16 Nov 2026 · citations checked, 16 Nov 2026 · editorial review, 23 Nov 2026 · 7 revisions