Skip to main content
The @geekflare/ai-sdk package gives the Vercel AI SDK Geekflare as a set of tools: web and Google SERP search, page scraping to Markdown or structured JSON, screenshots, and website diagnostics. It works with AI SDK 5, 6, and 7, requires zod 3.25+ or 4 and Node 18+, supports both ESM and CJS, and has no dependencies beyond the ai and zod peers.

Install

Set the API key

Get an API key at dash.geekflare.com and set it as an environment variable:
Replace YOUR_API_KEY with your Geekflare API key. You can also pass the key to any tool with the apiKey option.

Quick start

Add geekflareSearch() to generateText so the model can search the web:

All tools

geekflareTools() returns all four tools, keyed by name:

Options

Every tool accepts these options: Some tools also take defaults that apply when the model doesn’t set them:

Errors

API errors (such as an invalid key, no credits, or an unreachable site) throw GeekflareAPIError with the message from the API. The AI SDK returns it to the model as a tool error, so the model can read the message and respond.

Notes

  • Each call spends credits from your Geekflare account. See Credit Consumption and pricing.
  • Geekflare works with public pages only.

npm

@geekflare/ai-sdk on npm.

GitHub

Source code (MIT license).

LangChain

Use Geekflare tools in LangChain agents.

LlamaIndex

Use Geekflare tools in LlamaIndex agents.

MCP Server

Connect Geekflare to AI clients through MCP.