BazaarLinkBazaarLink
Sign in
← All articles
Published 2026-09-29 · · Author:BazaarLink · web search API · AI search API · LLM · RAG

Add Web Search to Any LLM API Call: The :online Suffix

Give any model live web results and citations with a model-name suffix or a plugin option. Copy-paste examples, depth levels, filters and billing rules.

Language models know what they were trained on. For anything after that cutoff, such as prices, release notes, news or a library's newest API, they guess. The usual fix is to build a search step yourself: pick a search API, call it, trim the results, paste them into the prompt, and hope the model cites them.

BazaarLink turns that into a single change to the request. You add web search to the call you already make, and you get the answer back with source links.

The one-line version

Append :online to the model name:

curl https://bazaarlink.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $BAZAARLINK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-6-luna:online",
    "messages": [{"role": "user", "content": "What changed in the latest Node.js LTS release?"}]
  }'

The request is searched first, the results are handed to the model, and the answer comes back with citations.

Three equivalent ways to turn it on

MethodUse it when
"model": "<model>:online"You want the smallest change. Works with any model ID.
"plugins": [{"id": "web", "max_results": 5}]You want to set the number of sources per request.
"web_search_options": {"search_context_size": "high"}You already use the OpenAI-style option and want to pick depth.

They can be combined in one request; only one search runs per request. They work on Chat Completions, Responses and Messages, streaming or not.

search_context_size sets the depth:

LevelDepthDefault resultsGood for
lowStandard5Quick fact checks
medium (default)Standard10General questions
highAdvanced10Multi-source comparisons, research
fastQuick10Latency-sensitive chat

Deeper levels cost more per search. Search is billed separately from model tokens, per search.

Narrow the results

Extra options go in the same plugin or options object:

OptionValuesEffect
countrye.g. taiwan, japanPrefer sources from a region
languageISO 639-1, e.g. jaPrefer a language
topicgeneral, newsSwitch to news-style results
time_rangeday, week, month, yearOnly recent content
max_results1–10Number of citations
query_sourcelast_user, conversationSearch the last message or the whole conversation
search_prompttextWrite the search query yourself

Example: last week's news, Japanese sources, three citations:

{
  "model": "claude-sonnet-5.5",
  "messages": [{"role": "user", "content": "AI regulation updates"}],
  "plugins": [{
    "id": "web",
    "max_results": 3,
    "topic": "news",
    "time_range": "week",
    "language": "ja"
  }]
}

Reading the citations

Sources come back as url_citation objects in annotations:

{
  "type": "url_citation",
  "url_citation": {
    "url": "https://example.com/article",
    "title": "Article title",
    "content": "Source excerpt…",
    "start_index": 0,
    "end_index": 0
  }
}

If the model did not annotate a span of the answer, start_index and end_index are both 0. In streaming mode the annotations arrive in a final block before [DONE].

When you are charged

  • A search that fails (HTTP 503 web_search_unavailable) is not charged.
  • A request rejected for insufficient balance before the search runs is not charged.
  • If model generation fails after the search, you are not charged for the search.
  • When you send several queries, only successful ones are charged.
  • Free models still incur the search fee, because search is a separate line item.

Moving existing code

The parameter format is compatible with the common OpenRouter-style web search options. If your code already uses :online or the web plugin, change the base URL and API key. Nothing else needs to change.

Where this fits

  • Support and sales assistants that must quote current pricing or policy pages.
  • Coding assistants that need the newest library docs.
  • Research agents that need dated, linkable sources.
  • Any workflow that used to depend on a retired search API and needs a maintained replacement.

Get an API key and try the :online suffix on your next request. The full option list is in the docs under Web Search.

For the four tools and pricing, see Tavily-style AI search API: Search, Extract, Crawl & Map.

Try BazaarLink now

TWD billing · Taiwan invoices · leading AI models · OpenAI-compatible API

Sign up / Log in for freeEnterprise inquiries
Related posts
Claude Code · Claude Code update · changelog · mods · permission rules
Claude Code 2.1.289: 27 Changes, Permission-Rule Fixes and Mods Stability
Claude Code · Claude Code mods · plugins · TypeScript · AI coding tools
Claude Code Mods: Customize Behavior and UI with TypeScript
web search API · AI agent · LLM · OpenClaw
OpenClaw Web Search Setup: Point Tavily at BazaarLink
Support
Support
Hi! How can we help you?
Send a message and we'll get back to you soon.