Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Endpoint: POST https://api.microsoft.ai/v3/browse
Sample Request:
curl -X POST "https://api.microsoft.ai/v3/browse" \
-H "host: api.microsoft.ai" \
-H "x-apikey: <Your key>" \
-H "content-type: application/json" \
-d '{
"url": "https://techcommunity.microsoft.com/blog/azuredevcommunityblog/why-ai-agents-need-external-grounding/4565283",
"query": "How fast is Web IQ",
"contentFormat": "passage",
"maxLength": 3000,
"liveCrawl": "fallback",
"language": "en",
"region": "US"
}'
Passages are the recommended format for grounding. Applications with full document access can instead request the whole page by setting contentFormat to text, html, or markdown. See Passages and content formats.
Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| url | Yes | string | - | The URL of the web page to browse. |
| query | Required for passage |
string | - | The query used to select passages from the page, up to 1000 characters. A passage request requires a query that isn't blank. For other formats, query is optional. A value longer than 1000 characters returns HTTP 400. This limit is independent of maxLength. |
| maxLength | No | integer | 3000 (10000 with full document access) | The maximum number of characters in content, from 1 to 500000. A value outside that range returns HTTP 400. Without full document access, content is at most 3000 characters, and larger values are capped at 3000. |
| liveCrawl | No | string | "none" | Controls live crawling behavior. Supported values: "none" (only return indexed content, without live crawling) and "fallback" (request a live crawl if the URL isn't found in the index). For "none", if the URL isn't found in the index, the API returns 404 (URL not found). Note: Live crawling is subject to publisher politeness restrictions and availability; "fallback" doesn't guarantee an actual crawl. |
| includeWebLinks | No | boolean | false | Include outbound hyperlinks from the page. Ignored for passage content. |
| renderDynamicPages | No | boolean | false | Enable JavaScript rendering for dynamic content screenshot. Only works when liveCrawl is set to "fallback". |
| includeImageLinks | No | boolean | false | Include image URLs from the page. Ignored for passage content. |
| language | No | string | "en" | The language code (2-letter ISO 639-1). See Supported Languages for the full list. |
| region | No | string | "US" | The region code (2-letter country/region code). See Supported Regions for the full list. |
| contentFormat | No | string | "passage" ("html" with full document access) | "passage" returns the parts of the page most relevant to query (recommended for grounding). "text", "html", and "markdown" return the full document and apply only to applications with full document access; without it, they return HTTP 403 (AuthContentFormatForbidden). See Passages and content formats. |
For passage requests, set contentFormat to "passage" and send a nonblank query. If you leave out contentFormat, "passage" is the default unless your application has full document access, where the default is "html". A passage request without a query returns HTTP 400 (HandlerInvalidInput).
Passage requests
A passage request is subject to the normal request validation, plus the following:
querymust contain text other than whitespace and be at most 1000 characters. Otherwise the request returns HTTP 400 (HandlerInvalidInput).liveCrawlmust be "none" or "fallback".
Over MCP, these failures return HTTP 200 with a tool error (result.isError: true) that carries the original request ID. The passage is returned in the existing content field; the response has the same shape as for other content formats.
Passage content
A passage is a query-focused extract of the requested page. Instead of returning the page from the beginning, the service selects the parts of the page most relevant to query and returns them in the content field.
- Selection: the page is divided into segments, which are ranked by relevance to
query. The highest-ranked segments are selected until themaxLengthbudget is reached. - Ordering: selected segments are returned in their original page order, not in ranking order. Non-adjacent segments are separated by
.... - Segment boundaries: segments are defined by length rather than by sentence or paragraph, so an excerpt can begin or end mid-sentence. Display passages as excerpts and use the source
urlfor attribution. - Format: passage content is plain text. Markup, hyperlinks, and image references aren't included in
content. - Length:
contentnever exceedsmaxLengthcharacters. The defaultmaxLengthis 3000 without full document access and 10000 with full document access. Short pages can be returned in full. - Fallback: if relevance selection is temporarily unavailable for a request, the service returns the beginning of the page as plain text, truncated to
maxLength. - Content restrictions: publisher and site policies, such as robots directives and paywall rules, are applied before selection. Passages are selected only from content that can be returned for the page.
- Other behavior: URL resolution, live crawling with "fallback", pending crawl (HTTP 202) responses, response fields such as
title,crawledAt, andisAdult, and error responses are the same as for other content formats.
Request Headers
| Field | Type | Description |
|---|---|---|
| host | string | Host for Microsoft AI APIs: api.microsoft.ai. |
| x-apikey or Authorization | string | Your API key or Entra ID access token for authentication. |
| content-type | string | MIME type of the request body. Use application/json. |
Response
| Field | Type | Description |
|---|---|---|
| url | string | The URL of the web page, or the URL to retry when a crawl is pending. |
| title | string | The title of the web page. |
| content | string | The extracted content of the web page (aka grounding). For a passage request, the passages selected for query. |
| lastUpdatedAt | string | The last updated date of the webpage, follows ISO8601 format. |
| crawledAt | string | The last crawled date of the webpage, follows ISO8601 format. |
| traceId | string | Trace ID for debugging. |
| retryAfter | string | The earliest time to retry, as an ISO 8601 UTC timestamp (for example, "2026-10-30T01:01:00Z"). Present when an on-demand crawl is in progress (202), and on some errors. |
| isAdult | boolean | Indicates if the webpage contains adult content. |
Note
The title, content, isAdult, lastUpdatedAt, and crawledAt fields are only present in successful (200) responses. They are omitted from retry (202) responses.
Example: passage request and response
The request in the sample above returns a response like the following. The service selected non-adjacent segments of the page and joined them with ....
{
"url": "https://techcommunity.microsoft.com/blog/azuredevcommunityblog/why-ai-agents-need-external-grounding/4565283",
"title": "Why AI agents need external grounding | Microsoft Web IQ",
"content": "Why AI agents need external grounding | Microsoft Web IQ Microsoft Community Hub Azure Microsoft Developer Community Blog nodeTitle minReadText Why AI Agents Need External Grounding bkingms Microsoft Oct 18, 2026 Earlier this year, we introduced Microsoft Web IQ, a suite of AI-native web search and grounding APIs that gives LLMs, AI agents, and applications access to current, relevant web information. This post explores why web grounding is becoming a foundational layer of AI, how it helps deliver answers customers can use and verify, and how we’re addressing the quality, speed, and efficiency developers need. -- When customers ask an AI agent or application for help, the answer may do more than inform them—it may shape a recommendation, trigger a workflow, or guide an action. If that answer relies on... ... an engineering approach that treats quality, speed, and token efficiency as a connected problem. You can read more on our engineering approach here. Highest grounding satisfaction. On a 3,000 query blind test sampled from production traffic, Web IQ scored 79.05 against 75.70 for the next best service and more than 14 points ahead of the lowest. It gets there by returning more complete, structured context drawn from web, news, images, and video. What your users see is answers that hold up: more accurate, more consistent, and properly attributed. In the domains where source quality, freshness, and attribution drive the decision, that is the difference between an agent people act on and one they quietly double check. 2.5x faster than today's best alternative. P95 latency measured 164 milliseconds across five datacenter regions, against 406 for the closest competitor and 2,090 for the slowest. Latency compounds in agent workloads, because a multi-step chain pays the retrieval cost at every hop. Cutting it at each step keeps workflows moving and keeps interactive agents feeling interactive instead of batch. Highest quality answers with the fewest tokens. Web IQ sits on a new Pareto curve of efficiency, reaching peak quality at around 40,000 tokens per query while competing services spend 60,000 to 100,000 to score lower. Prioritizing the most relevant passages and cutting unnecessary context reduces both token spend and reasoning time, and those savings compound across high volume production workloads. Most web search APIs force a tradeoff — fast or accurate, cost-efficient or complete. Web IQ is delivers across the board: industry-leading quality, fastest performance, and fewest tokens per query — all in an enterprise-ready solution. For teams evaluating Web IQ, those results provide a starting point. We recommend testing your own questions, sources, models, and end-to-end workflows to understand how retrieval quality and efficiency translate into customer outcomes. Grounding satisfaction is a benchmark score, not an accuracy percentage, and retrieval latency is only one part of the time required to complete a task. Within Microsoft IQ,...",
"isAdult": false,
"lastUpdatedAt": "2026-10-18T00:00:00",
"crawledAt": "2026-10-29T07:44:00Z",
"traceId": "6ae4fd995e3d425f847c07c2f0839e38"
}
Error Codes
| Status Code | Error Category | Description | Common Causes |
|---|---|---|---|
| 200 | Success | The request succeeded. | - |
| 202 | Accepted | Request accepted for processing (live crawl). | On-demand crawling in progress |
| 400 | Bad Request | Invalid request parameters. | Missing required fields, invalid parameter values, malformed JSON, a missing or blank query for a passage request |
| 401 | Unauthorized | Authentication failed or missing. | Invalid API key, missing x-apikey header |
| 403 | Forbidden | Valid credentials but request cannot be fulfilled. | API key lacks required permissions, URL blocked by policy, content filtered, text, html, or markdown requested without full document access |
| 404 | Not Found | Document not found. | Invalid or inaccessible URL |
| 410 | Gone | HTTPS required. | Request made over HTTP instead of HTTPS |
| 415 | Unsupported Media Type | Content type not supported. | Missing or incorrect content-type header |
| 429 | Too Many Requests | Rate limit or on-demand crawl limit exceeded. | Too many requests in time window, or excessive live crawl requests |
| 430 | Too Many On-Demand Crawls | Too many on-demand crawls (legacy error codes). | Excessive live crawl requests |
| 500 | Internal Server Error | Unexpected server error. | Temporary server issue |
| 503 | Service Unavailable | Service temporarily unavailable. | Maintenance or temporary outage |
| 504 | Gateway Timeout | Request timed out. | Upstream service timeout |
| 520 | Content Processing Failed | The page was retrieved but no usable content could be produced. | Document processing failed or timed out, or dynamic rendering timed out |
| 523 | Crawl Canceled | The crawl didn't produce content due to limited site crawl quota. | Limited crawl quota for the source host |
| 524 | Crawl Timeout | The crawl didn't produce content because it timed out. | The remote host timed out |
Passage request errors
These errors apply to passage requests. They also apply when "passage" is the default format.
| Condition | HTTP Status | Error Code |
|---|---|---|
query is missing, blank, or longer than 1000 characters |
400 | HandlerInvalidInput |
An application without full document access requests text, html, or markdown |
403 | AuthContentFormatForbidden |
Granular error codes
Granular error codes are enabled by default for Browse. They identify the specific reason a page couldn't be returned, such as content filtering, a missing document, or a crawl failure, and include retry guidance where applicable. No opt-in or Support request is required.
For the full list of codes and recommended actions, see Browse API specific errors.
For detailed error handling guidance, see Error Handling.
See also: Web Search | Videos Search | News Search | Images Search | MCP