Skip to main content
The fetch skill teaches your coding agent to retrieve a URL through the Browserbase Fetch API. Use it for page content, JSON responses, status codes, or headers when you don’t need a browser to render JavaScript or interact with the page.

Install

Set BROWSERBASE_API_KEY in your environment, then install the skill for your coding agent:
The skill can call Fetch with curl or the Browserbase SDK. It doesn’t require the Browse CLI or a browser session.

Retrieve a page

Your agent receives the response body, HTTP status, headers, content type, and encoding. It can inspect these before deciding whether to retry or use a browser.

When to use a browser

If the response lacks content that the site renders with JavaScript, use the Browse CLI skill. Use a browser for clicking, filling forms, and navigating authenticated workflows too. For redirects, ask your agent to enable allowRedirects. Check the returned HTTP status before treating the content as a successful result.

Further reading

Fetch API

Explore request options and API examples.

Skill source

View setup, examples, and error handling.