Sitemap
unicodeveloper

unicodeveloper

Developer & Technology Advocate. Writer of all things Technical & Magical. Software Craftsman. Artificial Intelligence. Life Sciences. Experience

9 AI Search API Features Every Agent Should Be Using in 2026 (With Examples)

10 min readApr 22, 2026

--

A practical guide to Search API features that turn live web search into grounded, citation-ready data for AI agents, apps and RAG pipelines.

Quick Answer: The best AI search API for agent developers in 2026 combines web search with specialised datasources (SEC filings, PubMed, clinical trials, patents, healthcare, life sciences) in a single API call.

What You’ll Learn

Valyu Search is an AI search API built for AI agents, retrieval-augmented generation (RAG) pipelines, AI apps, and humans. It goes beyond the public web with specialised/proprietary data sources all accessible through a single unified API.

The 9 features every AI agent developer should know:

  1. Specialized Data Sources: Web search plus specialized data sources
  2. Full-text content extraction. Clean, parsed document text from any URL
  3. Source filtering with bias weighting. Whitelist, exclude, and soft-rank domains
  4. Structured, citation-ready results. No scraping, no normalization
  5. Relevance-ranked scoring. Threshold out low-signal results
  6. Per-query budget controls. Hard cost caps for agent loops
  7. Date range filtering. Keep context current.
  8. Hybrid web + specialised/proprietary search. Co-ranked in a single call
  9. Drop-in Vercel AI SDK tools & Integration for any Platform. “@valyu/ai-sdk” with per-vertical tool exports

What is Valyu Search?

Valyu Search is a Search API designed for AI agents, apps, RAG systems and Humans. Unlike traditional web search APIs (Google, Bing), Valyu indexes both the public web and specialised datasources e.g, regulatory filings, peer-reviewed research, patents, clinical trials, financial market data, legal, life sciences, etc and returns parsed, structured, LLM-ready results.

Why Most Search APIs Fail AI Agents

Most developers treat search APIs like Google replacements. Point-and-shoot: query in, blue links out. That works for humans. It breaks for AI agents.

Agents need grounded data, structured output, specialized datasources, citation trails, and budget controls, none of which are first-class in a generic web search API.

After shipping a few production agents, here are the 9 features that separate “search that works” from “search that makes your agent actually useful.”

Feature 1: Specialized Datasources

Most search APIs give you one index: the public web. Valyu ships pre-indexed specialized datasources that matter for real knowledge work.

Press enter or click to view image in full size

Check out all the datasources in the search API!

Reach them through the TypeScript SDK via “includedSources”:

import { Valyu } from "valyu-js";
const valyu = new Valyu();

const papers = await valyu.search("retrieval-augmented generation", {
includedSources: ["valyu/valyu-arxiv", "valyu/valyu-pubmed"],
});

const filings = await valyu.search("Apple Services revenue 2025", {
includedSources: ["valyu/valyu-sec-filings"],
});

Through “@valyu/ai-sdk”, each vertical is a dedicated tool. See Feature 9!

Why it matters: A generic web search for “Apple revenue” returns blog posts and clickbait. A SEC-filtered search returns the 10-Q. For finance, healthcare, and academic agents, that difference is the entire product.

Feature 2: Full-Text Content Extraction

Search gives you URLs. Agents need the actual document content. The Valyu contents() endpoint fetches clean, parsed full text from any URL, removing the boilerplate, navigation, and noise that breaks LLM reasoning.

const { results } = await valyu.contents([
"https://www.sec.gov/Archives/edgar/data/320193/.../aapl-10k.htm"
], {
extractEffort: "high",
responseLength: "large", // 100k chars
summary: true, // optional AI summary
});

console.log(results[0].content); // Markdown-formatted full text

Batch up to 10 URLs synchronously, or up to 50 asynchronously via “asyncMode: true” (with an optional “webhookUrl” for push delivery). No JS rendering headaches, no paywall gymnastics, no site-specific scrapers.

Why it matters: AI agents that reason from snippets hallucinate. Agents that reason from full text cite correctly. Content extraction is the bridge between “I found a link” and “I can actually quote this.”

Feature 3: Source Filtering (Whitelist, Exclude, and Bias)

For compliance-sensitive work, “the web” is too broad. Valyu gives you three source filtering knobs:

const results = await valyu.search("GLP-1 receptor trials", {
includedSources: ["valyu/valyu-pubmed", "clinicaltrials.gov", "medical"],
excludeSources: ["reddit.com", "medium.com"],
sourceBiases: {
"nejm.org": 5, // strongly prefer
"mayoclinic.org": 3,
"healthline.com": -2, // soft-demote
},
});
  • includedSources accepts domains, dataset IDs, preset names (“finance”, “medical”, “legal”), or “collection:NAME”
  • excludeSources accepts the same except presets
  • sourceBiases takes integer weights from “-5” to “+5”. This is so important because it lets you influence how results are ranked without completely filtering anything out. Instead of removing sources entirely, you can prioritize or de-emphasize them so that results are still based on relevance, but weighted toward what you care about.

Why it matters: A biomedical agent citing a Reddit thread is a liability waiting to happen. Source control is how you stay defensible in regulated industries.

Feature 4: Structured, Citation-Ready Results

Every result ships as a typed object. Parsed, normalized, ready to pipe into an LLM or write to a database row. No post-processing pipeline required.

const { results, tx_id, total_deduction_dollars } =
await valyu.search("Berkshire Q4 holdings");

for (const r of results) {
console.log({
title: r.title,
url: r.url,
source: r.source,
date: r.publication_date,
score: r.relevance_score,
citation: r.citation, // academic results
authors: r.authors, // academic results
text: r.content,
});
}

Responses also include “source_type” (website, paper, clinical_trial, drug_label, and more) and “data_type” (structured or unstructured) so your agent can route results by kind.

Why it matters: No scraping, no metadata inference, no “oh, the schema changed again.” If you’ve ever written a result normalizer for four different search APIs, you already know why this one matters.

Worth a look: How much structure you need depends on where the results go. If they end up in a citation UI or a report, the extra fields are worth having. If they go straight into a prompt, a smaller object is usually better: fewer tokens and nothing to clean up first. Oxylabs Fast Search API is a good alternative to evaluate in this case. Every result comes back the same shape, without the ads, snippet boxes, and everything else the page carries.

Feature 5: Relevance-Ranked Scoring

Every result includes a “relevance_score” between 0 and 1. Set “relevanceThreshold” to drop low-quality hits before they ever reach your LLM.

const results = await valyu.search("quantum error correction", {
includedSources: ["valyu/valyu-arxiv"],
relevanceThreshold: 0.7, // default is 0.5
});

Why it matters: The top cause of bad agent answers is low-signal context stuffed into the prompt. A relevance threshold is the cheapest quality upgrade you can ship. One line of config, measurably better outputs.

Feature 6: Per-Query Budget Controls

Agents can run away with your bill. Valyu exposes hard budget controls per query: “maxPrice” (CPM basis. Cost per 1,000 retrievals, see pricing for the per-source rate) and “maxNumResults”.

const results = await valyu.search("lithium supply chain 2026", {
maxPrice: 30, // cap spend per 1k retrievals
maxNumResults: 10, // 1–20
responseLength: "medium", // cap content per result
});

Combined with per-agent rate limits, you get predictable costs even when an agent decides to search 200 times inside a reasoning loop.

Get unicodeveloper’s stories in your inbox

Join Medium for free to get updates from this writer.

Why it matters: The first agent production incident is always “why did we spend $4,000 on search today?” Budget controls prevent the second one and make search usable inside autonomous loops without a paranoid human in the middle.

Feature 7: Date Range Filtering

Context stale by three months is context that’s wrong. Every search accepts “startDate” and “endDate” in “YYYY-MM-DD” format.

const news = await valyu.search("Fed rate decision", {
searchType: "news",
startDate: "2026-03-01",
endDate: "2026-04-22",
countryCode: "US", // ISO 3166-1 alpha-2
});

Pair with the “news” or SEC verticals to build “what happened in the last 48 hours” agents that stay current by construction. See the date filtering guide.

Why it matters: An agent analyzing “Apple’s latest guidance” should never surface a 2022 analyst note. Date bounds are how you keep agent reasoning current without prompt-engineering gymnastics.

Feature 8: Hybrid Web + Proprietary Search in One Call

Sometimes you need public web and specialised data blended together. The default “searchType: all” co-ranks both into a single list. No fan-out logic in your agent.

const blended = await valyu.search("mRNA vaccine durability", {
searchType: "all", // default — web + proprietary
includedSources: ["medical", "valyu/valyu-pubmed"],
category: "peer-reviewed clinical trials",
maxNumResults: 15,
});

console.log(blended.results_by_source); // { web: 4, proprietary: 11 }

The “category” field accepts a natural-language string to focus ranking. Use it to steer results toward the type of content you need.

Why it matters: Forcing your agent to decide “Should I search academic or news first?” before every question is slow, brittle, and often wrong. Let the index decide, with one call.

Feature 9: Drop-in Vercel AI SDK Tools & Integrations for Many Tools

“@valyu/ai-sdk” ships one tool per vertical. Your agent picks which ones to mount. No wrapping required. See the Vercel AI SDK integration docs.

import { generateText, stepCountIs } from "ai";
import { openai } from "@ai-sdk/openai";
import {
webSearch,
secSearch,
paperSearch,
financeSearch,
} from "@valyu/ai-sdk";

const { text } = await generateText({
model: openai("gpt-5"),
prompt: "What's the latest on Nvidia's data center revenue?",
tools: {
webSearch: webSearch({ maxNumResults: 5 }),
secSearch: secSearch({ relevanceThreshold: 0.7 }),
financeSearch: financeSearch(),
},
stopWhen: stepCountIs(5),
});

Install the tool like this: npm install @valyu/ai-sdk.

Other exported tools: `bioSearch`, `patentSearch`, `economicsSearch`, `companyResearch`, `datasources`, `datasourcesCategories`.

Why it matters: The difference between “I’ll integrate search next sprint” and “It’s live in production this afternoon.”

Valyu vs. Tavily vs. Exa vs. Parallel: Head-to-Head Comparison

For agent developers evaluating AI search APIs in 2026, here’s how Valyu compares against the common alternatives:

Press enter or click to view image in full size
  • vs. Tavily: Valyu adds specialised/proprietary datasources (PubMed, SEC filings, clinical trials, patents, economic data) which Tavily doesn’t index. Tavily is web-only.
  • vs. Exa: Valyu scores 79% vs 24% on FreshQA and 94% vs 91% on SimpleQA, plus proprietary data access Exa lacks.
  • vs. Parallel: Valyu scores 79% vs 52% on FreshQA. A27-point advantage on time-sensitive queries plus paywalled and licensed content.
  • vs. Google/Bing Search APIs: Valyu is optimized for AI agents. Structured output, relevance scores, source filtering, budget controls.

For finance, healthcare, legal, and academic agents, specialised data access is usually the deciding factor.

One to watch: Oxylabs is folding its web data products into a single API for AI workloads in October 2026, including an endpoint that returns a written answer with its sources.

For agents making high volumes of web requests, throughput and cost per call are usually the deciding factors. For finance, healthcare, legal, and academic agents, specialized data access decides it instead.

The Production Pattern That Wins

The pattern that wins for most agent workloads:

  1. search() with the right vertical + relevanceThreshold + startDate bound
  2. contents() on the top 3 URLs for full text
  3. Feed to your LLM with citations preserved
  4. Cache by URL to avoid re-fetching the same document

Grounded, cited, current, budget-capped context in under a second. That’s the whole ballgame for agents.

When you sign up, you get $10 in free credits. There’s also a subscription plan that’s cheaper and offers more value, with 50% off your first month.

Frequently Asked Questions

What is the best AI search API for agents in 2026?

For agents that need specialised data (finance, healthcare, legal, academic), Valyu is the strongest option because it combines web search with specialised datasources(PubMed (40M+ papers), SEC filings, arXiv (3M+ preprints), clinical trials, patents and more through a single unified API. It outperforms all major competitors on standard benchmarks: 79% on FreshQA vs Google’s 39%, and 94% on SimpleQA. For web-only use cases, Tavily and Exa are also viable, though neither offers proprietary data access. For high-volume web search, Oxylabs Fast Search API is the strongest option. It’s built for the load an agent actually generates — hundreds of queries a second, millions a day — backed by a decade of scraping infrastructure with 175M+ IPs, and the compliance posture enterprise buyers ask for.

How is Valyu different from Tavily or Exa?

Tavily and Exa index the public web. Valyu indexes the public web plus specialised datasources, and returns structured, citation-ready results with relevance scores, source filtering, and budget controls designed specifically for LLM agents. On the FreshQA benchmark for time-sensitive queries, Valyu scores 79% vs Exa’s 24%.

Does Valyu work with the Vercel AI SDK?

Yes. Install “@valyu/ai-sdk” which ships per-vertical tools (“webSearch”, “secSearch”, “paperSearch”, “financeSearch”, “bioSearch”, “patentSearch”, “economicsSearch”, “companyResearch”, and more) that plug directly into “generateText”, “streamText”, or “generateObject”. No custom tool definitions required.

How much does Valyu Search cost?

Valyu uses pay-as-you-go pricing with $10 in free credits for new signups (no credit card required). Pricing is per 1,000 retrievals, tiered by data source: open databases ($0.50/1k), web search ($1.50/1k), financial data ($8/1k), proprietary databases ($30–50/1k). Budget controls (“maxPrice” and “maxNumResults”) cap spend per query. Its very critical for autonomous agent loops. See the pricing page for current rates.

Can I restrict search to specific sources for compliance?

Yes. Use “includedSources” (whitelist by domain, dataset ID, preset name like “medical” or “legal”, or named collection), “excludeSources” (blacklist), and “sourceBiases” (integer weights from -5 to +5 to soft-rank preferred domains). This is how biomedical, legal, and financial agents stay defensible in regulated environments.

What SDKs does Valyu support?

Official SDKs for TypeScript and Python, plus a Rust SDK (alpha). Framework adapters: Vercel AI SDK (`@valyu/ai-sdk`), LangChain (JS and Python), LlamaIndex, Agno, AWS Bedrock AgentCore. Also available as an MCP server for Claude Code, Cursor, and Windsurf.

How do I keep search results current?

Use “startDate” and “endDate” (YYYY-MM-DD format) to bound results by publication date. Combine with “searchType: news” for real-time news retrieval or the SEC vertical for the latest filings. This ensures agents never surface stale context regardless of how long they run.

What types of AI agents benefit most from Valyu?

Agents with domain-specific data needs: financial research agents (SEC filings, earnings, market data), biomedical agents (PubMed, clinical trials, FDA labels, drug databases), academic research agents (arXiv, publisher-licensed papers), legal and compliance agents (patents, regulatory filings), and economic analysis agents (FRED, BLS, World Bank). General-purpose web agents can use Valyu’s web search, which outperforms Exa and Google on accuracy benchmarks.

Next Steps

--

--