Platform Service

Web Search Service

Provider-agnostic web search for AI agents. Give your agents the ability to search the web with structured queries, spelling correction, and full request logging.

Why It Matters

AI agents are limited to their training data. For current events, real-time pricing, competitor analysis, or market research, agents need web access.

The Web Search Service provides a clean, provider-agnostic API that any agent can use — with structured query support, result normalization, and full observability.

Key Capabilities

How It Works

Your agent sends a search request to the Web Search API. The service routes it to the configured provider, normalizes the results into a consistent format, and returns them to your agent — with spelling corrections and related searches included.

Web Search Architecture

Agent
Your AI Agent
Web Search API
Provider Abstraction
Provider (Bing)
Normalized Results

Structured Query Support

Go beyond simple string queries. The structured query API lets agents build precise searches with AND/OR logic, exact phrases, exclusions, site filtering, and file type restrictions.

Search with structured queries:
// Simple search
const results = await websearch.search({ query: 'FireFoundry AI agent platform' });

// Structured search with advanced filtering
const results = await websearch.search({
  structured: {
    andTerms: ['machine learning', 'production'],
    exactPhrase: 'model deployment',
    orTerms: ['kubernetes', 'docker'],
    excludeTerms: ['tutorial', 'beginner'],
    siteFilter: { include: ['arxiv.org', 'github.com'] },
    fileType: 'pdf'
  },
  limit: 10,
  market: 'en-US',
  freshness: 'week'
});

// Results are normalized across providers
for (const result of results.results) {
  console.log(`${result.title} — ${result.url}`);
  console.log(`  ${result.snippet}`);
}

Response Format

Every search response includes a normalized results array, metadata, and optional corrections. The format is consistent regardless of which provider is used behind the scenes.

Example response:
{
  success: true,
  results: [
    {
      id: 'result-0',
      title: 'Machine Learning in Production',
      url: 'https://arxiv.org/abs/example',
      snippet: 'Best practices for deploying ML models...',
      datePublished: '2026-01-10T00:00:00Z',
      siteName: 'arXiv'
    }
  ],
  meta: {
    requestId: '550e8400-e29b-41d4-a716-446655440000',
    processingTimeMs: 150,
    totalResults: 25000
  },
  spellingCorrection: {
    originalQuery: 'machin lerning',
    correctedQuery: 'machine learning',
    appliedCorrection: true
  },
  relatedSearches: ['deep learning production', 'MLOps best practices']
}

Provider Architecture

The Web Search Service currently uses Microsoft Bing Web Search API v7 as its search provider. The service is built with a provider-agnostic abstraction layer, making it straightforward to add new providers as they become available.

Future providers on the roadmap include Tavily, Brave, Serper, and Google. The abstraction ensures your agent code never changes when new providers are added — the service handles provider selection, query translation, and result normalization transparently.

Feature Bing Brave* Tavily*
Exact Phrases Yes Yes Yes
Site Filtering Yes Yes Yes
File Type Filtering Yes Yes -
OR Terms Yes Yes Yes
Exclusions Yes Yes Yes
Spelling Correction Yes - -
* Future provider support on the roadmap

Use Cases

Market Research

Let agents search for competitive intelligence, pricing data, and industry trends. Use site filtering to target specific sources and structured queries for precise results.

Fact Verification

Cross-reference agent outputs against current web sources to ensure accuracy and reduce hallucinations. Combine with freshness filtering to verify against the most recent information.

Content Enrichment

Augment agent responses with real-time web data and citations for more comprehensive answers. Use related searches to explore topics from multiple angles.

News Monitoring

Track breaking news and events relevant to your business domain. Set freshness to "day" or "week" to focus on the latest developments.

Learn More