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:

  1. Public SAM.gov opps/v2 returns HTTP 406 if you send Accept: application/json—it requires Accept: application/hal+json, application/json, */*, nests core metadata under body["data2"], and stores downloadable attachments on a separate opps/v3/opportunities/{id}/resources endpoint.
  2. Attachments redirect 303 to AWS S3: Every public SAM.gov file download issues an HTTP 303 redirect to iae-fbo-attachments.s3.amazonaws.com. Our Anti-SSRF client pins connect-time IPs and allows a strict single-hop 302/303 redirect only from sam.gov to iae-fbo-attachments.s3.amazonaws.com (stripping sensitive headers on hop).
  3. USAspending agency naming mismatch: SAM.gov returns abbreviated strings like "DEPT OF DEFENSE", which returns results: [] on api.usaspending.gov/api/v2/search/spending_by_award/. Normalizing agency names (e.g., "Department of Defense") and adding a 5-year time_period window immediately surfaced real incumbent contracts.
  4. Memory safety under 512 MB containers: Opening pypdf and pdfplumber simultaneously on large solicitation PDFs risks OOM. We extract text sequentially with pypdf, release the reader, and lazily invoke pdfplumber only 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:gridSpan table expansion attacks.
  • Deterministic Compliance Rules: ReDoS-safe parsers extract normalized FAR/DFARS clauses, Section L (Instructions) and Section M (Evaluation Factors), CLIN schedules, 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!