Agents
Framework adapters
Vercel AI SDK

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

ToolEndpointReturns
superscraper_scrape/v1/scrapeclean markdown + structured JSON + provenance
superscraper_search/v1/searchweb results scraped into clean content
superscraper_extract/v1/extractstructured JSON (free JSON-LD cascade, or schema-LLM)
superscraper_map/v1/mapevery URL on a site

superscraperTools() returns the full set; you can also spread individual tools (e.g. { ...scrapeTool() }).