Skip to main content
A bid team prepares an offer for a public tender. The tender page is 10 lines long and links to 6 files. The buyer posts a seventh file, “Addendum 2”, 9 days before the closing date. It moves the closing date a week earlier and adds a certificate to the list of required documents. Nothing on the page itself changed but one link. The team learns of it when its offer is rejected. This page builds a watch on a tender that reads what the page links to.

The run in 5 steps

List the files of the tender page

Fetch the page, then ask its record for the links of the kind file. Each link has its address, its text, and the section of the page it is in. The list has the links of the page’s main content, so the menu and the footer of the site are not in it.

Read each file

Fetch the files in one batch. Each comes back as a record with its outline, so your agent knows which file is the terms of reference and which is the price schedule before it reads either.

Check the page again each morning

Fetch the tender page with the fingerprint of its last record. If the page is unchanged, no link was added. If it changed, list its links again and compare them with the list you have. An address that is new is a new file.

Read the new file with your questions

Send the old files with their fingerprints and the new file with the questions that decide a bid.
Request body of fetch_contents_batch
Replace each placeholder that ends in _URL with the address of a file, and each that ends in _FINGERPRINT with the fingerprint of that file’s last record. A file whose bytes are the same comes back as unchanged, and no page of it is parsed. The new addendum comes back with the places of its highlights.
Part of the response, cut to the highlights of the addendum
The first highlight was found by its words, and the second was picked by a model as bearing on the question. Both are the buyer’s own sentences, with their page.

Compare a replaced file

A buyer can also replace a file under the same address. Then the fingerprint differs, and the file comes back in full. Compare its record with the earlier one, and the comparison lists each clause and each cell of the price schedule that changed.

What the bid manager can check

Know the limits

A link’s kind is read from its address. A file behind an address without a file ending is listed as a page, and its fetch says what it is. A portal that shows its files only after a sign-in cannot be fetched by its address. A person can download the files and upload them. An addendum that is a scan is read from its pictures, and the reading has a confidence. A date that was recognized with a low confidence should be read by a person. A watch runs when your code calls. No call watches a page for you. For the calls, see Follow a page to the documents it links to and Fetch 20 sources at once and know what came back before you read a word.