# How search engine crawlers work: seed, fetch, extract, queue

A crawler starts from a seed URL, fetches the page, pulls out its links and queues the new ones. Here is one small crawl, the first twenty pages it returned.

Canonical: https://spider.cloud/learn/how-search-crawlers-work/

A search engine crawler is a program that keeps a list of addresses to visit, downloads the page at the top of the list, reads the links on it and adds the ones it has not seen to the list. It repeats that until the list is empty or a limit stops it, and the pages it downloads are then passed on to be indexed. Crawling and indexing are separate steps, and a search engine can leave a fetched page out of its index.

Four steps do all the work. The seed is the address you start from. The fetch downloads one page. Link extraction reads the page for addresses. The queue holds the addresses that are waiting. The rest of this page follows one small crawl through those four steps.

## The four steps

**Seed.** A crawler has to start somewhere, because the web has no master list. Google's guide says a page becomes known when it has been visited before, when a link to it is found on a known page, or when a sitemap lists it, and it adds that "Googlebot doesn't crawl all the pages it discovered". A seed is the first of those known pages. You choose it, and everything else is reached from it.

**Fetch.** The crawler requests the address and records what came back: the status, any error, and the body of the page. A page that returns a 404 or times out is recorded and left behind. The crawl goes on to the next address.

**Link extraction.** The crawler scans the body for links and turns each one into a full address. A relative link such as `/tag/love/` is joined to the address of the page it was found on. What counts as a link is narrow. Google's documentation on links says "Most links in other formats won't be parsed and extracted", meaning that anything other than an anchor with an `href` is likely to be missed. A page whose navigation is built from script events can hide most of a site from a crawler.

**Queue.** Each new address goes into the queue, unless the crawler has already fetched it or already queued it. That check is what stops a crawl from running in circles, because pages link back to the pages that linked to them. Addresses that differ only in a detail, such as the scheme or a trailing slash, can slip through as different pages, which is the reason [canonical URLs](/learn/canonical-url/) exist.

The crawler then takes the next address from the queue and starts again at the fetch. The order in which the queue is emptied is a choice. A queue that is read oldest first goes wide across a site, and one that is read newest first goes deep down one branch.

This clip follows one crawl from the address given to the 20 pages returned.

How a crawler finds pages. 54 s, no sound. The words are on screen, and the captions button shows them at your own text size.

Read the transcript

How a crawler finds pages. One crawl of a practice site: one address given, 20 pages returned.

A crawler repeats four steps. This run started from 1 address. seed: 1 address given. fetch: 20 pages, each status 200. read links: anchors that carry an href. queue: 19 addresses nobody gave it. Then the next address in the queue, until a limit stops it.

It reads each anchor and joins the href to the page's address. https\://quotes.toscrape.com/login is in the list. https\://quotes.toscrape.com/tag/change/page/1/ is not in the list. 2: links joined to the seed's address. 1: of them in the returned list.

20 pages came back, and 19 of them are addresses nobody typed. 1 seed, the address given. 10 tag pages. 8 author pages. 1 login page. 20: pages returned. 19: found by following links.

A page object has no time and no depth, so no fetch order. What the list can show: 20 addresses, as returned. reached: Which addresses the crawl reached. order: Needs a time or depth on each page. This run: reached.

Read the full page. The page is at spider.cloud/learn/how-search-crawlers-work.

## What stops a crawl

A crawl is bounded by settings you give it. A depth limit says how many links away from the seed the crawler may go. A page limit says how many pages it may fetch in total. A delay says how long to wait between requests. A large crawler also decides which pages to spend its effort on first, which is the subject of [crawl budget](/learn/crawl-budget/). A crawler that comes back to a site later still has to revisit pages to learn whether they changed, and it can send a conditional request so an unchanged page costs less to check.

Where the site has a [sitemap](/learn/sitemaps/), the crawler can read the page list from there and skip some of the guessing. Where a site splits a list across many pages, the crawler follows the next link on each one, as the [pagination](/learn/pagination/) page describes.

## One small crawl

The seed for this run was the home page of a site made for scraping practice. The request set a page limit of 20, a depth of 2 and a delay of 1000 milliseconds, and asked for the raw page. The `limit` and `depth` fields are listed in the API reference as the most pages to crawl and the most link steps to follow. The `delay` field is the wait in milliseconds between requests. This is the request as sent, and you can paste it with your own key in `SPIDER_API_KEY`. Finding the pages is the first half of [web scraping](/web-scraping/), and a crawl like this one does it.

```bash
curl -s https://api.spider.cloud/crawl \
  -H "Authorization: Bearer $SPIDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://quotes.toscrape.com/", "limit": 20, "depth": 2, "request": "http", "return_format": "raw", "delay": 1000, "user_agent": "examplebot/1.0 (+https://example.com/bot; bot@example.com)"}'
```

At 03:25 UTC on 2026-11-21 the crawl handed back 20 pages in 23.4 seconds. Every page returned a status of 200 and an error of null. Each page carries its body in a `content` field. The seed's body matters most, because the links in it are what the crawler extracted. These are three of its anchors, cut from the returned text and left as they came:

```text
<a href="/login">Login</a>
<a href="/author/Albert-Einstein">(about)</a>
<a class="tag" href="/tag/change/page/1/">change</a>
```

The list below holds the `url` of each page in the order the API returned them. Read it as a list of what was reached and not as the fetch order. Each page object has only `url`, `status`, `error` and `content`, so the response carries no fetch time and no depth, and the API streams each page back as it finishes. The same request run eleven minutes earlier returned a different set of twenty, in a different order.

```text
 1 https://quotes.toscrape.com/
 2 https://quotes.toscrape.com/tag/love/
 3 http://quotes.toscrape.com/author/Jane-Austen/
 4 https://quotes.toscrape.com/tag/friendship/
 5 https://quotes.toscrape.com/login
 6 https://quotes.toscrape.com/tag/reading/
 7 http://quotes.toscrape.com/author/J-K-Rowling/
 8 https://quotes.toscrape.com/tag/life/
 9 https://quotes.toscrape.com/tag/inspirational/
10 http://quotes.toscrape.com/author/Eleanor-Roosevelt/
11 http://quotes.toscrape.com/author/Thomas-A-Edison/
12 http://quotes.toscrape.com/author/Albert-Einstein/
13 https://quotes.toscrape.com/tag/truth/
14 https://quotes.toscrape.com/tag/humor/
15 http://quotes.toscrape.com/author/Marilyn-Monroe/
16 https://quotes.toscrape.com/tag/simile/
17 http://quotes.toscrape.com/author/Andre-Gide/
18 http://quotes.toscrape.com/author/Steve-Martin/
19 https://quotes.toscrape.com/tag/friends/
20 https://quotes.toscrape.com/tag/books/
```

## Reading the list

Line 1 is the seed, and it is the only address that was given to the crawler. The other nineteen are addresses the crawl found on its own. Since the response gives no depth, the closest check is to match each returned address against the anchors in the seed's body. A page whose link is in the seed sits one link from it. Our record of the run keeps the first 2,000 characters of each body, and that part of the seed has anchors for `/login`, two author pages and four tag pages.

The login page matches its anchor exactly. The Einstein anchor does not match line 12 as written, since the anchor is `https` with no trailing slash and line 12 is `http` with one. A second call settles it. A scrape of `https://quotes.toscrape.com/author/Albert-Einstein` at 03:35 UTC came back with this address and a status of 200:

```text
http://quotes.toscrape.com/author/Albert-Einstein/
```

So the site redirects the anchor to the address in the list, and the Einstein page sits one link from the seed too. That makes two of the nineteen placed. The rest stay unplaced. The four tag anchors in the saved part of the seed have the form `/tag/change/page/1/`, and none of those four tags came back. The tag pages in the list have the shorter form `/tag/love/`, so they came from links later in the seed or on another page, and the saved record does not say which.

Count the kinds. The list has one seed, one login page, ten tag pages and eight author pages. It holds no second page of quotes, so the twenty are a mix of the kinds of page the site links to, not one path followed to its end. The login page is in the list because it is a link like any other. A crawler can be given a rule that skips a path such as that one before it fetches anything there. This run had no such rule.

The limits of this run matter. The output gives no fetch order and no depth, so it cannot say which tag pages were one link from the seed and which were two. The depth of 2 in the request is a ceiling on the crawl, not a number printed beside each page. It also does not say why no `change` page came back, only that none is in the list.

Look at the schemes. The seed and every tag page are `https`, and every author page is `http` with a trailing slash. The Einstein scrape shows why for one of them: the site answers the `https` author link with a redirect. A crawler that stores the address it was sent to, not the one it asked for, ends up with two spellings of one site, and has to decide which one names the page.

## Do this, avoid this

### Do this

- Set a limit and a depth on every crawl before the first run, and raise them once the list looks right.
- Read the list of addresses a crawl returns before you read the pages, to see which parts of the site it reached.
- Check whether the http and https versions of an address serve the same page before you count them as one.
- Check the site's terms before you crawl it, and keep to what they allow.

### Avoid this

- Starting an unlimited crawl to see what happens.
- Assuming a page is missing from the site because it is missing from the list. The crawler may never have found a link to it.
- Keeping every page a crawl returns when you needed a few. The login page and the author pages above came back with the rest.
- Storing personal data you came across on a crawled page, or republishing text that is under copyright, without a reason you could explain to its owner.

## Where this leaves you

The next time a crawl returns fewer pages than you expected, go back to the queue. Look for the link that was never extracted, and for a limit that may have ended the run first. Run the request above with a limit of 5 and read the five addresses it returns. Then run it with a limit of 20 and compare. The second run is a new crawl, so it need not include all five from the first.

## Sources

1. [Google Search Central, In-depth guide to how Google Search works](https://developers.google.com/search/docs/fundamentals/how-search-works) Read November 20, 2026
2. [Google Search Central, Link best practices for Google](https://developers.google.com/search/docs/crawling-indexing/links-crawlable) Read November 20, 2026
