xAI web search

by xAIWeb search

xAI web search lets Grok search and browse the web in real time and answer with citations, held to or kept off up to five domains per request. xAI also has a separate X search tool for posts, users and threads on X. On Opper, opper:web_search on auto uses it on the routes that have it, and Opper's own engine everywhere else. Pin "engine": "native" to require it, or pin Jina or SearchBase to keep searches in the EU instead. It runs on 20 routes in the catalogue today.

UsexAI web searchwithin

Add xAI web search on Opper

Set up with agents

Paste this into your coding agent (Claude Code, Cursor, Codex, and more) and it will set up and build with Opper for you.

Get your API key

Key info

Region
Provider
Pin it with
"engine": "native"
Native routes
20

In your code

curl https://api.opper.ai/v3/compat/chat/completions \
-H "Authorization: Bearer $OPPER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "xai/grok-4.7",
"messages": [{"role": "user", "content": "What changed in the news today?"}],
"tools": [{"type": "opper:web_search"}]}'

Use xAI web search with these models

Step-by-step setup for xAI web search on each of these models through Opper.

More tools on Opper

Use xAI web search through Opper

One key, 700+ models, a choice of region, and zero data retention. Tools run in the same request, with every call in your traces.

Get startedView Documentation