Solution skill
Stagehand 2.x not extracting link URLs - turn off useTextExtract
Complete solution
Stagehand 2.x not extracting link URLs - turn off useTextExtract. If Stagehand 2.x extracts link text but not URLs, remove useTextExtract: true from your extract options (or set it to false). Use when hitting this exact issue. Not for unrelated errors or different features.
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
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.
Evidence
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. Resolved: 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. With text extraction off, the model gets the actual anchor targets again. Source: https://github.com/browserbase/stagehand/issues/651
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_zfeneC-Qig5ft9YoVt-mZQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Stagehand 2.x not extracting link URLs - turn off useTextExtract <span>— Vectle</span></a>