NestDaddy
+
Agent frameworks · via REST API

Live web search and real-time news for Pydantic AI agents

Give a Pydantic AI agent NestDaddy's news search and page reading as plain Python tools, with any model, including a free local one through Ollama.

Tested against the live API on

Pydantic AI turns plain, typed Python functions into tools: the docstring becomes the description the model reads, and the type hints become the JSON schema. That makes adding NestDaddy two short functions.

Install

pip install "pydantic-ai-slim[openai]" requests
export NESTDADDY_API_KEY="your-key"

Get a key at nestdaddy.com/mcp (free plan: 1,000 calls a month, no card).

The tools

import os, requests

API = "https://nestdaddy.com/api/v1"
HEADERS = {"X-API-Key": os.environ["NESTDADDY_API_KEY"]}

def news_search(query: str, days: int = 3) -> list[dict]:
    """Search the latest news. Use it for anything that happened recently.

    Args:
        query: Short key words, like a search box.
        days: How many days back to search, 1 to 30.
    """
    r = requests.get(f"{API}/news/search", headers=HEADERS, timeout=30,
                     params={"q": query, "days": days, "limit": 5})
    r.raise_for_status()
    return [{"title": a["title"], "source": a.get("source_domain"),
             "date": a.get("published_timestamp"), "url": a["url"]}
            for a in r.json().get("results", [])]

def read_page(url: str) -> str:
    """Read the full text of a web page, for example a news article.

    Args:
        url: The full URL.
    """
    r = requests.get(f"{API}/extract", headers=HEADERS, timeout=30, params={"url": url})
    r.raise_for_status()
    return r.json().get("text", "")[:4000]

The agent

This runs a free local model through Ollama (ollama pull qwen2.5:7b). For a hosted model, pass a model name such as "openai:gpt-5" or "anthropic:claude-sonnet-5-5" instead.

from datetime import date
from pydantic_ai import Agent
from pydantic_ai.models.openai import OpenAIChatModel
from pydantic_ai.providers.ollama import OllamaProvider

model = OpenAIChatModel("qwen2.5:7b", provider=OllamaProvider(base_url="http://localhost:11434/v1"))
agent = Agent(model, tools=[news_search, read_page], system_prompt=(
    f"Today is {date.today()}. Use your tools for anything recent. Search results are only headlines: "
    "before you give details, read the best article with read_page. Only state facts you found, and cite the URLs."))

result = agent.run_sync("What happened in AI today? Give 3 headlines with links.")
print(result.output)

What we got

Run on 14 November 2026 with Pydantic AI 2.68 and qwen2.5:7b, the agent called news_search {"query": "AI", "days": 1} and answered with that day's headlines, each linked to its source (CryptoBriefing, BeInCrypto, PC Gamer).

The system prompt's rule about reading the article before giving details is what keeps small models from inventing them. Why that matters: How to build an AI agent from scratch.

More integrations