Vercel AI SDK
Tools for the Vercel AI SDK (opens in a new tab), give any model live, provenance-aware web access (scrape · search · extract · map).
⚠️
Not published. @superscraper/vercel-ai does not exist on npm, so there is no install command
for it today. The source lives in this repository at packages/vercel-ai-superscraper; the code
below describes that source. Until it ships, define the tool yourself with ai's tool() helper
around POST /v1/scrape, the API call is the entire dependency.
Running it from source
Clone the repository and reference packages/vercel-ai-superscraper as a workspace or file
dependency. ai and zod are peer dependencies (your app already has them).
Scrape in 5 lines
import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { superscraperTools } from '@superscraper/vercel-ai';
// Reads SUPERSCRAPER_API_KEY from the environment.
const { text } = await generateText({
model: openai('gpt-4o'),
tools: superscraperTools(),
maxSteps: 5,
prompt: 'Scrape example.com and return the page as markdown.',
});
console.log(text);Tools
| Tool | Endpoint | Returns |
|---|---|---|
superscraper_scrape | /v1/scrape | clean markdown + structured JSON + provenance |
superscraper_search | /v1/search | web results scraped into clean content |
superscraper_extract | /v1/extract | structured JSON (free JSON-LD cascade, or schema-LLM) |
superscraper_map | /v1/map | every URL on a site |
superscraperTools() returns the full set; you can also spread individual tools (e.g. { ...scrapeTool() }).