A chatbot built on a language model knows what was in its training data and nothing after. Ask it about a price change last week, a library release from this month or this morning's headlines, and it will either refuse or, worse, answer confidently with something out of date.
The fix is a search API the model can call as a tool. The model decides when it needs fresh information, your code runs the search, and the results go back into the conversation before the model answers. This page shows how to do that, what the tools should look like, and what it costs.
What a chatbot needs from a search API
Not every search API suits a chatbot. Look for:
- Clean JSON with title, URL and snippet: no HTML to scrape, nothing the model has to untangle.
- News that is minutes old, by topic and by country. Most "what's happening" questions are news questions.
- Full page text on demand, so the bot can read the source before it explains details. Snippets alone lead to shallow or wrong answers.
- Predictable cost: a flat plan, so a chatty user cannot run up an open-ended bill.
- An MCP server, if your bot runs inside Claude, Cursor, VS Code or n8n, so you skip the glue code.
NestDaddy covers all five with one key: web search on its own index, real-time news, page reading and an MCP server.
The three tools to give your bot
Three small tools cover almost every question a chatbot gets:
TOOLS = [ {"type": "function", "function": { "name": "web_search", "description": "Search the web. Use for facts, docs, products and anything not in the conversation.", "parameters": {"type": "object", "properties": {"query": {"type": "string"}}, "required": ["query"]}}}, {"type": "function", "function": { "name": "news_search", "description": "Search recent news by key words. Use for anything that happened in the last days or weeks.", "parameters": {"type": "object", "properties": { "query": {"type": "string"}, "days": {"type": "integer", "description": "How far back, 1 to 120"}}, "required": ["query"]}}}, {"type": "function", "function": { "name": "read_page", "description": "Read the full text of a web page. Use on the best result before explaining details.", "parameters": {"type": "object", "properties": {"url": {"type": "string"}}, "required": ["url"]}}}, ] Each tool maps to one NestDaddy endpoint:
import requests BASE = "https://nestdaddy.com/api/v1" HEADERS = {"X-API-Key": NESTDADDY_KEY} def run_tool(name, args): if name == "web_search": r = requests.get(f"{BASE}/search", params={"q": args["query"], "limit": 5}, headers=HEADERS) return [{k: x[k] for k in ("title", "url", "snippet")} for x in r.json()["results"]] if name == "news_search": r = requests.get(f"{BASE}/news/search", params={"q": args["query"], "days": args.get("days", 7), "limit": 5}, headers=HEADERS) return r.json()["results"] if name == "read_page": r = requests.get(f"{BASE}/extract", params={"url": args["url"]}, headers=HEADERS) return {"title": r.json().get("title"), "text": (r.json().get("text") or "")[:6000]} The loop
The pattern is the same for any model with tool calling (OpenAI, Claude, Gemini, or a local model through Ollama's OpenAI-compatible endpoint):
import json from openai import OpenAI client = OpenAI() # or OpenAI(base_url="http://localhost:11434/v1", api_key="ollama") for a local model SYSTEM = ("You answer with current facts. Search before you answer anything time-sensitive, " "read the best page before you explain details, and cite the URLs you used.") def chat(question, model="gpt-4o-mini"): messages = [{"role": "system", "content": SYSTEM}, {"role": "user", "content": question}] for _ in range(6): # a hard stop on tool rounds reply = client.chat.completions.create(model=model, messages=messages, tools=TOOLS).choices[0].message if not reply.tool_calls: return reply.content messages.append(reply) for call in reply.tool_calls: result = run_tool(call.function.name, json.loads(call.function.arguments)) messages.append({"role": "tool", "tool_call_id": call.id, "content": json.dumps(result)[:12000]}) return "I could not finish that in time." print(chat("What changed in the latest Python release?")) Two details make the difference between a bot that guesses and one that knows:
- The system prompt tells it to read before explaining. Without that line, models answer from snippets.
- A cap on tool rounds stops loops and keeps the cost per question predictable.
No code: the MCP route
If your chatbot is Claude, Cursor, VS Code, Windsurf or an n8n AI Agent, you can skip the tool code entirely. Add one remote MCP server:
{ "mcpServers": { "nestdaddy": { "url": "https://mcp.nestdaddy.com/mcp?key=YOUR_KEY" } } } The bot then has web search, news by topic and country, news search, page reading and research papers as tools. Setup for each app: NestDaddy MCP and integrations.
What it costs per conversation
A web or news search uses 1 credit and reading a page uses 2. A typical question uses one search and one page read, so about 3 credits.
| Questions a day | Credits a month | Plan |
|---|---|---|
| 10 | about 900 | Free (1,000 credits, no card) |
| 50 | about 4,500 | Starter, $19 a month |
| 250 | about 22,500 | Pro, $49 a month |
| 1,000 | about 90,000 | Scale, $149 a month |
At the limit, calls stop with a clear message instead of an overage bill. Plans and yearly pricing: pricing.
Questions
Will search make my bot slower?
A search adds a fraction of a second to a few seconds, depending on the call. Only time-sensitive questions trigger it, and the answer is right instead of stale.
Can it answer about a specific country?
Yes. Use the country news endpoint or the country filter on news search, for example the UK, India, Brazil or Japan.
Do I need separate keys for search and news?
No. One key covers every endpoint and the MCP server.
Can I try it before paying?
Yes: the Free plan has 1,000 credits a month with no card. Get a key.
NestDaddy prices as of November 2026; current plans are always at nestdaddy.com/pricing.
Originally published on the NestDaddy blog. NestDaddy gives your AI today's internet: live web search and real-time breaking news from its own index. nestdaddy.com/mcp