# TED, SAM.gov & Grants Bid Alerts Scraper (`taroyamada/procurement-intel-actor`) Actor

Start with a TED-only quickstart, then scrape TED tenders, SAM.gov opportunities, and grants notices into one public-sector bid-alert dataset with deadlines, buyers, values, award watch, rebid watch signals, and webhook-ready summaries.

- **URL**: https://apify.com/taroyamada/procurement-intel-actor.md
- **Developed by:** [naoki anzai](https://apify.com/taroyamada) (community)
- **Categories:** Business, Automation
- **Stats:** 9 total users, 2 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 results

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 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

## TED, SAM.gov & Grants Bid Alerts Scraper

<!-- v37-internal-flow-boost:start -->


> ✅ **Reliability note (June 2026)**: Infrastructure upgraded June 2026 — any run failures from an account capacity limit in early May 2026 are fully resolved. Runs are now stable. If you tried this actor in early May and hit a failure, please give it another run — it works smoothly now.

### After this run

Turn this Actor's output into a capped paid report with [Public RFP Rebid Watch Report](https://apify.com/taroyamada/public-rfp-rebid-watch-report?utm_source=apify_internal&utm_medium=readme_after_run&utm_campaign=v37_internal_flow&utm_content=procurement-intel-actor__public-rfp-rebid-watch-report).
Use it when small business development, proposal, and public-sector sales teams need to decide whether a public notice is worth tracking for rebid timing and pursuit research.

- First report: $9 / `rfp_snapshot_report`; set `maxChargeUsd` to $9.
- Deeper report: $29 / `rebid_timing_report`; use only when the first result needs competitor or action-depth.
- This is an internal Apify flow aid. It is not revenue proof until accounted paid usage appears.
<!-- v37-internal-flow-boost:end -->

<!-- v30-traffic-cta:start -->
### Next report-style Actors

If you already have data from this Actor, these follow-on Actors turn public or user-provided inputs into decision-ready reports. They are optional, capped by `maxChargeUsd`, and do not make business outcome claims.

- [ATS Hiring Signal Report](https://apify.com/taroyamada/ats-hiring-signal-report) - turn public hiring boards into company and role-priority signals for account research.
- [Public RFP Rebid Watch Report](https://apify.com/taroyamada/public-rfp-rebid-watch-report) - turn pasted public notices into rebid timing and watch reports without user API keys.
- [CSV Local Business List Scoring](https://apify.com/taroyamada/csv-local-business-list-scoring-report) - prioritize public or user-provided business lists for follow-up.
- [SaaS Pricing Page Monitor](https://apify.com/taroyamada/saas-pricing-page-change-monitor) - watch public vendor pricing and packaging pages.

<!-- v30-traffic-cta:end -->


Scrape TED tenders, SAM.gov opportunities, and Grants.gov notices into one public-sector bid-alert dataset. Each run returns buyer names, deadlines, estimated values, signal tags, recommended actions, award-watch hints, rebid signals, and explicit warnings when a source is missing a key or degraded.

### Store Quickstart

- Start with `jurisdictions: "eu"` for a TED-only bid-alert run that requires no external key.
- Use `keywords`, `cpvCodes`, `daysAhead`, and `minValue` to keep the first dataset focused.
- Add `jurisdictions: "us"` when you have a SAM.gov API key.
- Add `jurisdictions: "grants"` for Grants.gov funding notices and deadline/status alerts.
- Set `delivery: "webhook"` only after the dataset shape is trusted.

Runtime: Node.js 20+. Use `dryRun: true` to validate inputs without dataset writes or webhook delivery.

#### Second-pillar upsell ladder

Start with the TED-only quickstart. Add SAM.gov, grants, award watch, rebid watch, and webhook routing only when the initial bid-alert queue is useful enough to justify broader coverage.

### What You Get

A normal run returns:

1. `meta.executiveSummary` - current queue size, top buyers, review urgency, and source mix.
2. `notices[]` - one normalized tender or grant row per opportunity.
3. `alerts[]` - deadline, status, closing-soon, award-watch, or rebid events when enabled.
4. `warnings[]` / `errors[]` - missing API keys, skipped sources, throttling, or degraded upstream responses.

### Key Features

- 📋 **Summary-first procurement queue** — Executive summary, top opportunities, top buyers, and next actions before raw notice scrolling
- 🇪🇺🇺🇸🎯 **Multi-source public-sector coverage** — TED first, then SAM.gov and Simpler.Grants.gov when the starter lane proves useful
- 🚨 **Bid-alert prioritization** — Deadline pressure, value, award/rebid phrasing, and watch-term hits roll into the review queue
- 🔁 **Recurring watch workflows** — Award watch, rebid watch, grants deadline/status deltas, and buyer/incumbent monitoring
- ⚠️ **Honest degraded behavior** — Missing keys, throttled sources, and zero-result lanes show up as warnings instead of fake completeness
- 📡 **Dataset or webhook delivery** — Keep validation low-friction with dataset output, then route action-needed rows downstream

### Use Cases

| Who | Why |
|-----|-----|
| Business development teams | Turn TED and federal opportunity noise into one shortlist of current bids worth opening today |
| Capture / bid managers | Spot deadline pressure, strategic-value tenders, award-watch rows, and rebid hints in one queue |
| Public-sector consultants | Keep a reusable buyer/framework watchlist without maintaining source-specific scrapers |
| RevOps / automation teams | Push recurring procurement summaries into CRM, Slack, webhook routers, or internal dashboards |
| Grants teams | Add closing-soon and status-delta alerts once the TED starter lane is already useful |

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| jurisdictions | string | `"eu"` | Keep `eu` for the first success path. Add `grants` next, then `us` once you have a SAM.gov key. |
| keywords | string | `"cloud,cybersecurity,IT services"` | Starter search terms for TED titles and future SAM/grants expansion. Keep them narrow enough that the first queue feels reviewable. |
| watchTerms | string | — | Add after the first useful run to highlight buyers, incumbents, frameworks, or competitor names. |
| cpvCodes | string | `"72000000,72220000"` | Starter TED filter for software / IT services. |
| naicsCodes | string | `"541512,541519"` | Optional SAM.gov filter for the US federal expansion lane. |
| minValue | number | `100000` | Hide lower-value notices when an estimate exists so the starter queue stays commercially relevant. |
| daysAhead | integer | `21` | Keep the first run focused on near-term deadlines. |
| maxItemsPerSource | integer | `40` | Tighter first-run cap so proof stays cheap and reviewable. |
| delivery | string | `"dataset"` | Start with dataset. Move to webhook after the queue and downstream schema are validated. |
| includeAwarded | boolean | `false` | Leave off for starter/open-opportunity runs. Enable once award watch or rebid monitoring matters. |

#### Input Example

```json
{
  "jurisdictions": "eu",
  "keywords": "cloud,cybersecurity,IT services",
  "cpvCodes": "72000000,72220000",
  "daysAhead": 21,
  "maxItemsPerSource": 40,
  "minValue": 100000,
  "delivery": "dataset"
}
````

### Input Examples

#### Example: Federal IT services in Q3

```json
{
  "sources": [
    "sam.gov"
  ],
  "query": "IT services",
  "postedAfter": "2026-07-01",
  "noticeType": [
    "Solicitation",
    "Combined Synopsis/Solicitation"
  ],
  "maxResults": 50
}
```

#### Example: EU TED contract awards

```json
{
  "sources": [
    "ted-eu"
  ],
  "query": "construction services",
  "noticeType": [
    "Contract award notice"
  ],
  "minValueEur": 1000000,
  "maxResults": 50
}
```

#### Example: Grants.gov small-business RFPs

```json
{
  "sources": [
    "grants-gov"
  ],
  "categories": [
    "Health",
    "Education"
  ],
  "setAside": "Small Business",
  "maxResults": 50
}
```

### Output

The actor returns a summary-first payload with four top-level surfaces:

| Field | Type | Why it matters |
|-------|------|----------------|
| `meta.executiveSummary` | object | Tells you whether the run is `stable`, `watch`, or `action_needed`, plus top buyers, top opportunities, and next actions |
| `meta.warnings` | array | Makes skipped, partial, throttled, or degraded source conditions explicit |
| `meta.upgradeGuidance` | object | Preserves the TED-first lane and only nudges toward SAM, grants, recurring delivery, or adjacent workflows when signals are meaningful |
| `notices` | array | Normalized tender / grant rows with `daysUntilDeadline`, `estimatedValue`, `signalTags`, `lanePriority`, and `recommendedAction` |
| `alerts` | array | Recurring delta events such as `deadline_changed`, `status_changed`, or `closing_soon` |

#### PPE compatibility map

The PPE names are compatibility labels for the existing public payload; they do **not** replace the stable JSON keys buyers already consume. Dataset delivery attaches the `opportunity_record` event name to each `notices[]` row through `Actor.pushData(row, "opportunity_record")`; `procurement_summary` and `alert_event` remain additive compatibility surfaces under `meta` and `alerts[]`.

| PPE concept | Stable output surface | Compatibility note |
|-------------|-----------------------|--------------------|
| `procurement_summary` | `meta.executiveSummary`, with upgrade context in `meta.upgradeGuidance` | Summary fields stay under `meta` so existing dataset consumers keep working. |
| `opportunity_record` | each row in `notices[]` | Normalized TED / SAM.gov / grants rows keep `source`, `noticeId`, `title`, `buyer`, `deadlineAt`, `estimatedValue`, `signalTags`, `lanePriority`, and `recommendedAction`. |
| `alert_event` | each row in `alerts[]` plus per-notice `alertEvents` for grants deltas | Recurring grants deadline/status/closing-soon events remain additive; empty starter runs still return `alerts: []`. |

Compatibility guardrail: the actor continues to return top-level `meta`, `errors`, `notices`, and `alerts`. It does not emit top-level `procurement_summary`, `opportunity_record`, or `alert_event` aliases, so current integrations are not forced through a rename.

#### Output Example

```json
{
  "meta": {
    "generatedAt": "2026-04-23T11:48:39.536Z",
    "now": "2026-04-23T11:48:37.305Z",
    "warnings": [],
    "executiveSummary": {
      "overallStatus": "action_needed",
      "brief": "Tracked 40 tender / grant notice(s) this run. 1 notice(s) need same-day bid review. Source mix: 40 TED.",
      "recommendedCadence": "daily",
      "trackedNoticeCount": 40,
      "immediateReviewCount": 1,
      "strategicValueCount": 14,
      "sourceMix": {
        "ted": 40
      }
    }
  },
  "notices": [
    {
      "source": "ted",
      "noticeId": "c97dfecb-0cf9-4ba7-800d-685dbd87bbda",
      "title": "Sweden – IT services: consulting, software development, Internet and support – Upphandling - IT-konsulttjänster ramavtal",
      "buyer": "Transportstyrelsen",
      "deadlineAt": "2026-04-23T22:00:00.000Z",
      "estimatedValue": 736000000,
      "urgencyLevel": "critical",
      "signalTags": [
        "urgent_deadline",
        "strategic_value"
      ],
      "lanePriority": "now",
      "recommendedAction": "Triage before the deadline"
    }
  ],
  "alerts": []
}
```

The fuller starter payload is in `sample-output.example.json`.

### Proof buyers can inspect

| Buyer question | Proof asset | What it proves |
|----------------|-------------|----------------|
| "Will the cheapest first run already surface useful work?" | `store-input.example.json` + `sample-output.example.json` | The starter lane is real: **40 TED notices**, **1 same-day review**, and **14 strategic-value rows** from the exact quickstart input |
| "Does the recurring production surface actually work live?" | `live-proof.example.json` | Current canary and contract checks passed on the live task surface, with a sanitized sample from a **117-result** recurring run |
| "Will missing paid sources be hidden?" | `warnings[]`, `errors[]`, and `meta.upgradeGuidance` in the payload | No — skipped, partial, throttled, or degraded source conditions are surfaced explicitly instead of being treated as complete coverage |

### API Usage

Run this actor programmatically using the Apify API. Replace `YOUR_API_TOKEN` with your token from [Apify Console → Settings → Integrations](https://console.apify.com/account/integrations).

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/taroyamada~procurement-intel-actor/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "jurisdictions": "eu", "keywords": "cloud,cybersecurity,IT services", "cpvCodes": "72000000,72220000", "daysAhead": 21, "maxItemsPerSource": 40, "minValue": 100000, "delivery": "dataset" }'
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("taroyamada/procurement-intel-actor").call(run_input={
  "jurisdictions": "eu",
  "keywords": "cloud,cybersecurity,IT services",
  "cpvCodes": "72000000,72220000",
  "daysAhead": 21,
  "maxItemsPerSource": 40,
  "minValue": 100000,
  "delivery": "dataset"
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

#### JavaScript / Node.js

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

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('taroyamada/procurement-intel-actor').call({
  "jurisdictions": "eu",
  "keywords": "cloud,cybersecurity,IT services",
  "cpvCodes": "72000000,72220000",
  "daysAhead": 21,
  "maxItemsPerSource": 40,
  "minValue": 100000,
  "delivery": "dataset"
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### Tips & Limitations

- Start TED-only before you add SAM.gov or grants. That is the lowest-support path and the best first proof.
- SAM.gov and grants are additive, not required. If a source is skipped, throttled, or returns zero rows, the actor keeps the run honest through `warnings` / `errors`.
- Watch terms work best after the starter lane already produces useful buyers or frameworks. Otherwise they add noise before they add insight.
- Grants deadline/status alerts rely on saved state, so recurring runs matter more than one-off tests.
- Use dataset delivery first. Promote to webhook only after you trust the row shape and internal routing schema.

### FAQ

**What is the best first run?**

Use `store-input.example.json` unchanged: TED-only, dataset delivery, no SAM.gov key, and a tight 21-day window.

**What happens if SAM.gov or grants are unavailable?**

The actor does not pretend coverage is complete. It returns the useful sources it could fetch, then surfaces explicit warnings or source errors for the missing lane.

**How do I rotate the SAM.gov API key without breaking the scheduled task?**

1. Reveal the replacement key in your SAM.gov account's **Public API Key / Account Details** area.
2. Rotate it locally and resync the Apify task in one step:

```bash
npm run rotate:sam-key -- SAM-REPLACEMENT-KEY
```

3. Recheck with `npm run canary:check` and `npm run contract:test:live`.

**When should I enable award watch or rebid watch?**

After the starter or recurring TED queue already proves useful. Those workflows are best when you care about incumbent movement, renewals, or follow-on phrasing more than net-new open bids.

**How are duplicates handled?**

The actor normalizes notices and deduplicates them across comparable identifiers so recurring queues stay cleaner when similar records appear across sources.

**Can I schedule recurring bid alerts?**

Yes. The current `live-proof.example.json` comes from the production task / schedule surface, and the actor is designed for daily or weekly recurring runs.

### Related Actors

Upgrade into adjacent procurement workflows only when the shortlist proves useful:

- [Government Contract Award Monitor](https://apify.com/taroyamada/government-contract-award-monitor) — Move here when awarded notices, incumbents, and post-award competitor tracking matter more than open-bid discovery.
- [Vendor Pricing, Terms & Renewal Watch API](https://apify.com/taroyamada/vendor-change-monitor) — Add this when shortlisted vendors, subcontractors, or software suppliers need pricing / terms change monitoring ahead of negotiation.
- [USPTO Patent Monitor API | JSON + Webhook](https://apify.com/taroyamada/uspto-patent-scraper) — Use as optional technical diligence when a buyer wants invention or filing context around a shortlisted vendor or solution area.

### Pricing & Cost Control

**Pay Per Event**:

- `actor-start`: flat fee per run, defined in `store-ops/pricing-plan.json` and the Apify pricing tab.
- `dataset-item`: per-output-item event, defined in `store-ops/pricing-plan.json` and the Apify pricing tab.

Apify Store pricing is usage-based, so spend mainly follows how many notices you return and when you expand from the TED-first starter lane into broader source coverage or delivery routing. Check the live Apify pricing tab before publishing customer-facing estimates.

- Keep `jurisdictions="eu"`, `daysAhead=21`, and `maxItemsPerSource=40` for the cheapest proof path.
- Tighten keywords, CPV codes, NAICS filters, or watch terms before you raise the per-source cap.
- Add SAM.gov or grants only when the starter queue is already useful enough to justify a broader source mix.
- Keep `delivery="dataset"` until humans trust the row shape; use webhook routing once the queue is stable.

No subscription required — you only pay for what you use.

> 💾 **Save it for later**: click the bookmark icon at the top of the Apify Store page if you'd like to come back to it. Bookmarks help other engineers find this actor via Apify's discovery surfaces.

### ⭐ Was TED, SAM.gov & Grants Bid Alerts Scraper useful for your public-sector procurement watch?

If this actor saved you time, **[please leave a 5★ rating on Apify Store](https://apify.com/taroyamada/procurement-intel-actor/reviews)** — it takes 10 seconds, helps other engineers and analysts discover it, and keeps updates free.

Have a feature request, bug, or sample workflow you'd like to share? **[Open an issue](https://apify.com/taroyamada/procurement-intel-actor/issues)** — we read every one and use them to prioritise the next release.

### Supplier Enrichment Follow-Up

After finding opportunities, awards, or rebid signals, use [Industrial Supplier Intelligence](https://apify.com/taroyamada/industrial-supplier-intelligence) to enrich known supplier websites into procurement-ready profiles with capabilities, certifications, locations, contact pages, confidence, and explicit PPE billing fields.

Use [Public Vendor Registry Intelligence](https://apify.com/taroyamada/public-vendor-registry-intelligence) when the next step is vendor onboarding evidence: registration portals, supplier requirements, documents, eligibility language, and public contact paths.

### Adjacent Public-Data Research

For pharma / biotech / CRO competitive intelligence using a different public-data source, see [ClinicalTrials.gov Sponsor Pipeline Scraper](https://apify.com/taroyamada/clinical-trials-pipeline-monitor) — same B2B research / investment / public-data buyer cluster, different data source (NIH ClinicalTrials.gov API v2 with sponsor canonicalization and differential event rows).

### Premium Report Pack

Use these premium report actors when a raw dataset is ready to become a buyer-facing audit, watch summary, or agency deliverable. All three keep `sourceDatasetId` as advanced-only; first runs should use pasted input, URLs, demo mode, and `reportTier`.

- [CSV Local Business List Scoring & SEO Gap Report](https://apify.com/taroyamada/csv-local-business-list-scoring-report) - Score pasted local business CSV lists and produce agency-ready lead/SEO gap reports.
- [SaaS Pricing Page Monitor & Competitor Price Change Alerts](https://apify.com/taroyamada/saas-pricing-page-change-monitor) - Turn public pricing pages into snapshots, competitor reports, and weekly pricing watch summaries.
- [Ad Landing Page Offer Intelligence & CRO Gap Report](https://apify.com/taroyamada/ad-landing-page-offer-intelligence) - Analyze user-provided landing pages and pasted ad copy for offer, CTA, proof, and CRO gaps.

Recommended flow from this actor: run the current extraction/check first, export the useful dataset or copy the relevant URLs, then choose `entry`, `premium`, or `bundle` in the report actor with `maxChargeUsd` as the safety cap.

### RFP / Rebid Report Follow-Up

When an opportunity shortlist needs buyer-facing analysis, use [Public RFP Rebid Watch Report](https://apify.com/taroyamada/public-rfp-rebid-watch-report). Paste public notice or award text first; keep `sourceDatasetId` for advanced workflows. Start with `snapshot` ($9), move to `rebid_timing` ($29) only when incumbent, recompete, deadline, or award evidence is present. The $79 watch summary remains proof-gated.

### Related report Actors

Use these follow-on Actors when you want a capped, decision-ready report instead of more raw rows. They use public or user-provided inputs, respect `maxChargeUsd`, and do not promise rankings, revenue, conversion lifts, or sales outcomes.

- [Public RFP Rebid Watch Report](https://apify.com/taroyamada/public-rfp-rebid-watch-report) - turn pasted public notices into rebid timing and watch reports without a user API key.
- [CSV Local Business List Scoring](https://apify.com/taroyamada/csv-local-business-list-scoring-report) - prioritize public or user-provided supplier/business lists for follow-up.

### Related paid report workflows

If this Actor gave you raw rows or source context, these follow-on report Actors are designed for a small capped paid run. They help make a decision, not just collect more data.

- [Public RFP Rebid Watch Report](https://apify.com/taroyamada/public-rfp-rebid-watch-report) - decide whether a public notice is worth tracking for rebid timing and pursuit research. Entry $9 / `rfp_snapshot_report`; premium $29 / `rebid_timing_report`.
- [CSV Local Business List Scoring & SEO Gap Report](https://apify.com/taroyamada/csv-local-business-list-scoring-report) - prioritize which businesses in a list deserve outreach, cleanup, or SEO follow-up. Entry $3 / `lead_scoring_report`; premium $15 / `agency_lead_gap_report`.

Keep `maxChargeUsd` equal to the selected tier. Internal links are traffic aids only; real proof requires accounted paid usage.

# Actor input Schema

## `jurisdictions` (type: `string`):

Use eu for TED tenders, grants for Grants.gov notices, and us for SAM.gov opportunities. If us is present without a SAM.gov key, the actor warns and skips that source instead of failing the whole run.

## `keywords` (type: `string`):

Themes sent to TED notice titles, SAM.gov opportunity titles, and Grants.gov queries. Keep terms narrow enough to return a reviewable bid-alert queue.

## `watchTerms` (type: `string`):

Highlights buyers, incumbents, frameworks, or competitor terms in summaries and notice signals without changing upstream source queries.

## `cpvCodes` (type: `string`):

Optional TED filters for public-sector tender categories.

## `naicsCodes` (type: `string`):

Optional SAM.gov NAICS filters for the US federal opportunity lane.

## `tedFields` (type: `string`):

Requested TED API fields used to explain buyer, deadline, value, and notice type.

## `minValue` (type: `number`):

Hide smaller notices when an estimated value is present.

## `daysAhead` (type: `integer`):

Keep notices closing within this window so the dataset reads like a current bid-alert queue.

## `maxItemsPerSource` (type: `integer`):

Upper bound fetched per source request.

## `delivery` (type: `string`):

Use dataset for review runs or webhook for downstream routing.

## `webhookUrl` (type: `string`):

Required only when delivery is webhook.

## `includeAwarded` (type: `boolean`):

Turn this on for award watch, incumbent movement, or rebid monitoring.

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

SAM.gov API key from Account Details. If missing, the actor warns and skips the US lane instead of failing the whole run.

## `samApiUrl` (type: `string`):

SAM opportunities endpoint used for the US federal lane.

## `tedApiUrl` (type: `string`):

TED notices search endpoint.

## `grantsApiKey` (type: `string`):

Optional X-API-Key header for Simpler.Grants.gov requests.

## `grantsApiUrl` (type: `string`):

Simpler.Grants.gov opportunities search endpoint.

## `grantsApplicantTypes` (type: `string`):

Optional Simpler.Grants.gov applicant\_type filters for the grants lane.

## `grantsFundingInstruments` (type: `string`):

Optional Simpler.Grants.gov funding\_instrument filters for the grants expansion path.

## `grantsOpportunityStatuses` (type: `string`):

Optional Simpler.Grants.gov opportunity\_status filters such as posted or forecasted.

## `grantsAlertClosingSoonDays` (type: `integer`):

For recurring grants runs, emit a closing\_soon alert when a tracked grant crosses inside this deadline window.

## `grantsAlertStateStoreName` (type: `string`):

Named Apify key-value store used to persist grants snapshots across recurring runs so deadline and status alerts stay comparable.

## `grantsAlertStateKey` (type: `string`):

Optional override for the grants snapshot key. Leave blank to auto-derive a stable key from grants filters and keywords.

## `samFixturePath` (type: `string`):

Local JSON fixture path for offline SAM verification.

## `tedFixturePath` (type: `string`):

Local JSON fixture path for offline TED verification.

## `grantsFixturePath` (type: `string`):

Local JSON fixture path for offline Simpler.Grants.gov verification.

## `nowIso` (type: `string`):

Optional deterministic run time override for fixtures and repeatable validation.

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

Skip dataset writes and webhook delivery side effects while validating inputs.

## Actor input object example

```json
{
  "jurisdictions": "eu",
  "keywords": "cloud,cybersecurity,IT services",
  "cpvCodes": "72000000,72220000",
  "naicsCodes": "541512,541519",
  "tedFields": "notice-identifier,notice-title,publication-date,deadline,buyer-name,buyer-country,estimated-value-proc,classification-cpv,notice-type",
  "minValue": 100000,
  "daysAhead": 21,
  "maxItemsPerSource": 40,
  "delivery": "dataset",
  "includeAwarded": false,
  "samApiUrl": "https://api.sam.gov/opportunities/v2/search",
  "tedApiUrl": "https://api.ted.europa.eu/v3/notices/search",
  "grantsApiUrl": "https://api.simpler.grants.gov/v1/opportunities/search",
  "grantsOpportunityStatuses": "posted,forecasted",
  "grantsAlertClosingSoonDays": 7,
  "grantsAlertStateStoreName": "procurement-intel-grants-state",
  "dryRun": false
}
```

# 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("taroyamada/procurement-intel-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("taroyamada/procurement-intel-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 taroyamada/procurement-intel-actor --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TED, SAM.gov & Grants Bid Alerts Scraper",
        "description": "Start with a TED-only quickstart, then scrape TED tenders, SAM.gov opportunities, and grants notices into one public-sector bid-alert dataset with deadlines, buyers, values, award watch, rebid watch signals, and webhook-ready summaries.",
        "version": "0.1",
        "x-build-id": "pCSkreF62f55dRLZq"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/taroyamada~procurement-intel-actor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-taroyamada-procurement-intel-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/taroyamada~procurement-intel-actor/runs": {
            "post": {
                "operationId": "runs-sync-taroyamada-procurement-intel-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/taroyamada~procurement-intel-actor/run-sync": {
            "post": {
                "operationId": "run-sync-taroyamada-procurement-intel-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": {
                    "jurisdictions": {
                        "title": "Sources to search (comma-separated)",
                        "type": "string",
                        "description": "Use eu for TED tenders, grants for Grants.gov notices, and us for SAM.gov opportunities. If us is present without a SAM.gov key, the actor warns and skips that source instead of failing the whole run.",
                        "default": "eu"
                    },
                    "keywords": {
                        "title": "Search terms (comma-separated)",
                        "type": "string",
                        "description": "Themes sent to TED notice titles, SAM.gov opportunity titles, and Grants.gov queries. Keep terms narrow enough to return a reviewable bid-alert queue.",
                        "default": "cloud,cybersecurity,IT services"
                    },
                    "watchTerms": {
                        "title": "Watch terms (comma-separated)",
                        "type": "string",
                        "description": "Highlights buyers, incumbents, frameworks, or competitor terms in summaries and notice signals without changing upstream source queries."
                    },
                    "cpvCodes": {
                        "title": "TED CPV codes (comma-separated)",
                        "type": "string",
                        "description": "Optional TED filters for public-sector tender categories.",
                        "default": "72000000,72220000"
                    },
                    "naicsCodes": {
                        "title": "SAM.gov NAICS codes (comma-separated)",
                        "type": "string",
                        "description": "Optional SAM.gov NAICS filters for the US federal opportunity lane.",
                        "default": "541512,541519"
                    },
                    "tedFields": {
                        "title": "TED fields (comma-separated)",
                        "type": "string",
                        "description": "Requested TED API fields used to explain buyer, deadline, value, and notice type.",
                        "default": "notice-identifier,notice-title,publication-date,deadline,buyer-name,buyer-country,estimated-value-proc,classification-cpv,notice-type"
                    },
                    "minValue": {
                        "title": "Minimum estimated value",
                        "minimum": 0,
                        "type": "number",
                        "description": "Hide smaller notices when an estimated value is present.",
                        "default": 100000
                    },
                    "daysAhead": {
                        "title": "Deadline window (days)",
                        "minimum": 1,
                        "maximum": 365,
                        "type": "integer",
                        "description": "Keep notices closing within this window so the dataset reads like a current bid-alert queue.",
                        "default": 21
                    },
                    "maxItemsPerSource": {
                        "title": "Max items per source",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Upper bound fetched per source request.",
                        "default": 40
                    },
                    "delivery": {
                        "title": "Delivery mode",
                        "enum": [
                            "dataset",
                            "webhook"
                        ],
                        "type": "string",
                        "description": "Use dataset for review runs or webhook for downstream routing.",
                        "default": "dataset"
                    },
                    "webhookUrl": {
                        "title": "Webhook URL",
                        "type": "string",
                        "description": "Required only when delivery is webhook."
                    },
                    "includeAwarded": {
                        "title": "Include awarded / closed notices",
                        "type": "boolean",
                        "description": "Turn this on for award watch, incumbent movement, or rebid monitoring.",
                        "default": false
                    },
                    "samApiKey": {
                        "title": "SAM.gov API key",
                        "type": "string",
                        "description": "SAM.gov API key from Account Details. If missing, the actor warns and skips the US lane instead of failing the whole run."
                    },
                    "samApiUrl": {
                        "title": "SAM.gov API URL",
                        "type": "string",
                        "description": "SAM opportunities endpoint used for the US federal lane.",
                        "default": "https://api.sam.gov/opportunities/v2/search"
                    },
                    "tedApiUrl": {
                        "title": "TED API URL",
                        "type": "string",
                        "description": "TED notices search endpoint.",
                        "default": "https://api.ted.europa.eu/v3/notices/search"
                    },
                    "grantsApiKey": {
                        "title": "Grants.gov API key",
                        "type": "string",
                        "description": "Optional X-API-Key header for Simpler.Grants.gov requests."
                    },
                    "grantsApiUrl": {
                        "title": "Grants.gov API URL",
                        "type": "string",
                        "description": "Simpler.Grants.gov opportunities search endpoint.",
                        "default": "https://api.simpler.grants.gov/v1/opportunities/search"
                    },
                    "grantsApplicantTypes": {
                        "title": "Grants applicant types (comma-separated)",
                        "type": "string",
                        "description": "Optional Simpler.Grants.gov applicant_type filters for the grants lane."
                    },
                    "grantsFundingInstruments": {
                        "title": "Grants funding instruments (comma-separated)",
                        "type": "string",
                        "description": "Optional Simpler.Grants.gov funding_instrument filters for the grants expansion path."
                    },
                    "grantsOpportunityStatuses": {
                        "title": "Grants statuses (comma-separated)",
                        "type": "string",
                        "description": "Optional Simpler.Grants.gov opportunity_status filters such as posted or forecasted.",
                        "default": "posted,forecasted"
                    },
                    "grantsAlertClosingSoonDays": {
                        "title": "Grants closing-soon threshold (days)",
                        "minimum": 1,
                        "maximum": 90,
                        "type": "integer",
                        "description": "For recurring grants runs, emit a closing_soon alert when a tracked grant crosses inside this deadline window.",
                        "default": 7
                    },
                    "grantsAlertStateStoreName": {
                        "title": "Grants alert state store name",
                        "type": "string",
                        "description": "Named Apify key-value store used to persist grants snapshots across recurring runs so deadline and status alerts stay comparable.",
                        "default": "procurement-intel-grants-state"
                    },
                    "grantsAlertStateKey": {
                        "title": "Grants alert state key",
                        "type": "string",
                        "description": "Optional override for the grants snapshot key. Leave blank to auto-derive a stable key from grants filters and keywords."
                    },
                    "samFixturePath": {
                        "title": "Testing: SAM fixture path",
                        "type": "string",
                        "description": "Local JSON fixture path for offline SAM verification."
                    },
                    "tedFixturePath": {
                        "title": "Testing: TED fixture path",
                        "type": "string",
                        "description": "Local JSON fixture path for offline TED verification."
                    },
                    "grantsFixturePath": {
                        "title": "Testing: Grants fixture path",
                        "type": "string",
                        "description": "Local JSON fixture path for offline Simpler.Grants.gov verification."
                    },
                    "nowIso": {
                        "title": "Testing: Override current time (ISO)",
                        "type": "string",
                        "description": "Optional deterministic run time override for fixtures and repeatable validation."
                    },
                    "dryRun": {
                        "title": "Testing: Dry run",
                        "type": "boolean",
                        "description": "Skip dataset writes and webhook delivery side effects while validating inputs.",
                        "default": false
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
