GovCon capture teams and AI proposal agents face the same daily bottleneck: SAM.gov metadata alone is never enough for a Bid / No-Bid decision.
The real disqualifiers—DFARS 252.204-7012 / 252.204-7021 (CMMC), TS/SCI facility clearance mandates, Section L page limits, and CLIN pricing structures—live buried inside 50–150 page PDFs, DOCX files, and nested ZIP bundles. Feeding raw 100-page government PDFs straight into an LLM burns tokens and introduces silent hallucinations.
Here is how we built us-govcon-rfp-compliance-parser in Python 3.12 as a 100% deterministic document engine exposed over the Apify MCP Server.
1. Real-World SAM.gov & USAspending Gotchas We Hit Live
When moving from synthetic mocks to live US government endpoints, four subtle production traps showed up immediately:
- Public SAM.gov
opps/v2returns HTTP 406 if you sendAccept: application/json—it requiresAccept: application/hal+json, application/json, */*, nests core metadata underbody["data2"], and stores downloadable attachments on a separateopps/v3/opportunities/{id}/resourcesendpoint. - Attachments redirect 303 to AWS S3: Every public SAM.gov file download issues an HTTP
303redirect toiae-fbo-attachments.s3.amazonaws.com. Our Anti-SSRF client pins connect-time IPs and allows a strict single-hop302/303redirect only fromsam.govtoiae-fbo-attachments.s3.amazonaws.com(stripping sensitive headers on hop). - USAspending agency naming mismatch: SAM.gov returns abbreviated strings like
"DEPT OF DEFENSE", which returnsresults: []onapi.usaspending.gov/api/v2/search/spending_by_award/. Normalizing agency names (e.g.,"Department of Defense") and adding a 5-yeartime_periodwindow immediately surfaced real incumbent contracts. - Memory safety under 512 MB containers: Opening
pypdfandpdfplumbersimultaneously on large solicitation PDFs risks OOM. We extract text sequentially withpypdf, release the reader, and lazily invokepdfplumberonly on sparse or table-heavy pages for CLIN schedules.
2. Hardened Document & Archive Parsing
Because federal solicitation attachments come from external uploaders, our parser treats every byte as hostile:
- ZIP Archives: Streaming extraction with strict Anti-Zip-Slip path validation and Anti-Zip-Bomb guards (file count, uncompressed byte caps, and compression-ratio limits).
- DOCX Files: Protection against UTF-16 XXE payloads and
w:gridSpantable expansion attacks. - Deterministic Compliance Rules: ReDoS-safe parsers extract normalized
FAR/DFARSclauses, Section L (Instructions) and Section M (Evaluation Factors),CLINschedules, security clearances (Public Trust,Secret,Top Secret,TS/SCI),NAICS,Set-Asides, and ISO-8601 deadlines—followed by fixed-point anti-prompt-injection sanitization before returning JSON to any LLM.
3. Connect via Apify MCP Server or Batch API
Point Claude Desktop, Cursor, or LangGraph at:
https://mcp.apify.com/?actors=ramosdeluis/us-govcon-rfp-compliance-parser Or run up to 25 solicitations per batch directly on the Apify Store with Pay-Per-Event pricing (rfp-compliance-parse + optional incumbent-enrichment).
If you work in GovCon capture or build federal procurement agents, let us know in the comments which solicitation formats or FAR/DFARS checks you'd like to see next!

