Skip to main content
This page explains how to use web search with GPT models on APIYI, verified by hands-on testing in June 2026.

TL;DR

APIYI fully supports OpenAI’s official web search: use the Responses API (/v1/responses) with the web_search tool. Both gpt-5.5 and gpt-5.4 were verified to genuinely search the web and return up-to-date information with source citations. A default-group key works out of the box — no special activation needed.

Real-world availability (test data, 2026-06-11)

Model choice: pick gpt-5.4 for speed and cost; pick gpt-5.5 for coverage and rigor (more search rounds and larger retrieved-content injection mean higher cost and latency — see the billing section).

Quick start

cURL

Python (OpenAI SDK)

Response structure

The output array contains, in execution order: status: "completed" means it finished normally; incomplete usually means max_output_tokens was too small — increase it.

Billing (important)

Web search incurs a tool-call fee, made up of two parts:
Measured total cost per web-enabled Q&A: gpt-5.4 ≈ $0.01 search fee + 9k tokens; gpt-5.5 ≈ $0.08 search fee + ~50k tokens. Estimate against your expected query volume.

Notes

  1. Use the Responses API — do not use Chat Completions’ web_search_options: gpt-5 series models do not support that parameter (official OpenAI behavior; returns 400 Unknown parameter: 'web_search_options'). web_search_options only applies to the dedicated *-search-preview models.
  2. Set max_output_tokens to at least 8192: gpt-5.5 consumes many reasoning tokens; a small limit returns status: "incomplete" with no final answer, while tokens are still billed.
  3. The legacy tool type web_search_preview also works with identical behavior; for new integrations, use web_search directly.
  4. To control cost, constrain search behavior in the prompt (e.g. “search at most 2 times”) or use gpt-5.4.

FAQ

Q: How do I confirm the answer really used the web? A: Check whether the response output contains entries with type="web_search_call" and whether the message annotations include url_citation. Both present means real web access; answer text alone without these two markers means the model answered from training data. Q: Do I need a different group or a special key? A: No. For OpenAI models, a default-group key can call web search directly. Q: Which models are supported? A: gpt-5.5 and gpt-5.4 are verified. Other gpt-5 series models should also support the Responses API web_search tool in principle — run the verification check from the FAQ above before relying on it.

OpenAI Native Calls (Responses API)

Responses API endpoint, parameters, and setup

OpenAI Prompt Caching

The large input-token volume injected by web search pairs well with caching