# WA State Master Contracts - Vendors, Amounts, Diversity (`j0401/wa-master-contracts`) Actor

Washington state master contract sales (245k records / $25.4B): which vendor won, for which customer, quarterly + annual amounts, and diversity flags. Filter by vendor, customer, year, amount, diversity; aggregate who's getting WA's money.

- **URL**: https://apify.com/j0401/wa-master-contracts.md
- **Developed by:** [Wenhao Yang](https://apify.com/j0401) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 wa master contract records

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

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

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

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

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

# README

## WA Procurement Data - Who Gets Washington's Money

**Washington state's government procurement data** - the official `data.wa.gov` open datasets - packaged as clean, queryable, low-cost data layers.

This is the **WA Procurement ecosystem**: every actor answers the question *who is getting Washington's money* - through master contracts, and through long-tail procurement (Amazon Business).

### 👋 Pick the right tool

| Your goal | Start here |
|---|---|
| **Who won master contracts** - vendor, amounts, diversity tiers, quarterly + annual sales, aggregate by contractor/customer | **[WA Master Contracts](https://apify.com/J0401/wa-master-contracts)** (`wa-master-contracts`) - live |
| **Who buys what through Amazon** - agency-level long-tail orders, by category / UNSPSC / date / amount, anomaly monitoring | **[WA Agency Amazon Spend](https://apify.com/J0401/wa-amazon-spend)** (`wa-amazon-spend`) - live |

Both datasets are free public WA state open data; you pay for the **packaged, queryable layer** - not the data itself.

### Predictable, low-cost pricing

- **From $0.001 per record** - a tenth of a cent per record, on free public open data.
- **Charge cap** - every run is capped, so even a full-corpus query can't surprise-bill.
- **Free public source** - no data cost, you pay for packaging + analysis.

***

## WA Master Contracts (`wa-master-contracts`)

Pull **Washington state's master contract sales** - **245,831 records / $25.4B** of quarterly sales, 2015-present.

Built for **AI agents, developers, and market-intelligence users** who need to know *who is getting Washington's money*, at what amounts, across which agencies, and through which diversity-tier vendors.

### What this data is

Each record is one **sales line**: a vendor (`contractorName`) sold to a customer (`customerName`, e.g. a state agency or university) under a master contract (`contractNumber` / `contractTitle`) in a given `year`, with quarterly and annual sales amounts, plus **diversity flags**:

| Field | Meaning |
|---|---|
| `contractorName` | The vendor that won the contract |
| `customerName` / `customerType` | Buying agency / university |
| `contractNumber` / `contractTitle` | The master contract |
| `year` | Sales year (2015-2026) |
| `quarterlySales` / `annualSales` | USD amount (Q1-Q4 + annual total) |
| `diversityFlags` | `smallBusiness`, `vetOwned`, `womanOwned`, `minorityOwned`, `diverseOptions` |

> **Diversity flags are first-class.** Washington's data carries OMWBE categories (`W`=woman-owned, `M`=minority-owned, `MW`=both) plus veteran-owned and small-business flags - so you can filter or aggregate by diversity tier directly, no external join needed.

### Typical questions it answers

- **Who won Washington's money?** Aggregate by contractor -> total sales, year coverage, diversity.
- **What does a specific vendor take?** e.g. `contractorName=MICROSOFT` -> every sales line.
- **Which agencies buy from small businesses?** Filter `diversity=smallBusiness`, group by customer.
- **How does a vendor's take trend across years?** Rows carry `year`; compare year-over-year.
- **Which master contracts are biggest?** Aggregate by contract, sort by `totalSales`.

### Diversity compliance report (`diversityReport`)

The **"Access Equity" compliance angle**: aggregate by customer (agency) or contractor and see how much of each group's spend went to diversity-tier vendors:

| Output field | Meaning |
|---|---|
| `totalSales` / `diversitySales` | Group's total vs diversity spend |
| `pctDiversity` / `pctSmallBusiness` / `pctWomanOwned` / `pctMinorityOwned` / `pctVetOwned` | Share percentages |
| `diversityVendors` | Distinct diversity vendors used |

Example: ENTERPRISE SERVICES DEPT (WA's procurement agency) spends only **~2%** of its $762M on diversity vendors - the kind of compliance signal agencies need to self-audit.

### Inputs (all optional)

| Input | What it does |
|---|---|
| `keywords` | Match any keyword against contractor / customer / contract title |
| `contractorName` | Substring match on vendor name |
| `customerName` | Substring match on agency / university |
| `customerType` | e.g. `State Agency`, `Higher Ed (State Agency)` |
| `contractNumber` | Exact master contract number |
| `year` | Exact sales year (e.g. `2025`) |
| `minAnnualSales` | Only records at or above a dollar amount |
| `diversity` | Only records with a flag set: `smallBusiness` / `womanOwned` / `minorityOwned` / `vetOwned` |
| `aggregate` + `groupBy` | Roll up by `contractor` / `customer` / `contract` -> total sales, years, diversity present |
| `diversityReport` + `reportGroupBy` | Diversity compliance report (see above) |
| `maxResults` | Cap the number of records (default 200) |

### Data source & freshness

- **Source**: [data.wa.gov - WA State Master Contracts](https://data.wa.gov/) (Socrata SODA API, free public, no login).
- **Update cadence**: quarterly - this is *intelligence / analysis* data (who got paid), **not** a real-time bid feed.
- **Coverage**: statewide master contracts only (customer-side); agency-level procurement (WEBS) is behind a login.

# Actor input Schema

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

Only return records whose contractor, customer or contract title matches any keyword (case-insensitive). E.g. "Microsoft", "Lottery", "Fertilizers".

## `contractorName` (type: `string`):

Only return records whose contractor name contains this substring (case-insensitive). E.g. "WILBUR-ELLIS".

## `customerName` (type: `string`):

Only return records whose customer (agency) name contains this substring (case-insensitive). E.g. "UNIV".

## `customerType` (type: `string`):

Only return records for this customer type. Blank = all.

## `contractNumber` (type: `string`):

Only return records under this master contract number (exact). E.g. "00111".

## `year` (type: `string`):

Only return records for this year (exact, e.g. "2025").

## `minAnnualSales` (type: `integer`):

Only return records with annual sales at or above this amount (USD). E.g. 1000000 for $1M+.

## `diversity` (type: `string`):

Only return records where this diversity flag is set. Blank = all. womanOwned/minorityOwned derive from the source's OMWBE category (W / M / MW).

## `aggregate` (type: `boolean`):

When on, returns one summary record per contractor/customer/contract (see groupBy): total sales, record count, years covered, diversity flags present - instead of one record per sales line.

## `groupBy` (type: `string`):

Which dimension to aggregate over (only used when aggregate is on).

## `diversityReport` (type: `boolean`):

When on, returns one row per customer/agency (or contractor, see reportGroupBy) showing how much of its spend went to diversity-tier vendors: total vs diversity sales, per-category amounts (small business / woman-owned / minority-owned / veteran), percentages, and distinct diversity vendors used. The 'Access Equity' compliance angle.

## `reportGroupBy` (type: `string`):

Which dimension the diversity report aggregates over: customer (agency) or contractor. Only used when diversityReport is on.

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

Cap the number of records pushed (0 = unlimited; a full-corpus query can return 245k records and reach the charge cap).

## Actor input object example

```json
{
  "customerType": "",
  "minAnnualSales": 0,
  "diversity": "",
  "aggregate": false,
  "groupBy": "contractor",
  "diversityReport": false,
  "reportGroupBy": "customer",
  "maxResults": 200
}
```

# Actor output Schema

## `recordsUrl` (type: `string`):

Washington master-contract sales records - contractor, customer, contract, year, quarterly + annual sales, diversity flags - as JSON

## `datasetUrl` (type: `string`):

No description

## `runUrl` (type: `string`):

No description

# 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("j0401/wa-master-contracts").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("j0401/wa-master-contracts").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 '{}' |
apify call j0401/wa-master-contracts --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,j0401/wa-master-contracts"
        }
    }
}

```

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/cjA0WHb6v0ebVPjay/builds/ZCyQNdkMVoj5zRjdA/openapi.json
