Maximum URL Request length for Azure Document Intelligence - Analyze Document

TRẦN NGỌC UYỂN NHI 40 Reputation points
2026-07-15T23:58:56.0933333+00:00

I'm calling the Document Intelligence Analyze Document REST API (prebuilt-read model) with the output=pdf option to generate a searchable PDF. I pass the document via urlSource in the request body, and I select which pages to OCR using the pages query-string parameter on the analyze URL, e.g.:

POST {endpoint}/documentintelligence/documentModels/prebuilt-read:analyze?_overload=analyzeDocument&api-version=2024-11-30&output=pdf&pages=1,2,3,5,7-9

For a large scanned document, the enumerated pages value can get long. A fully-enumerated list up to ~2,000 pages (1,2,3,…,2000) is roughly 8,900 characters.

My questions:

  1. What is the maximum request URL / request-line length accepted by the Document Intelligence :analyze endpoint? The Content Understanding service-limits page lists "URL properties ≤ 8,192 characters" — does the same 8,192-character limit apply to Document Intelligence, and does it apply to the full request URL (including the pages query string), or only to URL-valued properties like urlSource?
  2. If the URL exceeds that limit, what is the failure mode? A clean 414 URI Too Long, or is the query string silently truncated?
  3. Is there a recommended way to specify a large page selection without a long URL — e.g. a maximum recommended length for the pages parameter, range syntax expectations, or an alternative to passing pages on the query string?

I want to set a safe cap on the pages string length (and fall back to OCR-ing the whole document when exceeded), so an authoritative number for this endpoint would help.

Azure Document Intelligence in Foundry Tools
0 comments No comments

Answer accepted by question author

Allan Solomon Mejia 2,595 Reputation points
2026-07-16T02:30:22.5466667+00:00

Hi Tran,

I don't believe Microsoft has published a documented maximum length specifically for the pages query parameter on the Document Intelligence :analyze endpoint. In practice, you're likely to encounter limits imposed by the underlying HTTP request line, Azure Front Door/API Gateway, or intermediary proxies before Document Intelligence itself processes the request. My expectation is that if the request exceeds the accepted request-line length, the service should return an HTTP error (such as 414 URI Too Long or 400 Bad Request) rather than silently truncating the pages parameter. Silent truncation would be problematic because it could produce incomplete OCR results without the client realizing it.

For very large page selections, I'd recommend minimizing the query string where possible by using page ranges (for example, 1-500,700-900) instead of enumerating every page. If the selection still becomes excessively long, another practical approach is to split the document into multiple analyze requests and merge the searchable PDFs afterward. This is a good question for the product team because an officially documented maximum request-line length or support for passing the page selection in the request body instead of the query string would make client implementations much more predictable.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.