Vercel AI SDK
Integrate You.com’s real-time web search and webpage content extraction capabilities into any application you’ve built with Vercel’s AI SDK.
The @youdotcom-oss/ai-sdk-plugin package provides three ready-made tools for the Vercel AI SDK:
youSearch()for real-time web and news searchyouContents()for page content extractionyouResearch()for comprehensive web research with citations
Drop all three into any generateText, streamText, or generateObject call to give your AI application real-time web access.
Getting Started
Install the package
Set your API key
Get your API key at you.com/platform.
Usage
Web search with youSearch
Use youSearch() to give a model access to structured real-time web and news results.
Content extraction with youContents
Use youContents() when the model needs to retrieve entire web page content as HTML or markdown.
Research with youResearch
Use youResearch() when the model needs comprehensive, synthesized answers with inline citations. The Research API supports effort levels (lite, standard, deep, exhaustive) to balance speed against thoroughness—the model selects the appropriate level automatically.
Combining all three tools
You can provide all three tools at once and let the model decide which to use:
Passing the API key explicitly
If you prefer not to use environment variables, pass the key directly:
Resources
Source code for the AI SDK plugin
Official Vercel AI SDK documentation
Full Search API parameters and response schema
Full Contents API parameters and response schema
Full Research API parameters and response schema