# Public Procurement Intelligence (`junipr/public-procurement-intelligence`) Actor

Monitor public procurement opportunities, awards, forecasts, and deadline changes from official sources.

- **URL**: https://apify.com/junipr/public-procurement-intelligence.md
- **Developed by:** [junipr](https://apify.com/junipr) (community)
- **Categories:** Automation, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $9.80 / 1,000 opportunity record checkeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Public Procurement Intelligence

### Store Positioning

**Store title:** Public Procurement Intelligence

**Short description:** Monitor public procurement opportunities, awards, forecasts, and deadline changes from official sources.

**SEO title:** Public Procurement Intelligence — premium B2B monitoring and intelligence workflow

**SEO description:** Monitor public procurement opportunities, awards, forecasts, and deadline changes from official sources. Use it for high-value B2B workflows where trustworthy evidence, prioritization, and executive reporting matter.

**Categories:** AUTOMATION, NEWS

**Keywords:** public, procurement, intelligence, change monitor, public data, high-ticket specialized b2b workflow

### Fixed-Inclusive PPE Pricing

This actor uses pay-per-event pricing. Event prices include Apify platform usage; users are not expected to pay a separate platform-usage pass-through charge for the configured pricing model.

- Tier: P1 — High-ticket specialized B2B workflow
- Primary event: `opportunity-record-checked` at $0.00980 base
- Default max charge: $50.00
- Store discounts: FREE/BRONZE base, SILVER discounted, GOLD deepest approved discount

Event set:

- `actor-start`: base $0.05000, GOLD $0.04400. Public Procurement Intelligence: charged when actor start is completed. The price includes Apify platform usage; no separate usage pass-through is intended.
- `opportunity-record-checked`: base $0.00980, GOLD $0.00862. Public Procurement Intelligence: charged when opportunity record checked is completed. The price includes Apify platform usage; no separate usage pass-through is intended.
- `high-value-event-detected`: base $0.01950, GOLD $0.01720. Public Procurement Intelligence: charged when high value event detected is completed. The price includes Apify platform usage; no separate usage pass-through is intended.
- `executive-report-generated`: base $0.50000, GOLD $0.44000. Public Procurement Intelligence: charged when executive report generated is completed. The price includes Apify platform usage; no separate usage pass-through is intended.

### Public Task Concepts

- Compare previous and current Public Procurement snapshots
- Monitor Public Procurement changes for a capped watchlist
- Build a Public Procurement change digest from supplied evidence
- Prioritize high-impact Public Procurement changes
- Export Public Procurement change rows for client review

### What does Public Procurement Intelligence do?

Public Procurement Intelligence normalizes public procurement opportunity, award, and forecast snapshots into structured Apify dataset rows with deadline, change, keyword, agency, amount, and recommendation fields.

The actor is fixture-first and safe by default: the default run makes no network calls. You can paste records from official sources, compare previous and current snapshots, or later enable capped official-source fetch modes when credentials and budget are available.

Official source references:

- SAM.gov Get Opportunities Public API: https://open.gsa.gov/api/get-opportunities-public-api/
- USAspending API: https://api.usaspending.gov/
- USAspending endpoints reference: https://api.usaspending.gov/docs/endpoints

SAM.gov's public opportunities API requires an API key and date parameters. USAspending exposes federal award data through a public API that currently does not require authorization. This actor documents those paths but keeps fetch mode off by default to avoid surprise API usage.

### Use Cases

- Watch public opportunity snapshots for changed response deadlines.
- Normalize SAM.gov-style notices and USAspending-style award rows into one dataset shape.
- Highlight opportunity records matching target keywords such as `software`, `data`, or `analytics`.
- Review award amount, recipient, agency, and NAICS fields for competitive intelligence.
- Prepare procurement monitoring datasets for CRM, bid/no-bid, partner, or recompete workflows.

### Input Example

```json
{
  "records": [
    {
      "source": "sam.gov",
      "noticeId": "SAM-24-001",
      "title": "Cloud data platform modernization support",
      "agency": "General Services Administration",
      "type": "opportunity",
      "responseDeadLine": "2026-07-12T17:00:00Z",
      "description": "Seeking software, data engineering, analytics, and dashboard modernization services."
    }
  ],
  "previousRecords": [
    {
      "source": "sam.gov",
      "noticeId": "SAM-24-001",
      "title": "Cloud data platform modernization support",
      "type": "opportunity",
      "responseDeadLine": "2026-07-08T17:00:00Z"
    }
  ],
  "keywords": ["software", "data", "analytics"],
  "fetchMode": "none",
  "maxRecords": 10,
  "includeReport": true
}
```

### Output Example

```json
{
  "procurementId": "e2e6c6e7b0657ad2",
  "source": "sam.gov",
  "sourceId": "SAM-24-001",
  "recordType": "opportunity",
  "title": "Cloud data platform modernization support",
  "agency": "General Services Administration",
  "responseDeadline": "2026-07-12T17:00:00.000Z",
  "daysUntilDeadline": 11,
  "deadlineStatus": "closing-soon",
  "changeType": "deadline-changed",
  "changedFields": ["responseDeadline"],
  "severity": "warning",
  "keywordMatches": ["analytics", "data", "software"],
  "recommendation": "Review the changed response deadline and update capture, bid/no-bid, or partner reminders."
}
```

The default dataset contains one row per normalized procurement record. The key-value store includes:

- `PUBLIC_PROCUREMENT_RESULTS.json`
- `PUBLIC_PROCUREMENT_SUMMARY.json`
- `PUBLIC_PROCUREMENT_REPORT.md`

### Fetch Modes

`fetchMode: "none"` is the default and recommended Store quality-test path. It uses supplied records or the tiny built-in fixture.

`fetchMode: "usaspending_awards"` is a capped optional adapter for the official USAspending award search endpoint. It requires `userAgentContact`, `searchQuery`, and date bounds for responsible use.

`fetchMode: "sam_gov_opportunities"` is a capped optional adapter for the official SAM.gov Get Opportunities API. It requires `samApiKey`, `userAgentContact`, `postedFrom`, and `postedTo`. SAM.gov expects date parameters in `MM/dd/yyyy`; this actor accepts `YYYY-MM-DD` and converts them before the request.

Do not put API keys in public task inputs, README examples, screenshots, reports, or committed files.

### Limitations

- This is not a bid recommendation engine and does not guarantee opportunity fit, award outcomes, or compliance.
- The actor normalizes common SAM.gov and USAspending shapes, but public data fields can vary by notice type.
- Default runs do not fetch live public data.
- Optional official API fetch modes are capped and should be tested with tiny limits first.
- Contact details, PII enrichment, private vendor intelligence, and non-public procurement systems are intentionally out of scope.

### Troubleshooting

- Empty output usually means the supplied records array was empty and `fetchMode` was not configured, or the official API returned no records.
- For SAM.gov fetches, verify the API key and date range. SAM.gov requires `postedFrom` and `postedTo`.
- For USAspending fetches, start with a narrow keyword and date range.
- If the report is missing, check whether the `executive-report-generated` event limit was reached.

### FAQ

#### Does the default actor run spend API credits?

No. The default path uses fixture data and local normalization only.

#### Can this scrape SAM.gov pages?

No. It uses snapshot inputs by default and an optional official API adapter. It does not browser-scrape SAM.gov.

#### Does it collect contact emails or personal data?

No. It focuses on public opportunity, award, deadline, agency, recipient, NAICS, amount, and status fields.

#### Is USAspending fetch supported without an API key?

The official USAspending API is public and does not currently require authorization, but this actor still requires a `userAgentContact` when fetch mode is enabled.

### Changelog

- `1.0.0`: Initial local-first build with SAM.gov/USAspending-style normalization, previous/current deadline comparison, official-source fetch adapters, PPE billing, examples, and fixture tests.

# Actor input Schema

## `records` (type: `array`):

Current procurement opportunity, award, or forecast records. Accepts normalized rows, SAM.gov-like opportunities, or USAspending-like award rows.

## `previousRecords` (type: `array`):

Optional previous snapshot used to detect deadline, status, amount, and recipient changes.

## `keywords` (type: `array`):

Terms to highlight in titles and descriptions.

## `fetchMode` (type: `string`):

Optional official-source fetch mode. Defaults to none for safe local and Store quality runs.

## `samApiKey` (type: `string`):

Required only for fetchMode=sam\_gov\_opportunities. Do not put secrets in public task inputs.

## `userAgentContact` (type: `string`):

Contact email or URL for official-source API requests. Required when fetchMode is not none.

## `searchQuery` (type: `string`):

Keyword search for optional fetch modes.

## `postedFrom` (type: `string`):

Optional YYYY-MM-DD lower date bound for fetch modes.

## `postedTo` (type: `string`):

Optional YYYY-MM-DD upper date bound for fetch modes.

## `maxRecords` (type: `integer`):

Maximum records to normalize and emit.

## `closingSoonDays` (type: `integer`):

Deadline window that marks open opportunities as closing soon.

## `maxItems` (type: `integer`):

Alias for Max Targets/Maximum Records used by the Junipr actor baseline. When both are provided, actor-specific limits still apply.

## `includeReport` (type: `boolean`):

Store normalized results, summary JSON, and Markdown report in the default key-value store.

## `dryRun` (type: `boolean`):

Validate input and write a dry-run summary without PPE charges or dataset output.

## `debug` (type: `boolean`):

Enable verbose normalization logs.

## Actor input object example

```json
{
  "records": [],
  "previousRecords": [],
  "keywords": [
    "software",
    "data",
    "analytics"
  ],
  "fetchMode": "none",
  "samApiKey": "",
  "userAgentContact": "",
  "searchQuery": "software",
  "postedFrom": "",
  "postedTo": "",
  "maxRecords": 10,
  "closingSoonDays": 14,
  "maxItems": 1,
  "includeReport": true,
  "dryRun": false,
  "debug": false
}
```

# Actor output Schema

## `results` (type: `string`):

Each dataset row is one normalized public procurement record with change, deadline, keyword, and recommendation fields.

## `resultsJson` (type: `string`):

Full JSON array of normalized procurement intelligence rows.

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

Run-level counts by source, record type, deadline status, agency, and severity.

## `summaryReport` (type: `string`):

Markdown report describing priority procurement changes and upcoming deadlines.

# 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("junipr/public-procurement-intelligence").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("junipr/public-procurement-intelligence").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 junipr/public-procurement-intelligence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=junipr/public-procurement-intelligence",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/Iw43sy9jQxYJ7ph1Y/builds/GBGS0vOdb71Q5XRFt/openapi.json
