Skip to main content

AI Gateway adds Browserbase Search and Fetch tools

By Steven Van ·

Search and page retrieval work with any tool-calling model through one API key, from $7 per 1,000 searches and $1 per 1,000 raw fetches.

Browserbase Search and Fetch can now be used as tools through Vercel's AI Gateway, with one API key and any model that supports tool calling. The tools stay the same when the model is switched. They sit alongside Browserbase's existing AI SDK and Vercel Marketplace integrations, and the documentation covers setup for both.

The helpers need AI SDK 7.0.116 or later. After updating with pnpm add ai@latest and setting AI_GATEWAY_API_KEY, they are passed in tools as gateway.tools.browserbaseSearch() and gateway.tools.browserbaseFetch().

  • Search returns result titles, URLs and metadata without opening a browser session. numResults accepts 1 to 25 and defaults to 10. It costs $7 per 1,000 requests, however many results are requested.
  • Fetch retrieves the contents of a URL the model already has, as raw body, Markdown, or JSON extracted against a schema the developer supplies. A raw fetch costs $1 per 1,000. Proxies add $3 per 1,000 and Markdown or JSON extraction adds another $3, so a proxied extraction costs $7.

Because format and proxies affect the price, a model that picks both can raise a call from $1 to $7 per 1,000. Setting either option in browserbaseFetch() pins it and caps the cost. The schema and allowInsecureSsl options can only be set by the developer, not the model.

Both tools can be tried in the AI Gateway model playground. They are also available as server tools in the OpenAI-compatible Chat Completions API, as vercel:browserbase_search and vercel:browserbase_fetch.

Vercel
Vercel
The platform for frontend developers — deploy, preview, and scale web apps and AI agents with zero config.
View Vercel →

Read the original announcement →

Read AI Gateway adds Browserbase Search and Fetch tools on Creators Toolbox