Skip to main content
POST
/
v1
/
tools
/
web-search
Web Search
curl --request POST \
  --url https://{base_url}/gpt/v1/tools/web-search \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>"
}
'
{
  "content": [
    {
      "type": "text",
      "text": "This is the main content extracted from the web page..."
    }
  ],
  "is_error": false
}

Body

application/json

Request body for fetching web content. The last user message must contain a valid URL.

Request body for web content fetching using the tool.

url
string
required

The URL of the web page to fetch and extract content from.

Example:

"https://example.com/article"

Response

Web search completed successfully.

Response returned from tool-based operations.

content
(TextBlock · object | ImageBlock · object | AudioBlock · object | BinaryBlock · object | ResourceLinkBlock · object | ResourceBlock · object | SourceBlock · object | ToolUseBlock · object | ThinkingBlock · object | TLDRBlock · object)[]
required

List of content blocks generated by the tool. Blocks can include plain text, citations, source attributions, or images.

Text content block containing natural language text.

is_error
boolean
default:false

True if the tool encountered an error during execution.