# SAM.gov Contracts Tracker — Federal RFPs, Bids & Award Winners (`griffie/sam-gov-contracts-tracker`) Actor

Federal contract opportunities from SAM.gov (RFPs, RFQs, sources sought) with NAICS, set-aside, deadlines and contracting officer contacts, plus award winners and expiring contracts (recompetes) with incumbents from USAspending. Monitor mode, no API key.

- **URL**: https://apify.com/griffie/sam-gov-contracts-tracker.md
- **Developed by:** [Dustin Griffie](https://apify.com/griffie) (community)
- **Categories:** Lead generation, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 opportunities

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## SAM.gov Contracts Tracker: Federal RFPs, Bids, Award Winners & Recompetes

**Find federal contracts to bid on before your competitors do.** This Actor pulls live contract opportunities from **SAM.gov** (RFPs, RFQs, sources sought, presolicitations and special notices) and returns them as clean rows with **NAICS and PSC codes, set-aside, response deadline, place of performance and the contracting officer's name, email and phone**. Two more modes use official **USAspending.gov** data: **award winners** (who just won what, for how much) and **recompetes** (contracts whose current end date falls in the next 3–18 months, with the incumbent and value).

Run it once for a list, or put it on a schedule with **"only new or changed since the last run"** and get a daily feed of new notices, amendments and deadline changes. No SAM.gov API key, no login.

- 🏛️ **SAM.gov opportunities** with every filter that matters: keywords, NAICS (prefixes work), PSC, set-aside, notice type, agency, place of performance, posted date and response deadline
- 📇 **Contracting officer contacts** on every notice: primary and secondary name, email and phone
- 🔔 **Monitor mode** that catches **amendments and deadline changes**, not just new notices
- 🏆 **Award winners** from USAspending: recipient, UEI, amount, agency, office, NAICS, PSC, set-aside and parent vehicle, which make good subcontracting and teaming leads
- ⏳ **Recompete finder**: contracts ending in your window, soonest or largest first, with the incumbent, obligated value, potential end date and how many offers the last award got
- 📎 **Attachment links** with direct download URLs (optional)
- ⚡ **Fast**: official JSON endpoints and no browser. 50 detailed notices usually take under 15 seconds

***

### Who uses it

- **Small and 8(a), WOSB, SDVOSB and HUBZone contractors** who want a daily list of set-asides in their NAICS codes, without paying for an annual GovCon subscription
- **Business development and capture teams** that track recompetes 6–18 months out and need the incumbent, value and contracting office
- **Proposal writers and consultants** who watch several clients' NAICS codes and agencies
- **Subcontractors and suppliers** who want to know who just won a large award so they can offer to team
- **Sales and market research teams** feeding federal demand into a CRM, Google Sheets, Slack or an AI agent

### Three modes

| Mode | Source | What you get | Typical use |
|---|---|---|---|
| **Opportunities** | SAM.gov | Open notices with deadline, NAICS, PSC, set-aside, place of performance, contacts and description | "New IT set-asides this week", "Construction bids due in Texas" |
| **Award winners** | USAspending.gov | New contract awards with recipient, UEI, amount, agency, office and set-aside | "Awards over $1M this week", "Who is winning janitorial work at the VA" |
| **Recompetes** | USAspending.gov | Contracts whose current end date falls in your window, with incumbent, value, options and offers received | "VA IT contracts ending in the next 18 months" |

### How to use it

1. Pick **What to track**.
2. Add filters such as **NAICS codes**, **Set-asides**, **Agencies** ("VA", "Army", "DHS", "GSA"), **Keywords** or **Place of performance states**. All are optional, but recompetes need at least one NAICS, PSC, agency, keyword or incumbent.
3. Set the date window: **Posted in the last N days** for opportunities, **Awarded in the last N days** for awards, or **Ends between 3 and 18 months from today** for recompetes.
4. Click **Start**. Results appear in the **Opportunities**, **Contacts**, **Award winners** or **Recompetes** table, and you can export them to CSV, Excel or JSON.
5. For a daily feed, turn on **Only new or changed since the last run** and add a schedule.

#### Input example: IT set-asides due in the next three weeks

```json
{
  "mode": "opportunities",
  "naics": ["541511", "541512", "541519"],
  "setAsides": ["SBA", "8A", "SDVOSBC", "WOSB"],
  "noticeTypes": ["o", "k"],
  "responseDueWithinDays": 21,
  "postedWithinDays": 0,
  "maxResults": 100
}
```

#### Output example: one opportunity

```json
{
  "type": "opportunity",
  "noticeId": "2aebeaad0e184a8d995c9f27f2c7fd95",
  "solicitationNumber": "N5523627Q0003",
  "title": "SOLICITATION_SERVICENOW STAFF AUGMENTATION SERVICES _ Amend 0001",
  "noticeType": "Combined Synopsis/Solicitation",
  "postedDate": "2026-11-18T22:19:17.991+00:00",
  "responseDeadline": "2026-11-23T11:00:00-08:00",
  "daysUntilDue": 4,
  "isAmendment": true,
  "department": "DEPT OF DEFENSE",
  "agency": "DEPT OF THE NAVY",
  "office": "SOUTHWEST REGIONAL MAINT CENTER",
  "naics": "541512",
  "psc": "7A20",
  "setAside": "NONE",
  "setAsideDescription": "No set-aside used",
  "placeOfPerformance": { "city": "National City", "state": "CA", "zip": "91950", "country": "USA" },
  "primaryContactName": "Scott Quiambao",
  "primaryContactEmail": "scott.s.quiambao.civ@us.navy.mil",
  "primaryContactPhone": "6195566047",
  "contacts": [{ "type": "primary", "name": "Scott Quiambao", "email": "scott.s.quiambao.civ@us.navy.mil", "phone": "6195566047" }],
  "description": "AMEND 0001 - Proposal due date extended to 23 November 2026, 11:00 AM (Pacific) ...",
  "samUrl": "https://sam.gov/opp/2aebeaad0e184a8d995c9f27f2c7fd95/view"
}
```

#### Output example: one recompete

```json
{
  "type": "expiring-contract",
  "awardId": "36C10B24N0063EHRM",
  "incumbent": "ORACLE HEALTH GOVERNMENT SERVICES, INC.",
  "recipientUei": "DT2KS3HH5FP5",
  "amount": 299999848.61,
  "startDate": "2024-09-30",
  "endDate": "2028-03-10",
  "potentialEndDate": "2028-03-10",
  "monthsToEnd": 15.7,
  "awardingSubAgency": "Department of Veterans Affairs",
  "awardingOffice": "TECHNOLOGY ACQUISITION CENTER NJ (36C10B)",
  "contractType": "DELIVERY ORDER",
  "parentIdv": "36C10B18D5000",
  "naics": "541512",
  "psc": "DA01",
  "extentCompeted": "NOT COMPETED",
  "description": "OPTIMIZATION OF THE EHRM SYSTEM",
  "usaspendingUrl": "https://www.usaspending.gov/award/CONT_AWD_36C10B24N0063EHRM_3600_36C10B18D5000_3600"
}
```

Award-winner rows use the same fields as recompetes, without `incumbent`, `monthsToEnd` and `daysToEnd`.

### Monitor mode: how "only new or changed" works

Turn on **Only new or changed since the last run** and schedule the Actor or a task. Each run remembers what it returned in a named key-value store (`sam-gov-tracker-state`), keyed by your filters or by the **Monitor state key** you choose.

- **New notice:** output as usual.
- **Amendment, new deadline or new title:** output again with `isUpdate: true` and `changedFields` such as `["newVersion", "responseDeadline"]`. That's how you catch a deadline that moved or an RFQ that got a Q\&A amendment.
- **Recompetes and awards:** a contract whose end date or amount changed (for example, an option was exercised) comes back with `changedFields: ["endDate"]`.
- **Unchanged:** skipped, and you pay nothing for it.

The first run returns everything that matches and saves the baseline. Turn off **Include updated items** if you only want brand-new notices.

### Pricing

**Pay per event.** You pay for the rows you get, not for compute time.

| Event | Price | When |
|---|---|---|
| Opportunity | **$0.003** ($0.0025 on Bronze, $0.002 on Silver and higher) | Each SAM.gov notice saved |
| Opportunity details | $0.001 ($0.0008 on Silver and higher plans) | Each notice opened for NAICS, set-aside, contacts and description (on by default) |
| Award winner | $0.002 ($0.0015 on Silver and higher plans) | Each award row |
| Expiring contract (recompete) | $0.008 ($0.006 Bronze, $0.005 Silver, $0.004 Gold and higher) | Each recompete row |
| Actor start | $0.00005 | Once per run |

Examples: 50 detailed opportunities cost about $0.20. A daily monitor that finds 30 new IT notices costs about $0.12 a day. A list of 100 recompetes costs about $0.80.

**Try it free:** Apify's Free plan includes $5 of usage credit every month with no card required. That covers about 1,250 detailed opportunities, or a daily monitor for a few NAICS codes for a month.

### Example tasks

1. [New IT services opportunities this week](https://apify.com/griffie/sam-gov-contracts-tracker/examples/it-services-opportunities-this-week) (NAICS 541511, 541512, 541519)
2. [Small business set-aside RFPs and RFQs](https://apify.com/griffie/sam-gov-contracts-tracker/examples/small-business-set-aside-rfps)
3. [SDVOSB set-aside opportunities](https://apify.com/griffie/sam-gov-contracts-tracker/examples/sdvosb-set-aside-opportunities)
4. [Federal construction bids (NAICS 236, 237, 238)](https://apify.com/griffie/sam-gov-contracts-tracker/examples/federal-construction-bids)
5. [Janitorial and facilities support contracts](https://apify.com/griffie/sam-gov-contracts-tracker/examples/janitorial-facilities-contracts)
6. [Sources sought and RFIs: early pipeline](https://apify.com/griffie/sam-gov-contracts-tracker/examples/sources-sought-rfi-early-pipeline)
7. [Opportunities in Texas due in the next 14 days](https://apify.com/griffie/sam-gov-contracts-tracker/examples/texas-opportunities-due-14-days)
8. [DoD cybersecurity opportunities](https://apify.com/griffie/sam-gov-contracts-tracker/examples/dod-cybersecurity-opportunities)
9. [Federal award winners over $1M this week](https://apify.com/griffie/sam-gov-contracts-tracker/examples/award-winners-over-1m-this-week) (subcontracting leads)
10. [VA IT recompetes in the next 18 months](https://apify.com/griffie/sam-gov-contracts-tracker/examples/va-it-recompetes-18-months)

### Tips and limitations

- **NAICS prefixes** work for opportunities: `236` covers all building construction. For awards and recompetes use full 6-digit codes or 2–4 digit prefixes as USAspending supports them.
- **Keywords** search the full notice text on SAM.gov, so a word buried in the contract clauses can match. Set **Keyword scope** to *Notice title only* for tighter lists.
- **Place of performance** is optional on SAM.gov and many notices leave it blank, so the state filter is strict.
- SAM.gov pages through at most **10,000 notices per search**. Narrow the date range or filters for bigger pulls; the run summary warns you when a search is capped.
- **Award data** comes from USAspending.gov, which usually lags the award by a few days. DoD contract data is published with a 90-day delay by law.
- **Recompete end dates** are the *current* end date and move when options are exercised or a contract is extended. Check `potentialEndDate` and `hasRemainingOptions`. When details are on, the Actor rechecks each contract's latest record and drops any that no longer end in your window.
- Agency names are matched against the official federal hierarchy. See `agencyResolution` in `RUN_SUMMARY` to check what each name matched.

### Use it with Make, n8n, Zapier, Google Sheets or an AI agent

- **On a schedule:** in Apify Console open *Schedules → Create new*, add this Actor or one of the example tasks and pick daily or weekly.
- **Make, Zapier and n8n:** use the official Apify app or node. *Run Actor* (or *Run task*) with the same JSON input, then *Get dataset items* to send new notices to Google Sheets, Airtable, Slack, email or your CRM.
- **Google Sheets, Slack and webhooks:** the Actor's *Integrations* tab can push results when a run finishes, with no code.
- **AI agents (MCP):** Apify's MCP server at `https://mcp.apify.com` exposes Store Actors as tools, so an agent can call `griffie/sam-gov-contracts-tracker` and answer questions like "what VA IT contracts end next year?"
- **From code:**

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("griffie/sam-gov-contracts-tracker").call(run_input={
    "mode": "opportunities", "naics": ["541512"], "setAsides": ["SBA"], "postedWithinDays": 7, "maxResults": 100})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["title"], item["responseDeadline"], item["primaryContactEmail"])
```

### Is it legal to collect this data?

Yes. SAM.gov contract opportunities and USAspending.gov award data are **public U.S. government information** that agencies publish so businesses can find and compete for federal work. This Actor reads the same public endpoints the websites use and doesn't log in or bypass any access control. Notices include the contracting officers' business contact details, published for vendor questions. Use them for that purpose and follow any rules that apply to you, such as CAN-SPAM. This Actor is independent and is not affiliated with or endorsed by GSA, SAM.gov, USAspending.gov or any agency.

### FAQ

**Do I need a SAM.gov API key?** No.

**How fresh is the data?** Opportunities are live: each run reads SAM.gov at that moment. Award data is as fresh as USAspending.gov, usually a few days behind.

**Can I get every active opportunity?** Set **Posted in the last N days** to 0 and raise **Max results**. There are roughly 45,000 active notices, and SAM.gov pages through 10,000 per search, so split very large pulls by NAICS or notice type.

**Why does the same solicitation appear again?** It was amended. In monitor mode the row is flagged with `isUpdate` and `changedFields`.

**What does a recompete row tell me?** Who holds the contract today, how much has been obligated, when the current period ends, whether options remain, which office buys it and how many offers came in last time. That's enough to start capture planning before the follow-on notice is posted.

### Related searches

SAM.gov scraper · SAM.gov API · federal contract opportunities · government RFP finder · federal bids · government contracts scraper · contract opportunities alerts · set-aside opportunities · 8(a) contracts · SDVOSB contracts · WOSB contracts · HUBZone contracts · NAICS contract search · contracting officer contacts · sources sought · federal award winners · USAspending API · recompete tracker · expiring government contracts · incumbent contractor lookup · GovCon leads · federal procurement data

### More Actors from the same developer

- **[Hiring Signals & New Jobs Tracker](https://apify.com/griffie/company-jobs-ats-api)**: see which contract winners are staffing up, from 13 applicant tracking systems.
- **[Redfin Scraper](https://apify.com/griffie/redfin-scraper)**: home listings, sold homes and rentals.
- **[Google Trends Scraper & API](https://apify.com/griffie/google-trends-reliable-scraper)**: bulk interest over time and related queries.

# Actor input Schema

## `mode` (type: `string`):

<b>Opportunities</b> pulls live notices from SAM.gov. <b>Award winners</b> lists newly awarded contracts with the winning company, amount and agency, which are useful for subcontracting and teaming leads. <b>Recompetes</b> lists contracts whose current end date falls in a window you choose, so you can plan bids before the follow-on solicitation appears.

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

Optional. One search per line, combined with OR, e.g. "cybersecurity" or "janitorial services". In Opportunities mode SAM.gov searches the full notice text; switch "Keyword scope" to titles only for tighter matches. In Award and Recompete modes the keywords search award descriptions.

## `keywordMatch` (type: `string`):

How the words inside one keyword line are matched (Opportunities mode).

## `keywordScope` (type: `string`):

Opportunities mode. "Title only" drops notices that mention your keyword only deep in the description or clauses.

## `naics` (type: `array`):

Industry codes. Prefixes work in Opportunities mode: "236" matches all building construction, "5415" all computer systems design. Examples: 541512 IT systems design, 561720 janitorial, 236220 commercial construction, 541330 engineering.

## `psc` (type: `array`):

Product Service Codes, e.g. DA01 (IT application development), R425 (engineering support), S201 (custodial), Z2DA (repair of hospitals). One-letter categories such as "R" also work for opportunities.

## `setAsides` (type: `array`):

Keep only notices or contracts reserved for these small-business programs.

## `agencies` (type: `array`):

Department or agency names or abbreviations, e.g. "VA", "Army", "Navy", "Air Force", "DHS", "GSA", "NASA", "FEMA", "Department of Energy". Each is matched against the official federal hierarchy; the match is shown in RUN_SUMMARY. In Opportunities mode you can also paste a SAM.gov organization ID.

## `placeOfPerformanceStates` (type: `array`):

Two-letter state codes, e.g. TX, VA, CA. Note that many SAM.gov notices leave place of performance empty, so this filter is strict.

## `postedWithinDays` (type: `integer`):

Opportunities posted or amended in this many days. Use 0 for any date (all active notices).

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

Optional absolute start date (YYYY-MM-DD). Overrides "last N days".

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

Optional absolute end date (YYYY-MM-DD).

## `noticeTypes` (type: `array`):

Leave empty for all types. Pick Solicitation and Combined Synopsis/Solicitation for biddable RFPs and RFQs, or Sources Sought and Presolicitation for early pipeline.

## `responseDueWithinDays` (type: `integer`):

Optional. Keep notices whose response deadline is between now and N days from now.

## `responseDueFrom` (type: `string`):

Optional (YYYY-MM-DD).

## `responseDueTo` (type: `string`):

Optional (YYYY-MM-DD).

## `excludePastDue` (type: `boolean`):

Drops notices with a response deadline in the past. Notices without a deadline (special notices, awards) are also dropped when this is on.

## `excludeAmendments` (type: `boolean`):

Only original notices, no amended versions.

## `activeOnly` (type: `boolean`):

Turn off to include archived and inactive notices (use a date range, the archive is very large).

## `includeDetails` (type: `boolean`):

Opens each notice for its NAICS and PSC codes, set-aside, place of performance, contracting officer contacts (name, email, phone), award details and full description. Turn off for a faster, cheaper list from the search index.

## `includeDescription` (type: `boolean`):

Plain-text description of each notice (requires details).

## `includeAttachments` (type: `boolean`):

Lists each notice's files and links with direct download URLs (one extra request per notice).

## `awardedWithinDays` (type: `integer`):

Award winners mode. Date window for the award action.

## `awardDateFrom` (type: `string`):

Optional (YYYY-MM-DD). Overrides "last N days".

## `awardDateTo` (type: `string`):

Optional (YYYY-MM-DD).

## `newAwardsOnly` (type: `boolean`):

Only awards whose first action falls in the window. Turn off to also include modifications to older awards.

## `minAwardAmount` (type: `integer`):

Optional, e.g. 1000000 for awards of $1M or more.

## `maxAwardAmount` (type: `integer`):

Optional.

## `recipientNames` (type: `array`):

Optional. Company names to match, e.g. "Booz Allen". Works in Award and Recompete modes.

## `recipientStates` (type: `array`):

Optional. Two-letter codes for where the winning company is located.

## `awardSort` (type: `string`):

Which awards come first when results are capped.

## `endsInMonthsFrom` (type: `integer`):

Recompete window start. Contracts ending sooner are usually too late to position for.

## `endsInMonthsTo` (type: `integer`):

Recompete window end.

## `endDateFrom` (type: `string`):

Optional absolute window start (YYYY-MM-DD).

## `endDateTo` (type: `string`):

Optional absolute window end (YYYY-MM-DD).

## `minContractValue` (type: `integer`):

Optional, e.g. 250000.

## `recompeteSort` (type: `string`):

Which contracts come first when results are capped.

## `lookbackYears` (type: `integer`):

Contracts with any action in this many years are considered. Raise it to catch long contracts with no recent modifications.

## `includeAwardDetails` (type: `boolean`):

Opens each award record for set-aside, extent competed, number of offers, contracting office, parent IDV and potential end date with all options.

## `onlyNewSinceLastRun` (type: `boolean`):

Monitor mode for schedules. Remembers what earlier runs returned (per filter set, or per state key) and outputs only new items, plus updated ones such as amendments, deadline changes or contract extensions. The first run returns everything and saves the baseline.

## `includeUpdated` (type: `boolean`):

Also output items seen before that changed (new amendment, new deadline, new end date or amount), flagged with isUpdate and changedFields.

## `stateKey` (type: `string`):

Optional name for the monitor memory, e.g. "va-it-daily". Leave empty to derive it from the filters. Use the same key across schedules or tasks that should share memory.

## `maxResults` (type: `integer`):

Upper limit of rows per run. SAM.gov pages through at most 10,000 notices per search.

## `maxConcurrency` (type: `integer`):

Parallel detail requests.

## `debugLog` (type: `boolean`):

Verbose logging.

## Actor input object example

```json
{
  "mode": "opportunities",
  "keywords": [],
  "keywordMatch": "ALL",
  "keywordScope": "anywhere",
  "naics": [
    "541511",
    "541512",
    "541519"
  ],
  "psc": [],
  "setAsides": [],
  "agencies": [],
  "placeOfPerformanceStates": [],
  "postedWithinDays": 7,
  "noticeTypes": [],
  "excludePastDue": false,
  "excludeAmendments": false,
  "activeOnly": true,
  "includeDetails": true,
  "includeDescription": true,
  "includeAttachments": false,
  "awardedWithinDays": 7,
  "newAwardsOnly": true,
  "recipientNames": [],
  "recipientStates": [],
  "awardSort": "largest",
  "endsInMonthsFrom": 3,
  "endsInMonthsTo": 18,
  "recompeteSort": "soonest",
  "lookbackYears": 6,
  "includeAwardDetails": true,
  "onlyNewSinceLastRun": false,
  "includeUpdated": true,
  "maxResults": 50,
  "maxConcurrency": 8,
  "debugLog": false
}
```

# Actor output Schema

## `opportunities` (type: `string`):

Federal opportunities from SAM.gov.

## `contacts` (type: `string`):

Contacts view.

## `awards` (type: `string`):

Award rows (Award winners mode).

## `recompetes` (type: `string`):

Expiring contracts (Recompetes mode).

## `runSummary` (type: `string`):

Matches per query, agency resolution, monitor counts and charge totals.

# 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 = {
    "mode": "opportunities",
    "naics": [
        "541511",
        "541512",
        "541519"
    ],
    "postedWithinDays": 7,
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("griffie/sam-gov-contracts-tracker").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 = {
    "mode": "opportunities",
    "naics": [
        "541511",
        "541512",
        "541519",
    ],
    "postedWithinDays": 7,
    "maxResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("griffie/sam-gov-contracts-tracker").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "mode": "opportunities",
  "naics": [
    "541511",
    "541512",
    "541519"
  ],
  "postedWithinDays": 7,
  "maxResults": 50
}' |
apify call griffie/sam-gov-contracts-tracker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,griffie/sam-gov-contracts-tracker"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/8joP3N27N7QWC3ZEn/builds/DtxPoeZlO5EiU3Cbf/openapi.json
