cd /news/ai-agents/add-web-search-and-real-time-news-to… · home › topics › ai-agents › article
[ARTICLE · art-181990] src=nestdaddy.com ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Add web search and real-time news to the Vercel AI SDK (npm package, 2026)

NestDaddy released @nestdaddy/ai-sdk, an MIT-licensed npm package that adds three tools — webSearch, newsSearch and readPage — to any generateText or streamText call in the Vercel AI SDK, giving models web search, real-time news filtered by age and country, and full-page text extraction. The company tested the package on 4 December 2026 with ai 7.1 and a local qwen2.5:7b model via Ollama, where the model called newsSearch with {"query":"AI","numResults":3} and returned three of that day's AI headlines with links. The package requires a NestDaddy API key in NESTDADDY_API_KEY, validates tool arguments with zod before any request, and is sold alongside the Search & News API from USD 5 a month for 200,000 searches with a 7-day free trial.

key takeaway

@nestdaddy/ai-sdk adds webSearch, newsSearch and readPage as plain AI SDK tools, and in a 4 December 2026 test with ai 7.1 and local qwen2.5:7b the model answered with three current AI headlines and links by calling newsSearch instead of guessing.

read3 min views2 publishedDec 4, 2026
Add web search and real-time news to the Vercel AI SDK (npm package, 2026)
Image: Nestdaddy (auto-discovered)

A model on its own only knows its training data. How to give a Vercel AI SDK agent web search, news by country and age, and full-page reading with one npm package, with a tested TypeScript example.

A model called through the Vercel AI SDK answers from its training data. Ask it what happened in AI this morning and it either guesses or says it does not know. The fix is a tool: a function the model can call to search the web, read the result, and then answer from what it found.

@nestdaddy/ai-sdk is that tool, ready to use. It adds three tools to any generateText or streamText call.

Quick answers #

What does it add? webSearch (results with title, url, snippet and domain), newsSearch (real-time news filtered by age and country, newest and best match first) and readPage (the clean full text of a page, so the model reads the source before it states details).

Which models does it work with? Any model the AI SDK supports, because the tools are plain AI SDK tools. We tested it with a local qwen2.5:7b through Ollama.

Do I need a key? Yes, a NestDaddy API key in NESTDADDY_API_KEY. There is a 7-day free trial.

Install #

npm install @nestdaddy/ai-sdk ai
export NESTDADDY_API_KEY="your-key"

Use it #

import { generateText, isStepCount } from "ai";
import { nestdaddyTools } from "@nestdaddy/ai-sdk";

const { text } = await generateText({
  model: "openai/gpt-5-mini",
  prompt: "What happened in AI today? Give 3 headlines with links.",
  tools: nestdaddyTools({ country: "US", newsDays: 2 }),
  stopWhen: isStepCount(4),
});

console.log(text);

nestdaddyTools() returns all three tools. To pass only some, use webSearch(), newsSearch() and readPage() one by one. Options are numResults, newsDays, country, maxChars, apiKey, baseUrl, timeoutMs and fetch.

What happens when it runs #

We ran this on 4 December 2026 with the package installed from npm, ai 7.1 and a local qwen2.5:7b. The model called newsSearch with {"query":"AI","numResults":3} and answered with three of that day's AI headlines, each with its link. It did not need to guess the date or the news: the tool result had both.

Things that make it safe to ship #

  • Arguments are checked first. The tools validate input with zod before any request, so a one-character query, a bad country code or a URL without a scheme never reaches the API.
  • Errors reach the model. A bad key, a used-up quota or a network problem throws aNestDaddyError with the status and message, which the AI SDK hands back to the model as a tool error instead of crashing your route.
  • Compact results. Tools return small objects, never raw API payloads, so they do not eat your context window.

Read the source before answering #

Search results are headlines and snippets. For details, tell the model to read the best result with readPage before it states facts, and to cite the URL. Adding "check the web, don't guess" to the system prompt does the rest.

Pricing #

The Search & News API covers web search, news search and financial and tech news with one key, from USD 5 a month for 200,000 searches, with a 7-day free trial: plans. The package is open source (MIT). The full guide is at Vercel AI SDK integration.

Prefer MCP? The NestDaddy MCP server works with the AI SDK's MCP client too. Using Python? See the Pydantic AI guide.

── more in #ai-agents 4 stories · sorted by recency
── more on @nestdaddy 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/add-web-search-and-r…] indexed:0 read:3min 2026-12-04 · —