# Cap Pages Before Scraping a Document of Unknown Length ## Claim When calling a per-page-billed scraping API against a document of unknown length, set an explicit page cap first, because a capped and possibly incomplete extraction is strictly better than discovering the cost afterward. <!-- atomicity: 1 idea ✓ --> ## Scope & conditions - Asymmetric outcomes are what decide it: an incomplete extraction is retryable with a higher cap, an unbounded bill is not retractable. - Applies to any metered API called against unbounded input — page counts, token limits, row limits, crawl depth. - The cap should be set from the budget, not from a guess at the document, since the guess is the thing that is unknown. - Parse and scrape bill differently in this tool, so the cap has to be set on whichever call is the metered one. ## Evidence From the Firecrawl explainer on parse versus scrape: billing is per page, which makes unbounded calls against unknown-length documents the practical hazard. ## Links - [[Build-Time Network Calls Need Explicit Timeouts]] — the same bounding discipline applied to time rather than to cost - [[Sweep the Parameter and Find the Flat Region]] — the complementary practice — once bounded, measure where the bound stops mattering - [[3. Resources/MOCs/AI Cost & Tokenomics MOC]] — the tokenomics thread on bounding metered calls.