How to Add Web Search to Your LLM Application

Step-by-step guide to integrating real-time web search into your LLM application.

1 min readLuca Moretti

LLMs are limited by their training data. Web search adds real-time knowledge.

Quick Start with Keiro

import requests

response = requests.post(
    "https://kierolabs.space/api/research-pro",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
    },
    json={
        "query": "latest AI news",
        "cache_search": True
    },
    timeout=60  # research can take longer
)

data = response.json()

# Access extracted content
results = data.get("data", {}).get("extracted_content", [])

for item in results[:5]:
    print(item.get("title"))
    print(item.get("url"))
    print()

API Comparison

API

Price/1K

Speed

Keiro

$0.30

Fast

Exa

$6.13

Medium

Tavily

$8.00

Medium

Keiro is 20x cheaper than Exa.

Get started with Keiro

Luca Moretti
Luca Moretti
Senior Engineer · 34 articles

Senior engineer on the Keiro core team. Writes about search infrastructure, latency optimization, and cost-efficient API design. Worked with Cloudflare Workers and Go at scale.

Was this article helpful?

Updated March 25, 2026

Stop overpaying for search.
Start at $1.

5,000 searches/mo. Enterprise-grade API. 93% off your first month. Cancel anytime.

Start at $1