Browser Use 推出 fetch-use:用 Python SDK 抓取任意网站
A Python Program To Scrape Any Website
Browser Use 发布 Python SDK fetch-use,可像真实浏览器一样抓取任意网站并规避拦截,支持 markdown 与 structured 输出格式、session_id 保持 cookie、POST 请求及错误处理。需要点击、滚动、表单、登录或 JavaScript 渲染内容时,仍应改用 Browser Use 浏览器自动化。
正文
当前显示原文,中文全文译文尚未就绪。
Guides
Use our Python SDK to scrape any website instantly and without being blocked.
What is fetch-use?; How does fetch-use work?; Install fetch-use; Your first request; Use markdown output for readable pages; Use structured output to inspect a page; Keep cookies with a session; Send a POST request; Handle errors; Complete example; When should you use a browser instead?
You found a website with data you need. Maybe it is a list of products, or maybe it is an article. You want a simple Python script that opens the page, extracts the data, and gives you something useful.
A normal Python request often gets blocked or redirected, and scraping can be complex. This is exactly what fetch-use is for.
What is fetch-use?
fetch-use is a Python SDK for getting content from websites the way a real browser would.
This matters because the webpage you see is often not the same page your scraper sees. A site might send different HTML, redirect you, or block the request entirely.
With fetch-use, you can provide a URL and get back the page in a format that is easier to work with. It handles all of the annoying parts of web scraping.
If you are still deciding between a simple scraper and a full browser agent, read our web scraping guide.
How does fetch-use work?
When you call fetch-use, your script sends a request to Browser Use. Browser Use fetches the URL in a way that looks much closer to a real browser than a normal Python script, handles details like redirects, cookies, sessions, and response formatting, and then returns the response to your Python program.
You can create an API key in Browser Use Cloud.
Your first request
Give fetch-use a URL, and it gives you back the page.
The response object includes the fields you expect:
If you are calling an API endpoint that returns JSON, parse the response body directly:
Use markdown output for readable pages
Raw HTML is usually noisy. A page might include navigation, scripts, styles, footers, tracking tags, layout markup, and other content that has nothing to do with the data you actually want.
For articles, docs, product descriptions, and other text-heavy pages, output_format="markdown" is often easier to work with:
Instead of parsing a large HTML document immediately, you can start with cleaner text.
Use structured output to inspect a page
When you are exploring a page for the first time, you may not know what is available yet. You might want the title, links, headings, forms, or tables before deciding how to scrape it.
Use output_format="structured":
This is useful when you want to understand the shape of a page before writing a more specific scraper.
Keep cookies with a session
Some sites only make sense across multiple requests. The first page sets cookies, the second page expects them, and the third page changes depending on what happened before.
Use a session_id to keep that state:
Requests with the same session_id share the same session, so cookies can carry over from one request to the next.
Send a POST request
You can also use fetch-use for endpoints that expect data:
This is especially useful when a website loads data from an API behind the page.
Handle errors
For real scripts, always check whether the request worked before parsing the result:
Or check the status code directly:
Complete example
Here is a small script that fetches a page and saves the readable version to a file:
And here is the same idea using structured output:
When should you use a browser instead?
fetch-use is best when you want page content without opening a full browser.
Use browser automation when the page requires interaction:
clicking buttons; filling out forms; scrolling to load more data; completing a login flow; waiting for JavaScript-rendered content; handling a browser challenge or CAPTCHA
For many scraping tasks, though, starting with fetch-use is faster and simpler than opening a browser first.
If you do need a real browser, use Browser Use:
Use fetch-use when you just need the page content. Use Browser Use when the site needs clicks, scrolling, forms, login, or JavaScript-rendered content.
Published June 10, 2026