# USAspending Scraper: Federal Contracts & Grants Awards (`mrslm_data/usaspending-awards`) Actor

Search US federal contract, grant and loan awards on USAspending.gov: recipient, UEI, amount, agency, NAICS, PSC, dates and place of performance.

- **URL**: https://apify.com/mrslm_data/usaspending-awards.md
- **Developed by:** [MRSLM Data](https://apify.com/mrslm_data) (community)
- **Categories:** Lead generation, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 awards

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

## USAspending Scraper: Federal Contracts & Grants Awards

**Search US federal contract, grant and loan awards on USAspending.gov: recipient, UEI, amount, agency, NAICS, PSC, dates and place of performance. $1.00 per 1,000 awards.**

USAspending.gov is the official source for every US federal award: trillions of dollars of contracts, grants and loans. See who wins what, from which agency, in your industry and state.

### Quick start

1. Press **Start**. The form is already filled with this example input, so the first run returns real rows in under a minute:

```json
{
  "keywords": [
    "cybersecurity"
  ],
  "maxResults": 30
}
```

2. Swap in your own values, or call the Actor through the Apify API, Make, Zapier, n8n or the Python/JS clients with the same JSON.
3. Download the results as JSON, CSV or Excel from the **Output** tab, or schedule the run to repeat.

**Full guide: How to Find Federal Contract Awards by NAICS Code and State with the USAspending API (Real Run: IT Contracts in Virginia)**

### What the USAspending Federal Awards Scraper does

The Actor queries USAspending's official public award search API. You choose the award type (contracts, IDVs, grants or loans) and filter by keywords, NAICS codes, PSC codes, agencies, recipient names or UEIs, states of performance, amount range and a date window. Each award becomes one row with the award ID, category and type, recipient name and UEI, award amount, total outlays, description, start and end dates, base obligation date, awarding agency and sub-agency, funding agency, NAICS and PSC codes with descriptions, assistance listings for grants, place of performance, last modified date and links to the award and recipient pages on USAspending.

Results are sorted by amount (largest first) or by newest start date. Records for individuals and redacted or multiple recipients are skipped, so the output only has organisations.

- Contracts, IDVs, grants and loans from the official source.
- Filter by NAICS, PSC, agency, recipient, state and amount.
- Links to every award and recipient page.

### Who it is for

- **Federal contractors**: see who wins the work you bid on, and which agencies buy it.
- **Business development teams**: find incumbents and contracts nearing their end date to target recompetes.
- **Analysts and journalists**: follow federal spending by agency, company or state.
- **Grant seekers**: see which organisations win grants in your program area.

### Real example: the largest IT contracts in Virginia with recent activity

Say you sell IT services to the federal government and want to know the biggest contracts performed in Virginia under NAICS 541512 (computer systems design services) that had an obligation or modification in the last 30 days, at least $1 million each, largest first. You cap it at 25 rows.

#### Step 1: Enter the input

Open the [USAspending Federal Awards Scraper](https://apify.com/mrslm_data/usaspending-awards) in Apify Console, switch the input form to **JSON** and paste this. It is the exact input used for the run in this guide:

```json
{
  "naicsCodes": [
    "541512"
  ],
  "statesOfPerformance": [
    "VA"
  ],
  "awardCategory": "contracts",
  "lastDays": 30,
  "minAmount": 1000000,
  "maxResults": 25
}
```

What each setting does:

- `naicsCodes`: 541512, computer systems design services.
- `statesOfPerformance`: VA, the state where the work is performed.
- `awardCategory`: contracts. IDVs, grants and loans are the other options.
- `lastDays`: 30, awards with an obligation or modification in the last 30 days.
- `minAmount`: 1000000, awards of $1 million or more.
- `maxResults`: 25 rows at most.

#### Step 2: Run it

Press **Start**. On 30 October 2026 this input finished with status `SUCCEEDED` in about 6 seconds and saved 25 rows to the run's dataset. The run was charged 25 `award` events plus one start event, so the bill was $0.0251 on the Free/Bronze tier. USAspending returned a first page of 100 matching awards and the run stopped at the 25-row cap, largest first. No records needed to be skipped.

#### Step 3: Read the output

Here are the first rows of the real dataset, cut to the most useful columns:

| recipientName | awardingAgency | amount | startDate | endDate |
|---|---|---|---|---|
| BOOZ ALLEN HAMILTON INC | Department of Veterans Affairs | 1138891386.64 | 2021-01-08 | 2025-04-15 |
| CACI, INC. - FEDERAL | General Services Administration | 979385697.35 | 2019-05-20 | 2026-11-19 |
| CACI, INC. - FEDERAL | General Services Administration | 977933614.86 | 2024-05-01 | 2027-04-30 |
| ACCENTURE FEDERAL SERVICES LLC | Department of Education | 943157459.01 | 2019-02-20 | 2027-02-19 |
| SALIENT CRGT, INC. | General Services Administration | 919928962.09 | 2024-05-17 | 2029-05-16 |
| ACCENTURE FEDERAL SERVICES LLC | Department of Health and Human Services | 796233862.71 | 2021-07-11 | 2027-01-10 |
| CACI, INC. - FEDERAL | Department of Homeland Security | 714227542.39 | 2024-09-30 | 2027-09-29 |
| BOOZ ALLEN HAMILTON INC | General Services Administration | 710558512.24 | 2024-05-01 | 2027-04-30 |
| SCIENCE APPLICATIONS INTERNATIONAL CORPORATION | Department of Homeland Security | 615526452.02 | 2021-09-15 | 2027-03-16 |
| DELOITTE CONSULTING LLP | Department of Veterans Affairs | 416988484.17 | 2024-08-01 | 2027-10-20 |
| ACCENTURE FEDERAL SERVICES LLC | Department of Education | 383121393.11 | 2025-08-01 | 2031-07-31 |
| ACCENTURE FEDERAL SERVICES LLC | Department of Agriculture | 369247718.81 | 2017-09-19 | 2027-05-31 |

And one full row as JSON (long text shortened with …):

```json
{
  "awardId": "36C10B21N10150056",
  "category": "contracts",
  "awardType": "DELIVERY ORDER",
  "recipientName": "BOOZ ALLEN HAMILTON INC",
  "recipientUei": "KHK6E1JW9C15",
  "amount": 1138891386.64,
  "outlays": 545978010.74,
  "description": "PRODUCT AND TECHNOLOGY ECOSYSTEM MANAGEMENT SERVICES (PTEMS)WHICH INCLUDES PRODUCT DELIVERY AND LIFECYCLE MANAGEMENT TO TRANSFORM VA BY TAPPING INTO EMERGING TE…",
  "startDate": "2021-01-08",
  "endDate": "2025-04-15",
  "baseObligationDate": "2021-01-07",
  "awardingAgency": "Department of Veterans Affairs",
  "awardingSubAgency": "Department of Veterans Affairs",
  "fundingAgency": "Department of Veterans Affairs",
  "naicsCode": "541512",
  "naicsDescription": "COMPUTER SYSTEMS DESIGN SERVICES",
  "pscCode": "DA01",
  "pscDescription": "IT AND TELECOM - BUSINESS APPLICATION/APPLICATION DEVELOPMENT SUPPORT SERVICES (LABOR)",
  "placeOfPerformanceState": "VA",
  "placeOfPerformanceCountry": "USA",
  "lastModified": "2026-10-21 13:07:06",
  "url": "https://www.usaspending.gov/award/CONT_AWD_36C10B21N10150056_3600_VA11816D1015_3600",
  "recipientUrl": "https://www.usaspending.gov/recipient/30b32b62-ffbf-d7e6-5b9d-95a295b95a6d-C/latest"
}
```

What the 25 real awards show:

- **$12.1 billion in 25 awards.** The largest is Booz Allen Hamilton's $1.14 billion Department of Veterans Affairs order for product and technology ecosystem management, and the smallest in the top 25 is CGI Federal's $149 million GSA order. All are well above the $1 million minimum, because the list is sorted largest first.
- **Accenture Federal Services appears 8 times**, followed by CACI with 4, and Booz Allen, SAIC and CGI Federal with 2 each.
- **GSA is the biggest buyer here.** 10 of the 25 are from the General Services Administration's Federal Acquisition Service, which buys IT on behalf of other agencies, followed by Homeland Security (5, all U.S. Customs and Border Protection), Veterans Affairs (4) and Education (3).
- **Recent activity does not mean a new award.** Most of these started years ago (the oldest, Accenture's USDA cloud hosting order, in 2017), and two had already passed their end date (Booz Allen's VA order ended in April 2025, ManTech's CBP order in September 2026) but were modified this month. Use **sortBy** newest, or check `startDate`, to find new awards.
- **Outlays can be zero or negative.** All 10 GSA orders and two new orders show zero or negative `outlays`, while their award amounts are in the hundreds of millions. `amount` is the obligated award amount and `outlays` is what has been paid out as reported, so do not read zero outlays as zero spending.

`amount` is the award's total obligated amount over its life, not the amount obligated in the last 30 days. The date window only decides which awards are included.

### NAICS, PSC and the date window

NAICS codes describe the industry of the work (541512 computer systems design, 541511 custom programming, 541519 other computer services). PSC codes describe the product or service bought (DA01 application development, D399 other IT services), and are often more precise. Both apply to contracts and IDVs only. For grants, use keywords, agencies and the assistance listings.

**lastDays** includes awards with any obligation or modification in the window, which suits a monitor of active contracts. For a fixed period, set **startDate** and **endDate** instead. An IDV (indefinite delivery vehicle) is the parent contract that orders are placed under, so search contracts for the orders and IDVs for the vehicles.

### Output fields

Each row in the dataset has these fields. The example column shows a value from the run above.

| Field | What it means | Example from this run |
|---|---|---|
| `awardId / url` | Award ID (PIID or FAIN) and the USAspending award page. | 36C10B21N10150056 / https://www.usaspending.gov/award/CONT_AWD_36C10B21N10150056… |
| `category / awardType` | contracts, idvs, grants or loans; and the type, for example DELIVERY ORDER or DEFINITIVE CONTRACT. | contracts / DELIVERY ORDER |
| `recipientName / recipientUei / recipientUrl` | The company or organisation, its Unique Entity ID and its USAspending page. | BOOZ ALLEN HAMILTON INC / KHK6E1JW9C15 / https://www.usaspending.gov/recipient/30b32b62-ffbf-d7e6-5b9… |
| `amount / outlays` | Total obligated award amount and total outlays, in US dollars. | 1138891386.64 / 545978010.74 |
| `description` | Award description as entered by the agency. | PRODUCT AND TECHNOLOGY ECOSYSTEM MANAGEMENT SERVICES (PTEMS)… |
| `startDate / endDate / baseObligationDate` | Period of performance and first obligation date. | 2021-01-08 / 2025-04-15 / 2021-01-07 |
| `awardingAgency / awardingSubAgency / fundingAgency` | Who awarded and who pays. | Department of Veterans Affairs / Department of Veterans Affairs / Department of Veterans Affairs |
| `naicsCode / naicsDescription / pscCode / pscDescription` | Industry and product or service codes. | 541512 / COMPUTER SYSTEMS DESIGN SERVICES / DA01 / IT AND TELECOM - BUSINESS APPLICATION/APPLICATION DEVELOPMEN… |
| `assistanceListings` | Assistance listing (CFDA) programs, for grants. | \[] (empty in every row) |
| `placeOfPerformanceState / placeOfPerformanceCountry` | Where the work is done. | VA / USA |
| `lastModified` | When USAspending last updated the award. | 2026-10-21 13:07:06 |

### Export federal awards to CSV, Excel or Google Sheets

Every run saves its rows to a dataset, and a dataset can be downloaded in any common format. You do not need to write code for this.

**From Apify Console.** Open the run, go to the **Output** tab and click **Export**. Pick CSV, Excel (XLSX), JSON, XML, HTML or RSS. You can tick only the columns you want, for example `awardId`, `recipientName`, `amount`, `awardingAgency`, `awardingSubAgency`. Nested values such as lists are flattened into columns like `assistanceListings/0` in CSV and Excel.

**From a URL.** The same export is a plain HTTPS link. Replace `<DATASET_ID>` with the dataset ID shown on the run's Storage tab:

```bash
## CSV with just the columns you need
curl -H "Authorization: Bearer $APIFY_TOKEN" \
  "https://api.apify.com/v2/datasets/<DATASET_ID>/items?format=csv&clean=1&fields=awardId,recipientName,amount,awardingAgency,awardingSubAgency,startDate,endDate,naicsCode,pscCode,url" -o federal-awards.csv

## Excel
curl -H "Authorization: Bearer $APIFY_TOKEN" \
  "https://api.apify.com/v2/datasets/<DATASET_ID>/items?format=xlsx&clean=1" -o federal-awards.xlsx
```

**Into Google Sheets.** You have three good options:

1. **One-off:** download the CSV and use **File > Import > Upload** in Google Sheets. Choose "Replace current sheet" to refresh an existing tab.
2. **Automatic, no code:** in Make, Zapier or n8n, use the Apify app's "Watch Actor runs" (or "Run Actor") trigger, then "Get dataset items", then the Google Sheets "Add row" action. Every scheduled run then lands in your sheet. Apify's own [Google Sheets Import & Export](https://apify.com/lukaskrivka/google-sheets) Actor can also append a dataset to a sheet, and you can chain it to this Actor's runs with an integration.
3. **Formula:** `=IMPORTDATA("https://api.apify.com/v2/actor-tasks/<USERNAME>~<TASK_NAME>/runs/last/dataset/items?status=SUCCEEDED&format=csv&token=<YOUR_TOKEN>")` always pulls the latest successful run of a saved task. The token sits in the formula, so anyone who can open the sheet can see it. Only use this in a private sheet.

### Schedule it to run every Monday at 7 AM

USAspending loads new data from the federal procurement system continuously, with some delay. A weekly run with **lastDays** set to 7 or 8 shows every award that changed that week; sort by newest to see new ones first.

1. In the Actor's input form, set up the input from Step 1 and click **Save as new task**. Give it a clear name such as `va-it-awards-weekly`.
2. Go to **Schedules > Create new**, set the cron expression to `0 7 * * 1` and pick your timezone, so it runs every Monday at 7 AM.
3. Add the task to the schedule and save. Each run gets its own fresh dataset.
4. Optional: on the task's **Integrations** tab, add a webhook, Slack or email notification for "Run succeeded", or connect Make, Zapier or n8n, so the new rows go where you need them.

To fetch the newest results without looking up a run ID, use the task's last-run link: `https://api.apify.com/v2/actor-tasks/<USERNAME>~va-it-awards-weekly/runs/last/dataset/items?status=SUCCEEDED&format=json`.

### Call it from the API (Python, JavaScript or curl)

You can start the Actor from your own code with the official Apify clients. Put your API token (Console > Settings > API & Integrations) in an environment variable called `APIFY_TOKEN` rather than in the code.

**Python** (`pip install "apify-client>=3"`). Tested with apify-client 3.4:

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run_input = {
    "naicsCodes": [
        "541512"
    ],
    "statesOfPerformance": [
        "VA"
    ],
    "awardCategory": "contracts",
    "lastDays": 30,
    "minAmount": 1000000,
    "maxResults": 25
}

run = client.actor("mrslm_data/usaspending-awards").call(run_input=run_input)

## apify-client 3.x returns a Run object, so use run.default_dataset_id
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item["recipientName"], item["amount"])
```

In apify-client 3.x, `call()` returns a typed object. Older examples that use `run["defaultDatasetId"]` were written for 1.x and 2.x and fail in 3.x with `TypeError: 'Run' object is not subscriptable`.

**JavaScript / Node.js** (`npm install apify-client`):

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const input = {
    "naicsCodes": [
        "541512"
    ],
    "statesOfPerformance": [
        "VA"
    ],
    "awardCategory": "contracts",
    "lastDays": 30,
    "minAmount": 1000000,
    "maxResults": 25
};

const run = await client.actor('mrslm_data/usaspending-awards').call(input);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.length, items[0]);
```

**curl**, one request that runs the Actor and returns the rows as CSV (it waits up to 5 minutes, so keep the input small):

```bash
curl -X POST "https://api.apify.com/v2/acts/mrslm_data~usaspending-awards/run-sync-get-dataset-items?format=csv" \
  -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
  -d '{"naicsCodes": ["541512"], "statesOfPerformance": ["VA"], "awardCategory": "contracts", "lastDays": 30, "minAmount": 1000000, "maxResults": 25}' -o federal-awards.csv
```

### What it costs

The Actor uses pay-per-event pricing. **Award**: $1.00 per 1,000 on the Free and Bronze tiers, $0.90 on Silver and $0.80 on Gold. Each run also has a start fee of $0.00005 per GB of memory (one event at the default memory). You are not billed separately for compute on normal runs: the event prices are the whole bill.

#### Price per event

Current pay-per-event prices for this Actor on Apify, by Apify subscription plan:

| Event (per 1,000) | Free / Bronze | Silver | Gold / Platinum / Diamond |
|---|---|---|---|
| Award (`award`) | $1.00 | $0.90 | $0.80 |
| Actor start (once per run at the default memory, not per 1,000) | $0.00005 | $0.00005 | $0.00005 |

You are charged only for the events in this table: nothing for compute, and nothing for searches that return no rows beyond the start fee.

| Scenario | Free / Bronze | Silver | Gold |
|---|---|---|---|
| The run in this guide (25 awards) | $0.0251 | $0.0226 | $0.0201 |
| Weekly run, ~100 awards a week (4 runs) | $0.40 | $0.36 | $0.32 |
| One-off: all awards over $1M for a NAICS code in a year (~3,000) | $3.00 | $2.70 | $2.40 |
| Monthly run for 20 competitors (~2,000 awards) | $2.00 | $1.80 | $1.60 |

To cap spending, set **Maximum cost per run** in the run options (or `maxTotalChargeUsd` in the API). The Actor stops cleanly at the cap and you are never billed past it. Raise **minAmount** to skip small awards you do not need.

### Limits

- USAspending data comes from agency reporting and arrives with a delay; recent awards can be missing or change later.
- Each search returns at most 10,000 awards (100 pages of 100). Narrow the filters for more.
- Awards to individuals, redacted recipients and multiple-recipient records are skipped.
- Subawards are not included.
- Contract opportunities (open bids) are not on USAspending; they are on SAM.gov.

### FAQ

**Is this the same data as USAspending.gov?**
Yes. It comes from the official USAspending API, and every row links to its award page there.

**Can I find contracts that are about to end?**
Yes. Export with `endDate` and sort by it. Contracts ending in the next year are often recompeted.

**Can I search for one company's awards?**
Yes. Put its name or UEI in **recipientNames**.

**Does it show open solicitations?**
No. USAspending shows awards made. Open bids are on SAM.gov.

**Do you have EU or UK tenders?**
Yes: [TED EU Tenders](https://apify.com/mrslm_data/ted-eu-tenders) and [UK Public Tenders](https://apify.com/mrslm_data/uk-public-tenders).

**Can I run it on a schedule?**
Yes. Save your input as a task and attach a schedule, as shown above. Each run is independent and returns the federal awards available at that moment.

**Does it work with Make, Zapier or n8n?**
Yes. All three have an Apify app. Use "Run Actor" (or run a saved task), then "Get dataset items" to pass the rows to the next step, such as Google Sheets, Airtable, a CRM or Slack.

**Can AI agents use it through MCP?**
Yes. Apify's hosted MCP server can expose this Actor as a tool to any MCP client (Claude Desktop, Cursor, VS Code and others). Add `https://mcp.apify.com/?tools=mrslm_data/usaspending-awards` as a remote MCP server and sign in with your Apify account or API token. The agent fills in the same input fields shown above and gets the same rows back, billed at the same per-event prices.

### Is it legal?

This Actor only reads official open-data APIs that the publisher offers to everyone without a login or key. It obeys robots.txt, stays under the published rate limits, and never tries to get past logins, paywalls, captchas or bot checks. Awards to individuals, redacted recipients and aggregate "multiple recipients" records are skipped, so every row is an award to an organisation. You are responsible for how you use the data: follow the source's licence and terms and the privacy and marketing laws that apply to you (GDPR, CAN-SPAM, PECR, etc.). This tool is independent and not affiliated with or endorsed by the data publisher.

# Actor input Schema

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

Search award descriptions and recipients, one search per line.

## `awardCategory` (type: `string`):

Which kind of award to search.

## `naicsCodes` (type: `array`):

Contracts and IDVs only, e.g. 541512 (computer systems design).

## `pscCodes` (type: `array`):

Product and service codes, contracts and IDVs only, e.g. D310.

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

Top-tier agency names, e.g. Department of Homeland Security.

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

Search by recipient company name or UEI.

## `statesOfPerformance` (type: `array`):

2-letter US state codes, e.g. VA, TX.

## `minAmount` (type: `integer`):

0 = no minimum.

## `maxAmount` (type: `integer`):

0 = no maximum.

## `lastDays` (type: `integer`):

Awards with activity (obligations or modifications) in the last N days.

## `startDate` (type: `string`):

Optional fixed window start (YYYY-MM-DD). Overrides "Activity within".

## `endDate` (type: `string`):

Optional fixed window end (YYYY-MM-DD). Default today.

## `sortBy` (type: `string`):

Largest awards first, or most recent start date first.

## `maxResultsPerSearch` (type: `integer`):

Cap per search term (or per source). 0 = no cap.

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

Safety cap on saved awards across the whole run. 0 = no cap. Your max cost per run is always respected.

## Actor input object example

```json
{
  "keywords": [
    "cybersecurity"
  ],
  "awardCategory": "contracts",
  "minAmount": 0,
  "maxAmount": 0,
  "lastDays": 90,
  "sortBy": "amount",
  "maxResultsPerSearch": 0,
  "maxResults": 30
}
```

# Actor output Schema

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

All awards as a dataset (JSON, CSV, Excel and more via the API or Console).

## `summary` (type: `string`):

Matches and saved rows per search, failures and the stop reason.

# 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 = {
    "keywords": [
        "cybersecurity"
    ],
    "maxResults": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("mrslm_data/usaspending-awards").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 = {
    "keywords": ["cybersecurity"],
    "maxResults": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("mrslm_data/usaspending-awards").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 '{
  "keywords": [
    "cybersecurity"
  ],
  "maxResults": 30
}' |
apify call mrslm_data/usaspending-awards --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mrslm_data/usaspending-awards"
        }
    }
}
```

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/eavDuoxMYuBFyFGN2/builds/M1ckmyh8yTyrOUjFH/openapi.json
