Overview
Linkup can be used with the Vercel AI SDK as a tool for web search. This integration allows you to build AI applications that can access real-time information from the internet using any model supported by the AI SDK.GitHub Repository
Getting Started with Linkup in Vercel AI SDK
1
Install the Linkup AI SDK
We have chosen OpenAI as the default model provider, but you can use any provider supported by the Vercel AI SDK (like
@ai-sdk/anthropic, @ai-sdk/mistral, etc.)2
Get your Linkup API Key
3
Set up your environment variables
Create a
.env file in your project root:4
Create and use the Linkup web search tool
Configuration Options
ThewebSearch tool accepts the following configuration options:
| Parameter | Type | Default | Description |
|---|---|---|---|
apiKey | string | process.env.LINKUP_API_KEY | Your Linkup API key. If not provided, it will be read from the environment variable. |
depth | ’standard’ | ‘deep' | 'standard’ | Search depth. deep performs more thorough research, standard is faster. |
includeImages | boolean | false | Whether to include images in the search results. |
includeDomains | string[] | [] | Array of domains to include in the search results. |
excludeDomains | string[] | [] | Array of domains to exclude from the search results. |
fromDate | Date | null | Start date for filtering search results. |
toDate | Date | null | End date for filtering search results. |
Resources
Facing issues? Reach out to our engineering team at support@linkup.so or via our Discord or book a 15 minutes call with a member of our technical team.