# Sam Gov Rfp Analyzer Apify Actor (`platinum_closet-owner/sam-gov-rfp-analyzer-apify-actor`) Actor

Analyze SAM.gov RFP attachments and turn them into a bid/no-bid brief, source-cited requirements, deadlines, risks, clarification questions, and a compliance matrix CSV.

- **URL**: https://apify.com/platinum\_closet-owner/sam-gov-rfp-analyzer-apify-actor.md
- **Developed by:** [Cedric De Schaut](https://apify.com/platinum_closet-owner) (community)
- **Categories:** AI, Jobs
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / rfp analysis completed

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

### What does SAM.gov RFP Analyzer do?

SAM.gov RFP Analyzer turns public SAM.gov opportunities or direct RFP attachments into a source-cited bid/no-bid brief, compliance matrix CSV, deadlines, risks, clarification questions, and downloadable analysis files.

It is built for capture managers, proposal writers, GovCon consultants, and small business teams that need to triage solicitations before spending serious proposal time.

Use it as a lightweight SAM.gov RFP analysis API. It does not generate a complete proposal and it does not replace legal, procurement, or contracting review.

### Why use this SAM.gov RFP analysis Actor?

- Extract source-cited requirements from PDF, DOCX, HTML, and TXT attachments.
- Generate an Excel-ready compliance matrix with requirement IDs, sources, response flags, status, and risk level.
- Detect proposal deadlines, question deadlines, and other key date/time language.
- Identify submission and compliance risks such as late-proposal rejection language.
- Produce a human-readable bid/no-bid summary in `SUMMARY.md`.
- Save machine-readable artifacts for downstream workflows, review, or automation.
- Run from the Apify Console, API, schedules, integrations, or monitoring workflows.

### What data does it produce?

| Output | Type | Description |
| --- | --- | --- |
| Verdict | string | Bid/no-bid recommendation such as `bid`, `consider`, `no_bid`, or `unknown`. |
| Response deadline | string | Detected proposal due date when available. |
| Requirement | string | Source-cited obligation extracted from the RFP documents. |
| Source | string | Filename and page number when available. |
| Risk | object | Risk ID, level, category, reason, and recommended action. |
| Artifacts | files | `SUMMARY.md`, `summary.json`, `compliance_matrix.csv`, `requirements.json`, plus advanced debug detail in `all_rows.json`. |

### How to analyze a SAM.gov RFP

1. Open the Actor input tab.
2. Paste either a public SAM.gov opportunity URL, a SAM.gov notice ID, or one or more direct attachment URLs.
3. Choose an analysis depth.
4. Keep `useLlm` set to `false` for the lowest-cost deterministic run, or enable LLM enrichment if you have configured an OpenAI-compatible key.
5. Start the Actor.
6. Download `compliance_matrix.csv` for Excel or review `SUMMARY.md` for the decision brief.

### Input

You can use any of these input modes:

- `samOpportunityUrl`: public SAM.gov opportunity page URL.
- `noticeId`: SAM.gov notice or opportunity identifier.
- `attachmentUrls`: direct public PDF, DOCX, HTML, or TXT files.
- `companyProfile`: optional capabilities, certifications, NAICS codes, or past-performance context.
- `analysisDepth`: `quick`, `standard`, or `deep`.
- `useLlm`: set to `false` for deterministic extraction or `true` for optional enrichment.
- `maxAttachments`, `maxPagesPerDocument`, and `maxFileMb`: controls for scope and cost.

Example input:

```json
{
  "attachmentUrls": [
    "https://media.bpca.ny.gov/wp-content/uploads/2026/04/24142435/Municipal-Advisory-Services-RFP_Final-RFP_v2.pdf"
  ],
  "analysisDepth": "standard",
  "useLlm": false,
  "maxAttachments": 10,
  "maxPagesPerDocument": 150,
  "maxFileMb": 25
}
````

### Output

The default dataset is optimized for Apify table views and exports. Each dataset row is one compliance matrix row. Run-level summary fields such as verdict, deadline, counts, risks, and generated file names are stored in `summary.json` and `SUMMARY.md` to keep dataset exports clean.

Simplified example:

```json
{
  "itemType": "compliance_matrix_row",
  "requirementId": "REQ-001",
  "requirement": "Proposer must have the ability to provide the services described in this RFP within New York City, including the ability to attend in-person meetings at BPCA offices as requested.",
  "source": "Municipal-Advisory-Services-RFP_Final-RFP_v2.pdf: page 5",
  "responseNeeded": "yes",
  "owner": "",
  "status": "not_started",
  "evidenceNote": "EVID-001",
  "riskLevel": "low"
}
```

The key-value store also contains:

- `SUMMARY.md`: human-readable bid/no-bid brief.
- `summary.json`: machine-readable run summary.
- `compliance_matrix.csv`: Excel-ready compliance matrix.
- `requirements.json`: extracted source-cited requirements.
- `all_rows.json`: advanced debug detail. This intentionally mixes summary, opportunity, document, requirement, compliance, deadline, risk, and clarification records for troubleshooting.

### How much does it cost?

This Actor uses pay-per-event pricing for each completed analysis, plus Apify platform usage. Build runs, test runs, and failed runs can still consume a small amount of platform usage.

To control cost, start with `useLlm: false`, keep `analysisDepth` at `standard`, and set practical limits for `maxAttachments`, `maxPagesPerDocument`, and `maxFileMb`.

### Best practices

- Use direct `attachmentUrls` when you already have the RFP documents; this usually gives the cleanest run.
- Use `samOpportunityUrl` or `noticeId` when you want the Actor to discover public opportunity context.
- Start with `useLlm: false` for predictable, low-cost extraction.
- Download `compliance_matrix.csv` and assign owners/statuses in your proposal workflow.
- Review `SUMMARY.md` before spending time on a full proposal.
- Review the original source documents before submitting anything to an agency.

### Limitations

- Scanned image-only PDFs may produce limited results because OCR is not included in this version.
- Password-protected, private, expired, or blocked attachments may not be accessible.
- The Actor extracts and structures planning intelligence; it does not write a complete proposal.
- The output is analysis support, not legal, procurement, or contracting advice.
- Source citations depend on the quality of the underlying document text.

### FAQ

#### Can I analyze direct RFP attachment URLs instead of a SAM.gov page?

Yes. Use `attachmentUrls` when you have public document links. This is often the fastest and most reliable input mode.

#### Does it work with scanned PDFs?

Not reliably in this version. If a PDF is image-only and has no embedded text, the Actor may return few or no requirements. OCR support is a good next upgrade.

#### Does it generate a complete proposal?

No. It produces a bid/no-bid brief, compliance matrix, deadlines, risks, and planning artifacts. Proposal writing remains a separate workflow.

#### Can I call this Actor by API?

Yes. Use the API tab on the Actor page to run it from your own app, workflow, CRM, or proposal automation tool.

#### Why does all\_rows.json contain many different row types?

`all_rows.json` is a developer/debug artifact. It intentionally includes the run summary, opportunity metadata, documents, raw requirements, compliance rows, deadlines, risks, and clarification questions. For normal proposal work, use `SUMMARY.md`, `summary.json`, `compliance_matrix.csv`, or the default dataset.

### Support

If a public RFP does not parse correctly, open an Actor issue with the run ID, the input JSON, and a short description of what you expected to see. Do not include private proposal material or credentials in public issues.

# Actor input Schema

## `samOpportunityUrl` (type: `string`):

Public SAM.gov opportunity URL to analyze.

## `noticeId` (type: `string`):

SAM.gov notice or opportunity identifier.

## `attachmentUrls` (type: `array`):

Public PDF, DOCX, HTML, or TXT URLs to analyze without SAM.gov lookup.

## `companyProfile` (type: `object`):

Capabilities, certifications, NAICS codes, and past performance keywords used for bid/no-bid context.

## `analysisDepth` (type: `string`):

Controls document and page limits.

## `useLlm` (type: `boolean`):

When true, use an OpenAI-compatible endpoint for summary and risk enrichment.

## `llmApiKey` (type: `string`):

Optional API key for OpenAI-compatible enrichment.

## `llmBaseUrl` (type: `string`):

Optional OpenAI-compatible base URL.

## `maxAttachments` (type: `integer`):

Maximum number of discovered or supplied attachments to analyze.

## `maxPagesPerDocument` (type: `integer`):

Maximum number of pages to extract from each PDF document.

## `maxFileMb` (type: `integer`):

Maximum attachment size to download and extract, in megabytes.

## Actor input object example

```json
{
  "analysisDepth": "standard",
  "useLlm": false,
  "maxAttachments": 10,
  "maxPagesPerDocument": 150,
  "maxFileMb": 25
}
```

# Actor output Schema

## `summaryMarkdown` (type: `string`):

Human-readable bid/no-bid brief with deadlines, compliance preview, top risks, and next steps.

## `complianceMatrix` (type: `string`):

Default dataset rows with one source-cited requirement per row.

## `complianceMatrixCsv` (type: `string`):

Excel-ready compliance matrix generated from source-cited requirements.

## `overview` (type: `string`):

Machine-readable one-row run summary with verdict, deadline, counts, top risks, and generated artifact names.

## `summaryJson` (type: `string`):

Machine-readable run summary.

## `requirementsJson` (type: `string`):

Machine-readable extracted requirements with source references.

## `allRows` (type: `string`):

Developer-oriented raw rows for troubleshooting. This intentionally mixes summary, opportunity, document, requirement, compliance, deadline, risk, and clarification records.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("platinum_closet-owner/sam-gov-rfp-analyzer-apify-actor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("platinum_closet-owner/sam-gov-rfp-analyzer-apify-actor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call platinum_closet-owner/sam-gov-rfp-analyzer-apify-actor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=platinum_closet-owner/sam-gov-rfp-analyzer-apify-actor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Sam Gov Rfp Analyzer Apify Actor",
        "description": "Analyze SAM.gov RFP attachments and turn them into a bid/no-bid brief, source-cited requirements, deadlines, risks, clarification questions, and a compliance matrix CSV.",
        "version": "0.0",
        "x-build-id": "Vm6IyBt7Xpapjnw4K"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/platinum_closet-owner~sam-gov-rfp-analyzer-apify-actor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-platinum_closet-owner-sam-gov-rfp-analyzer-apify-actor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/platinum_closet-owner~sam-gov-rfp-analyzer-apify-actor/runs": {
            "post": {
                "operationId": "runs-sync-platinum_closet-owner-sam-gov-rfp-analyzer-apify-actor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/platinum_closet-owner~sam-gov-rfp-analyzer-apify-actor/run-sync": {
            "post": {
                "operationId": "run-sync-platinum_closet-owner-sam-gov-rfp-analyzer-apify-actor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "samOpportunityUrl": {
                        "title": "SAM.gov opportunity URL",
                        "type": "string",
                        "description": "Public SAM.gov opportunity URL to analyze."
                    },
                    "noticeId": {
                        "title": "SAM.gov notice ID",
                        "type": "string",
                        "description": "SAM.gov notice or opportunity identifier."
                    },
                    "attachmentUrls": {
                        "title": "Direct attachment URLs",
                        "type": "array",
                        "description": "Public PDF, DOCX, HTML, or TXT URLs to analyze without SAM.gov lookup.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "companyProfile": {
                        "title": "Company profile",
                        "type": "object",
                        "description": "Capabilities, certifications, NAICS codes, and past performance keywords used for bid/no-bid context."
                    },
                    "analysisDepth": {
                        "title": "Analysis depth",
                        "enum": [
                            "quick",
                            "standard",
                            "deep"
                        ],
                        "type": "string",
                        "description": "Controls document and page limits.",
                        "default": "standard"
                    },
                    "useLlm": {
                        "title": "Use LLM enrichment",
                        "type": "boolean",
                        "description": "When true, use an OpenAI-compatible endpoint for summary and risk enrichment.",
                        "default": false
                    },
                    "llmApiKey": {
                        "title": "LLM API key",
                        "type": "string",
                        "description": "Optional API key for OpenAI-compatible enrichment."
                    },
                    "llmBaseUrl": {
                        "title": "LLM base URL",
                        "type": "string",
                        "description": "Optional OpenAI-compatible base URL."
                    },
                    "maxAttachments": {
                        "title": "Maximum attachments",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Maximum number of discovered or supplied attachments to analyze.",
                        "default": 10
                    },
                    "maxPagesPerDocument": {
                        "title": "Maximum pages per document",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of pages to extract from each PDF document.",
                        "default": 150
                    },
                    "maxFileMb": {
                        "title": "Maximum file size in MB",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum attachment size to download and extract, in megabytes.",
                        "default": 25
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
