Free Web Search API — Search the Web via REST

Search the web programmatically via a simple REST API. Get titles, URLs, and snippets from web results. Batch multi-query search, text extraction for AI agents. No search provider API keys needed. No signup required.

Search API Web Search AI Agents No Signup March 2026 10 min read

Why Use a Web Search API?

AI agents, chatbots, and automation scripts need to search the web. But getting programmatic search results is harder than it should be. Google Custom Search charges $5 per 1,000 queries. SerpAPI starts at $50/month. Bing Search API requires Azure credentials and a credit card.

The Agent Search API gives you web search results through a simple REST endpoint — no search provider API keys, no OAuth flows, no Azure subscriptions. Just send a query, get back titles, URLs, and snippets.

It powers search for AI agents that need real-time web information: RAG pipelines, research assistants, fact-checking systems, and competitive intelligence tools.

Simple REST API

GET or POST a query, get structured JSON results with titles, URLs, snippets, and hostnames.

Batch Search

Search up to 5 queries in a single request with /api/search/multi. Parallel execution, one response.

Text Extraction

The /api/search/extract endpoint returns combined text — perfect for feeding into LLMs.

No Provider Keys

No Google API key. No Azure subscription. No SerpAPI account. The API handles search provider access internally.

Up to 20 Results

Get up to 20 results per query with titles, URLs, snippets, and source hostnames.

Automatic Fallback

Dual search engine with automatic failover. If the primary engine is down, results come from the backup.

Quick Start

Search the web in a single request:

curl
Python
Node.js
Search the web
# Simple GET request
curl "https://agent-gateway-kappa.vercel.app/v1/agent-search/api/search?q=best+javascript+frameworks+2026"

# With max results
curl "https://agent-gateway-kappa.vercel.app/v1/agent-search/api/search?q=rust+vs+go+performance&max=15"

# POST request
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-search/api/search \
  -H "Content-Type: application/json" \
  -d '{"query": "machine learning API tutorial", "maxResults": 10}'
Search the web
import requests

# Simple search
response = requests.get(
    "https://agent-gateway-kappa.vercel.app/v1/agent-search/api/search",
    params={"q": "best javascript frameworks 2026", "max": 10}
)

data = response.json()
print(f"Engine: {data['engine']} | Results: {data['count']}")

for result in data["results"]:
    print(f"  {result['title']}")
    print(f"  {result['url']}")
    print(f"  {result['snippet'][:100]}...")
    print()
Search the web
const params = new URLSearchParams({
  q: "best javascript frameworks 2026",
  max: "10"
});

const response = await fetch(
  `https://agent-gateway-kappa.vercel.app/v1/agent-search/api/search?${params}`
);

const data = await response.json();
console.log(`Engine: ${data.engine} | Results: ${data.count}`);

for (const result of data.results) {
  console.log(`  ${result.title}`);
  console.log(`  ${result.url}`);
  console.log(`  ${result.snippet?.slice(0, 100)}...`);
  console.log();
}

Example response:

Response
{
  "query": "best javascript frameworks 2026",
  "engine": "duckduckgo-html",
  "results": [
    {
      "title": "Top 10 JavaScript Frameworks in 2026 - Dev.to",
      "url": "https://dev.to/top-javascript-frameworks-2026",
      "snippet": "A comprehensive comparison of React, Vue, Svelte, Solid, and more...",
      "hostname": "dev.to"
    },
    {
      "title": "JavaScript Framework Benchmarks 2026",
      "url": "https://krausest.github.io/js-framework-benchmark/",
      "snippet": "Performance comparison across 50+ frameworks with real DOM...",
      "hostname": "krausest.github.io"
    }
  ],
  "count": 10,
  "noResults": false
}

API Reference

MethodEndpointAuthDescription
GET/api/search?q=...&max=10OptionalWeb search via query parameter
POST/api/searchOptionalWeb search via JSON body
POST/api/search/multiOptionalBatch search — up to 5 queries at once
POST/api/search/extractOptionalSearch + combined text for LLM input

Batch Multi-Query Search

Search up to 5 queries in a single request. All queries execute in parallel, so the total time is roughly the same as a single query.

curl
Python
Node.js
Search 3 queries at once
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-search/api/search/multi \
  -H "Content-Type: application/json" \
  -d '{
    "queries": [
      "React vs Vue performance 2026",
      "TypeScript best practices",
      "Node.js alternative Bun"
    ]
  }'
Batch search
import requests

response = requests.post(
    "https://agent-gateway-kappa.vercel.app/v1/agent-search/api/search/multi",
    json={
        "queries": [
            "React vs Vue performance 2026",
            "TypeScript best practices",
            "Node.js alternative Bun"
        ]
    }
)

data = response.json()
for result_set in data["queries"]:
    print(f"\n--- {result_set['query']} ({result_set['count']} results) ---")
    for r in result_set["results"][:3]:
        print(f"  {r['title']}: {r['url']}")
Batch search
const response = await fetch(
  "https://agent-gateway-kappa.vercel.app/v1/agent-search/api/search/multi",
  {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      queries: [
        "React vs Vue performance 2026",
        "TypeScript best practices",
        "Node.js alternative Bun"
      ]
    })
  }
);

const data = await response.json();
for (const resultSet of data.queries) {
  console.log(`\n--- ${resultSet.query} (${resultSet.count} results) ---`);
  for (const r of resultSet.results.slice(0, 3)) {
    console.log(`  ${r.title}: ${r.url}`);
  }
}

Text Extraction for AI Agents

The /api/search/extract endpoint returns search results as a combined text block — ready to feed directly into an LLM as context. This is perfect for RAG (Retrieval-Augmented Generation) pipelines.

Search + extract text for LLM context
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-search/api/search/extract \
  -H "Content-Type: application/json" \
  -d '{"query": "latest AI regulations Europe 2026", "maxResults": 5}'

The response includes both structured results and a text field with all results formatted as a readable block:

Extract response
{
  "query": "latest AI regulations Europe 2026",
  "engine": "duckduckgo-html",
  "results": [...],
  "count": 5,
  "text": "[1] EU AI Act Implementation Timeline\nhttps://...\nThe European Union's AI Act enters full enforcement...\n\n[2] AI Governance in 2026\nhttps://...\nNew guidelines for high-risk AI systems...\n\n..."
}

RAG Pipeline Example

Combine the Search API with the LLM Router API to build a simple RAG system:

Python — Simple RAG pipeline
import requests

SEARCH_API = "https://agent-gateway-kappa.vercel.app/v1/agent-search/api/search/extract"
LLM_API = "https://agent-gateway-kappa.vercel.app/v1/agent-llm/api/chat"

def search_and_answer(question, provider_key):
    """Search the web, then answer using an LLM with search context."""

    # Step 1: Search the web
    search = requests.post(SEARCH_API, json={
        "query": question,
        "maxResults": 5
    }).json()

    context = search.get("text", "No results found.")

    # Step 2: Ask LLM with search context
    answer = requests.post(LLM_API, json={
        "model": "gpt-4o-mini",
        "messages": [
            {"role": "system", "content": f"Answer based on these search results:\n\n{context}"},
            {"role": "user", "content": question}
        ],
        "provider_key": provider_key,
        "max_tokens": 500
    }).json()

    return {
        "question": question,
        "answer": answer["choices"][0]["message"]["content"],
        "sources": [r["url"] for r in search.get("results", [])],
        "tokens": answer.get("usage", {}).get("total_tokens", 0)
    }

# Usage
result = search_and_answer(
    "What are the best AI coding assistants in 2026?",
    provider_key="sk-your-openai-key"
)

print(f"Q: {result['question']}")
print(f"A: {result['answer']}")
print(f"\nSources:")
for url in result["sources"]:
    print(f"  - {url}")
Pro tip: Combine batch search (/api/search/multi) with the LLM Router to research multiple topics in parallel, then synthesize the results with a single LLM call.

Use Cases

RAG / Research Agents

Feed real-time web results into LLMs as context. Build research assistants that cite their sources. Search + extract + answer in one pipeline.

Competitive Intelligence

Monitor competitor mentions, pricing changes, and product launches. Batch search 5 competitor names at once and parse the results.

Content Discovery

Find relevant articles, tutorials, and documentation for any topic. Power content curation tools and newsletter generators.

Fact Checking

Verify claims by searching for supporting or contradicting evidence. Cross-reference multiple sources before presenting information.

Comparison: Search APIs

FeatureAgent Search APISerpAPIGoogle Custom SearchBing Search API
PricingFree (30 free, then credits)$50/mo (5,000 queries)$5/1,000 queries$7/1,000 queries
Signup RequiredNoYes + billingYes + Google CloudYes + Azure
Search Provider KeysNone neededAccount keyAPI key + CX IDAzure key
Batch Search5 queries/request1 per request1 per request1 per request
Text ExtractionBuilt-in (/extract)NoNoNo
Results per QueryUp to 20Up to 1001050
Search SourceDuckDuckGo (privacy-first)Google SERPGoogle (scoped)Bing
Structured DataTitle, URL, snippet, hostnameFull SERP (ads, knowledge graph)Title, URL, snippetTitle, URL, snippet
Fallback EngineYes (automatic)NoNoNo

Advanced: AI Agent Integration

The Search API is designed for AI agents. Here's how to use it as a tool in a LangChain-style agent:

Python — Search as an AI agent tool
import requests
import json

SEARCH_URL = "https://agent-gateway-kappa.vercel.app/v1/agent-search/api/search"

def web_search(query: str, max_results: int = 5) -> str:
    """Search the web and return formatted results.

    Use this tool when you need current information from the web,
    to verify facts, or to find URLs for further research.
    """
    resp = requests.get(SEARCH_URL, params={"q": query, "max": max_results})
    data = resp.json()

    if data.get("noResults"):
        return f"No results found for: {query}"

    results = []
    for r in data["results"]:
        results.append(f"- {r['title']} ({r['hostname']})\n  {r['url']}\n  {r['snippet']}")

    return f"Search results for '{query}':\n\n" + "\n\n".join(results)

# Use in any agent framework:
# tool = Tool(name="web_search", func=web_search, description="Search the web")
#
# Or call directly:
print(web_search("latest Python 3.14 features"))

Frequently Asked Questions

What search engine does this use? +
The API uses DuckDuckGo as its search source, with an automatic fallback to DuckDuckGo Lite if the primary engine is unavailable. DuckDuckGo aggregates results from multiple sources including Bing and its own crawler.
Is an API key required? +
No. The first 30 requests are free without any authentication. After that, you can create a free API key (which gives you 50 credits) for continued access. No search provider keys (Google, Bing, etc.) are ever needed.
How many results can I get per query? +
Up to 20 results per query. Set the max parameter (GET) or maxResults field (POST) to control how many results you want. Default is 10.
Can I use this for commercial projects? +
Yes. The API is free for both personal and commercial use. For high-volume commercial use, consider using an API key with credits to ensure consistent access.
How does batch search billing work? +
A batch search with N queries deducts N credits (1 per query). The multi endpoint supports up to 5 queries per request, all executed in parallel for better performance.
Is there rate limiting? +
Free tier: 30 requests per minute. With an API key: 120 requests per minute. The response includes X-RateLimit-Remaining and X-RateLimit-Reset headers.

Start Searching the Web via API

No signup, no provider keys, no credit card. Just send a query.

Get Your Free API Key

More Free APIs

The Search API is part of a suite of 39+ free APIs for developers and AI agents: