## TL;DR

If Stagehand 2.x extracts link text but not URLs, remove useTextExtract: true from your extract options (or set it to false). The text-extract path drops hrefs before the model ever sees them, which is why even an explicit zod schema field for the URL comes back as the display name.

## Fix

1. If Stagehand 2.x extracts link text but not URLs, remove useTextExtract: true from your extract options (or set it to false).
   Expected: You get the expected result; the problem is gone.

## When to use

- You are dealing with this situation.
- The symptom matches: Stagehand 2.x not extracting link URLs - turn off useTextExtract.

## When NOT to use

- Unrelated issues with a different cause.
- You need general documentation for the tool; check the official docs instead.

## Compatibility

Reported per the linked source (mentions 1.13.1, 2.0.0).

## Variant phrasings

### Stagehand 2.x not extracting link URLs - turn off useTextExtract

## Why it happens

Issue browserbase/stagehand#651 (closed, 18 comments): after upgrading from 1.13.1 to 2.0.0, Stagehand stopped extracting link hrefs - the LLM only received link text, so instructions to grab URLs returned display names instead. A maintainer gave the fix in the thread.

## Edge cases

- If your error message differs even slightly, this is probably a different issue; search the exact text.
- Behavior can change between releases; the linked source reflects the versions above.
- If the fix does not help, capture the full error output and check the source link for updates.