web.fetch fetches readable text content from a specific URL. It returns the extracted page text, title, content hash, and metadata. Use it when the model needs the full content of a known page rather than a ranked search snippet.
PHI enforcement
The URL and any query context are scanned before the fetch executes. The retrieval-specific behavior is controlled by your org’sphi_retrieval_behavior setting: redact (default) strips PHI before the fetch proceeds; block rejects the tool call entirely if PHI is detected. External providers never receive PHI under any circumstance.
Billing
- 2 AI Credits flat surcharge per call, debited on provider success.
- Normal input-token cost applies to the injected
extractedTextcontent.
Limits
| Constraint | Value |
|---|---|
| Timeout | 10 seconds |
| Max response size | 2 MB |
| JavaScript rendering | Not supported (V1) |
robots.txt | Honored — disallowed URLs return FETCH_DISALLOWED |
contentHash field reflects the hash of the full fetched content before truncation.
Input parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | The URL to fetch. Must be an absolute https:// URL. |
conversationId | string | No | Correlation context. Passed automatically by HASP in chat sessions. |
Output fields
| Field | Type | Description |
|---|---|---|
finalUrl | string | URL after any redirects. |
statusCode | integer | HTTP status code returned by the origin. |
pageTitle | string | null | Extracted page title; null if not present. |
extractedText | string | Readable text content extracted from the page. |
contentHash | string | SHA-256 hex digest of the full fetched content (pre-truncation). |
retrievedTimestamp | string | ISO 8601 timestamp of retrieval. |
Example
Tool call emitted by the model:Error codes
| Code | Description |
|---|---|
RETRIEVAL_DISABLED | Web retrieval is not enabled for this org. |
RETRIEVAL_PHI_BLOCKED | PHI was detected in the URL or context and phi_retrieval_behavior=block is set. |
FETCH_DISALLOWED | The URL is disallowed by the origin’s robots.txt. |
FETCH_TIMEOUT | The origin did not respond within the 10-second timeout. |