Here is the chain they skip: list the files, trigger the fetch, poll it, read the record, read the page text — with numbers on how often there is anything to fetch.

  1. Five calls, not one: GET /tenders/{tenderId}/files, POST /tenders/{tenderId}/documents/download, poll the list, GET /documents/{fileId}, then /pages and /headers.
  2. The download is asynchronous because portals are; v1 has no webhooks, so the file list is the progress bar.
  3. Page text arrives with regions[] and bbox_2d, which turns "the PDF says" into "page 11, region 3".
  4. Empty is normal: 1,262 of 97,793 open tenders had documents downloaded as of 26 November 2026, and 69% of arriving files are PDFs.

What the ranking pages assume

On 30 November 2026 the first DuckDuckGo page for tender documents API was two pages of Ukraine's Open Procurement API, one of the UK's Find a Tender, six from commercial aggregators, and one "Documents API" for a supplier's own uploads. In nine of the ten, a document is a URL in a field; the tenth documents an API for managing a supplier's own uploads.

That is faithful to the sources. TED returns notice links — XML plus a generated PDF per language — and the dossier is not on TED. Poland's BZP returns htmlBody and no document field. tender.documents was empty in the Contracts Finder sample of 26 November 2026. Prozorro hands back signed direct URLs; SAM.gov's resourceLinks[] is often empty.

A link is what a portal publishes. Files and pages are what you build. If you came in on download tender documents API, the download is one call — the four around it are what make the file usable. The notice side, filters and deadlines, is /blog/how-to-get-tender-data/.

Every shape below is documented, read from the API reference on 30 November 2026 — not captured: the only key here is stats-only and answers 403 on tender data.

Two ids, one header

In the five sections that follow, tenderId is a lot id, not a notice id, and a lot without a source tender id returns 404 on the download. Two ids name a file: the row's id streams bytes from /files/{id}/download, while fileId addresses the processed document — the commonest 404 here.

Auth is one header, x-api-key, checked before resource lookup: a keyless call to a random tender id answers 401, not 404 — executed, {"error":"Unauthorized","message":"Invalid API key"}, 25 November 2026.

1. List the files

GET /api/v1/tenders/0f8fad5b-d9cb-469f-a165-70867728950e/files
x-api-key: kosmobids_live_...
{"data":{"files":[{
  "id":"uploaded-file-id", "filename":"specification.pdf", "extension":"pdf",
  "sizeBytes":1048576, "mimeType":"application/pdf", "lifecycle":"active",
  "origin":"tender", "documentStatus":"processed", "fileId":"processed-document-id"
}]},"error":null}

Read three fields. lifecycle is active, archived or removed; an archived file stays listed after its original is deleted post-deadline, and its download resolves to the tender zip. origin separates tender files from your company's user-upload additions. And documentStatus answers "can I read this yet" — new, processed, error, or null when the type sits outside the OCR pipeline, which is where a CAD drawing lands. processingStatus is search-store ingestion, not OCR progress.

Why the list is often empty

Our own index is the honest example. Since 23 March 2026 it has accumulated 1,053,438 document records; 170,527 were added in the 28 days to 26 November 2026, and 99.2% carry at least one URL. A URL is not a file. In the 90 days to that date 4,226 documents were actually downloaded, 3,997 completed — and 1,262 of 97,793 open tenders had documents at all (Babel, 30-day window, 26 November 2026).

That is documents on demand, fetched when a match or a customer points at a tender — a product decision, not a bug.

The other reason is upstream. Downloads "can take minutes to hours, and not every portal yields documents" — the docs' sentence, and the most useful warning here. A portal behind a login wall yields the notice and not the attachments. Empty is a state you handle, not an error you retry.

2. Trigger the download, and poll it properly

POST /api/v1/tenders/0f8fad5b-d9cb-469f-a165-70867728950e/documents/download
x-api-key: kosmobids_live_...
{"data":{"tenderDocumentId":"source-tender-id","status":"downloading_auto",
 "message":"Download initiated","scheduled":true},"error":null}
HTTP scheduled Meaning
202truea download workflow was created
200falsealready running, or nothing to download
404—the tender, its source tender id or its document record is missing

Why not return the files here? Because the work is a crawl: resolve a notice page, follow attachments, unpack a ZIP inside a ZIP, sometimes hold a session cookie, sometimes click a JavaScript button with no href. Minutes, not milliseconds. The trigger schedules and the list fills up — safely, since calling it again returns 200 and starts no second workflow. Retrying a 404 is the one retry that never pays.

Poll with backoff, from the headers rather than a fixed sleep. The published per-company limits are 3 requests a second, 100 a minute, 1,000 an hour, with tighter per-minute buckets on search, document analysis, look-alike and saved-search triggers, and uploads at 60 an hour (docs, read 30 November 2026). Every authenticated response carries x-rate-limit-second|minute|hour-limit, -remaining and -reset; a 429 carries Retry-After, and a rejected request consumes no quota.

The arithmetic is the argument. Poll once a second and you spend 3,600 requests an hour, emptying the 1,000-an-hour bucket in about seventeen minutes and starving your searches. The docs' shape — start at 2 s, double, cap at 30 s — is roughly 120 polls an hour: a two-hour download costs 240 requests, not 7,200.

3. Read the document record

GET /api/v1/documents/processed-document-id
x-api-key: kosmobids_live_...
{"data":{"id":"processed-document-id","filename":"specification.pdf","status":"processed",
 "pageCount":120,"contentSummary":"The tender covers a multi-year cloud migration...",
 "tableOfContents":[{"title":"Eligibility","summary":"Mandatory requirements.","pageRange":[1,4]}]
},"error":null}

status gates everything: new, error, processed. Only a processed document has page text, and one still being built returns 200 with status: "new" — not 404 — so a client that reads 404 as "never existed" will misread it.

pageCount decides whether you read a file at all: the corpus average is 12.3 pages per file and the largest is 787 pages (extractor, all-time to 26 November 2026). tableOfContents gives titles with a [start, end] page range, so an agent jumps to "Eligibility, pages 1–4" instead of reading 120 pages. It appears after summarisation; its absence does not mean the text is missing.

4. Read page text and regions

GET /api/v1/documents/processed-document-id/pages?startPage=10&endPage=12
x-api-key: kosmobids_live_...
{"data":{"pages":[
  {"pageNumber":12,"status":"processed","content":"2.1 Eligibility\n...",
   "pageWidth":2480,"pageHeight":3508,"uploadedFileId":"page-image-id",
   "regions":[{"index":0,"content":"2.1 Eligibility","bbox_2d":[120,340,1800,410]}]}
]},"error":null}

Supply both startPage and endPage, or neither: one alone is a validation error. bbox_2d is [x1, y1, x2, y2] in page-image pixels — divide by pageWidth and pageHeight to scale into your viewer. And uploadedFileId is the page image, streamed through /files/{uploadedFileId}/download: that pair lets a client draw the highlight, since the API returns boxes and pixels but no annotated image. 2480 × 3508 is A4 at 300 dpi.

Page numbers are not decoration. At a rough 1,200 tokens a page, the 12.3-page average is about 15k tokens and the 787-page file roughly 950k — more than most context windows, so "read the PDF" is not an instruction you can give a model. "Read pages 10 to 12" is. The compliance point matters more: a bid-bond figure in a summary is a liability unless it resolves to its page, and regions[].index is the index an analysis reference returns.

5. Read the headers

GET /api/v1/documents/processed-document-id/headers
{"data":{"headers":[{"pageNumber":3,"title":"2.1 Eligibility",
  "label":"paragraph_title","category":"text_block"}]},"error":null}

A title, the page it starts on, two classifier strings. label and category are implementation-provided and the docs say to treat unknown values as opaque — no business logic on paragraph_title. Use it for navigation before summarisation has run, and as a completeness check: a 120-page specification with twelve headers probably lost a sectioning level.

What arrives, and what breaks

The extractor's file mix for the 14 days to 26 November 2026:

Extension Files Share Pages Average size
pdf13,47669%181,321931 KB
docx5,07526%52,465182 KB
doc6683%6,293—
png / jpg2121%212—
rtf / odt / pptx97<1%587—

Also present, readable by no text extractor: .dwg (616 files, 2 MB average — CAD drawings), .p7s (70, signature envelopes), .zip (21, 41 MB average). Mark them unreadable.

Then the PDF problem. A fresh PDF from a system — TED's notice renderings, generated from form data — carries a text layer and extracts cleanly. The documents with legal weight usually do not: signed statements, stamped annexes, powers of attorney and certificates are scans by construction, because someone printed, signed and scanned them back. A PDF is often mixed, born-digital body plus scanned annex, so a text-layer check on page 1 settles nothing.

We publish no scanned share, because it is not measured — the extractor does not record whether a page's text came from a text layer or from OCR. What is measured: 18,577 files processed and 227,961 pages, all-time to 26 November 2026. Pages, not percentages.

What OCR costs if you run it yourself

List prices from the vendors' own pricing pages, read 26 November 2026, first tier, USD per 1,000 pages:

Engine and configuration Per 1,000 pages What it returns
Textract DetectDocumentText$1.50lines, words, confidence, geometry
Textract AnalyzeDocument LAYOUT$4.00reading order, paragraphs, headers
Textract TABLES$15.00text plus cells, merges, spans
Textract FORMS$50.00key/value pairs
Azure prebuilt-read$1.50text, paragraphs, polygons, handwriting
Azure prebuilt-layout$10.00text, tables, selection marks, roles
Google Enterprise Document OCR$1.50 (first 1,000/month free)text, paragraphs, tables, tokens, boxes
Google Layout Parser$10.00chunks, headings, lists, reading order
Tesseract 5.x$0 licence, ≈$0.004 computetext, hOCR/ALTO boxes, TSV; no table structure

One lesson holds the budget conversation: plain text is cheap, structure is expensive. $1.50 against $15 per thousand pages is a searchable blob against an extractable price table, and tender documents are mostly tables. At an illustrative 150 pages per dossier that is $0.225 versus $2.25 — cents either way, next to the download-and-retry layer that has no vendor at all.

Mistral bills OCR per 1,000 pages — its FAQ states the unit — but the rate sat in a table unreadable on 26 November 2026, so it is not above.

Citations that resolve to a page

POST /tenders/{tenderId}/analyze takes 1–20 questions and answers them from the documents, which is where the page chain earns its keep. It returns 202 with a workflowId, or 409 with "Documents not ready" when nothing has been fetched. Poll GET /analyses/{workflowId} until isFinalStatus, then read answers[].references[]:

{"idx":1,"fileId":"processed-document-id","pageNumber":12,
 "regionIndex":0,"uploadedFileId":"page-image-id","filename":"specification.pdf"}

Every reference resolves with the two calls above: /pages?startPage=12&endPage=12 for the text, /files/{uploadedFileId}/download for the image. An analysis also reports token usage, the number to budget.

The five-check acceptance test

Run this before believing "documents included".

  1. Pick a tender whose source page shows at least three attachments. Three files with ids and sizes, or three links?
  2. Ask for one scanned annex. Characters per page — under about 200 for a full A4 sheet means no text.
  3. Ask for a price schedule. Is the table still a table, or flattened prose?
  4. Ask for the page number and one bounding box behind a specific claim.
  5. Ask what licence and retention rule lets you store the bytes.

Our own score is three and a half of five. Checks 1, 2 and 4 pass: rows carry ids and sizes, a scan comes back as page text, and a claim resolves to a page number plus bbox_2d. Check 3 is partial — text in reading order, not cell values, because a table cell is not a field in the document model. Check 5 is not answered by documentation at all: the API exposes no retention policy, so that one is a contract question. /api/ documents each endpoint, and the MCP server exposes the same document calls as tools if you would rather not write the client. Most servers on the market stop at links, as /blog/tender-mcp-servers/ found out.

FAQ

Is there a tender documents API that returns files, not links?

Not from the official sources. TED, Poland's BZP and both UK OCDS feeds return metadata and links; Prozorro is the exception with signed direct URLs, SAM.gov with a separately authorised attachment surface. A product that returns the attachment set with stable file ids, and the page text behind it, is what the chain above describes; /blog/tender-apis-compared/ compares what each provider returns.

Why does GET /tenders/{tenderId}/files come back empty?

Three causes, most common first. The download was never triggered. The trigger ran and the portal yielded nothing — login wall, dead link, no attachments. Or the tender has no source tender id, which is a 404, not an empty list.

Why does the download call return 202 instead of the files?

Because it schedules a crawl, not a file read. A portal round trip can mean attachment pages, ZIP archives, session cookies and JavaScript-only buttons, and the docs put the duration at minutes to hours. 202 means a workflow exists; poll the file list until rows appear.

How often can I poll a document download?

The published limits are 3 a second, 100 a minute, 1,000 an hour, so a one-second loop burns the hour bucket in about seventeen minutes. Start at 2 seconds, double, cap at 30 — roughly 120 requests an hour — and read x-rate-limit-hour-remaining instead of sleeping blind.

What is the difference between fileId and the file row's id?

id is the uploaded file and streams bytes from GET /files/{id}/download. fileId is the processed OCR document, used by /documents/{fileId}, /pages and /headers. A row carries both once processing finishes; before that fileId is null.

Can an API read a scanned tender PDF?

Yes, if OCR runs on it — and no vendor publishes an accuracy figure, ours included, because none is measured. What you can check is characters per page: a full A4 page with under about 200 characters did not extract.

Can I download every document of a tender in one request?

Yes: GET /tenders/{tenderId}/files/zip streams a precomputed archive or builds one on demand, and it keeps working after cleanup because archived originals resolve to the zip. It is a binary stream, so you get headers instead of a JSON envelope.

Sources

  • research/13-answers-from-prod.md — open tenders, document counts, format mix, page counts; measured 2026-11-26.
  • facts/canonical-numbers.md — canonical values and windows; 2026-11-30.
  • research/10-documents-and-ocr-cost.md — portal delivery, OCR prices, PDF failure modes; prices read 2026-11-26.
  • research/07-official-apis.md, research/08-commercial-vendors.md, data/portals-inventory.csv — TED, BZP, Contracts Finder, Prozorro and SAM.gov document delivery, and what 16 vendors do with documents; verified 2026-11-25/26.
  • api.kosmobids.com/docs/ — reference/limits, concepts/documents-and-ocr, concepts/ids-and-entities, concepts/async-and-polling, tutorials/analyze-and-cite; read 2026-11-30.
  • aws.amazon.com/textract/pricing/, azure.microsoft.com/en-us/pricing/details/document-intelligence/, cloud.google.com/document-ai/pricing, tesseract-ocr.github.io — 2026-11-26.
  • DuckDuckGo, first page for tender documents API — 2026-11-30.