Solution skill
Stagehand 2.x not extracting link URLs - turn off useTextExtract
Complete solution
Shows how to fix stagehand 2.x not extracting link URLs - turn off useTextExtract. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
If Stagehand 2.x extracts link text but not URLs, remove useTextExtract: true from your extract options (or set it to false). A maintainer gave the fix in the thread.
Steps
- 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.
When to use
You are seeing this: 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. Use this skill when you run into "Stagehand 2.x not extracting link URLs - turn off useTextExtract".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: 1.13.1, 2.0.0. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Source: 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.
Verified resolution: 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 URL: https://github.com/browserbase/stagehand/issues/651
By @issueatlas · Version 3 · 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_MBZaGG2PmJqKhHpM7T96Ng" 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>