> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tastelabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How the engine works

> The Extractor, the Search, and the Verifier behind the API

One API, three subsystems. Every endpoint group is powered by one of them, and knowing which one you are talking to explains how the endpoint behaves: whether it runs synchronously or as a job, where its data comes from, and what its output means.

| Subsystem     | What it does                                                                                                               | Endpoints                | Mode             |
| ------------- | -------------------------------------------------------------------------------------------------------------------------- | ------------------------ | ---------------- |
| **Extractor** | Crawls a URL and turns the rendered page into a structured [design system](/concepts/design-system) plus source artifacts. | `/design/submissions`    | Asynchronous job |
| **Search**    | Finds brands in the curated corpus by aesthetic description or by visual similarity.                                       | `/search`                | Synchronous      |
| **Verifier**  | Compares two pages and scores how well one follows the other's brand.                                                      | `/judge/brand-adherence` | Asynchronous job |

## The Extractor

The Extractor is the foundation: it takes a URL, crawls the rendered page, and turns what it captured into a structured description of the design.

It produces two kinds of output, and the distinction matters downstream:

* **The design system**: the structured document describing colors, typography, layout, surfaces, components, and the brand profile. This is what the brand *declares*.
* **The artifacts**: the captured HTML, CSS, screenshots, and element geometry. This is what the page *measures as*.

Extraction is a job: you [submit a URL, poll, and read the result](/concepts/submissions). Sections of the design system stream in as the extraction progresses, which is why a running submission can return a partial result.

## The Search

The Search does not read your submissions. It searches a prebuilt corpus of curated brands, prepared ahead of time with the palette, typography, and taxonomy metadata you see on the [result cards](/concepts/brand-search#result-cards).

* **`fast`** returns in seconds.
* **`deep`** trades latency for result quality.

One endpoint bridges the corpus and your own work: [`GET /search/similar`](/api-reference/endpoint/find-similar-brands) takes one of your completed extractions and returns its nearest neighbours in the corpus.

Search is synchronous: the call returns the results, and only the request and its outcome land in your [search history](/concepts/brand-search#search-history).

## The Verifier

The Verifier compares a **reference** page with a **source** page and produces the [verdict](/concepts/brand-adherence#the-verdict). It treats the two sides differently: the reference is the rulebook, so its brand counts as the standard; the source is the subject, judged against it.

The verdict has three parts: one `score` from 0 to 1, prose `recommendations`, and structured `fixes` with exact target values. Both lists arrive worst-first, so they double as a work queue.

## How they fit together

* **The Verifier consumes the Extractor.** Every adherence job is built on two extractions, one per side, and the verdict compares what they captured.
* **The Search stands apart.** It reads the corpus, not your extractions, with one exception: `GET /search/similar` reads the one submission you point it at.
* **Search results lead back to the Extractor.** A result card is a pointer into the corpus, not an extraction. To work with one, submit its `url` and extract it.

## Next steps

<CardGroup cols={2}>
  <Card title="Extract a brand" icon="arrows-rotate" href="/concepts/submissions">
    How the Extractor runs as a job: statuses, polling, caching.
  </Card>

  <Card title="Brand search" icon="magnifying-glass" href="/concepts/brand-search">
    The Search's two modes, filters, and result cards.
  </Card>

  <Card title="Brand adherence" icon="scale-balanced" href="/concepts/brand-adherence">
    The Verifier's flow and the verdict it produces.
  </Card>

  <Card title="The design system" icon="swatchbook" href="/concepts/design-system">
    The structure the Extractor produces.
  </Card>
</CardGroup>
