// blog · launch

Extract API v2: schema-guided agents with self-healing selectors.

How we rebuilt extraction around a planning model, so your data keeps flowing after a site redesigns, with no code changes on your side.

Hana SatoOct 1, 2026 · 8 min read
Abstract render of chaotic data becoming ordered blocks

Every extraction pipeline we've ever seen dies the same way. It works on Tuesday. On Wednesday the site ships a redesign, a class name changes from price to price-v2, and the data silently goes empty. Someone notices on Friday.

Extract API v1 helped by moving parsing into a model instead of selectors. v2 goes further: extraction now plans its own path through a page, verifies what it found and remembers how it found it.

What changed

  • Planning. Given a schema, the model decides whether to scroll, paginate or click "load more" before extracting.
  • Self-healing selectors. We cache a fast selector for each field and re-derive it automatically when it stops matching.
  • Confidence and provenance. Every field returns a confidence score and the DOM snippet it came from.
v2.ts
const result = await tessera.extract(page, {
  schema: z.array(Product),
  plan: "auto",          // scroll, paginate, expand
  minConfidence: 0.9,    // flag anything below
});

result.data;        // Product[]
result.confidence;  // per-field scores
result.selectors;   // cached for next run

How self-healing works

On the first run, the model reads the rendered page and returns data plus a minimal CSS or XPath selector for each field. On later runs we try the cached selectors first, which is fast and cheap. If a selector returns nothing, or the value fails validation, we fall back to the model, re-derive the selector and update the cache.

“We went four months without touching a selector. The pipeline just kept healing itself.”

In our benchmark of 1,200 retail and travel sites over 90 days, v2 kept 99.2% of fields flowing through redesigns that broke every hand-written scraper in the control group.

Cached selectors are validated; changed pages trigger model recovery and a cache update before structured data is returned.
Cached selectors serve most runs. The model only steps in when something changes.

Pricing and availability

Extract API v2 is live today for every plan. Cached-selector runs cost 80% less than full model extractions, so most pipelines get cheaper automatically. Existing v1 calls keep working, and you can opt in with version: 2 or by upgrading the SDK.

Try it now: follow the extraction guide or start with npx tessera init.