# Federal Contract Momentum: Gov Awards + Insider Buying (`scrapemint/federal-contract-momentum-pipeline`) Actor

Joins accelerating federal contract awards (USAspending) with insider open-market buying (SEC Form 4), scores 0 to 100, and tiers companies converging, contract\_only, insider\_only, or watch. A contractor winning surging government dollars while insiders buy is the signal. Public data, no API keys.

- **URL**: https://apify.com/scrapemint/federal-contract-momentum-pipeline.md
- **Developed by:** [Ken M](https://apify.com/scrapemint) (community)
- **Categories:** Business, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

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

## Federal Contract Momentum: Gov Awards + Insider Buying

Find public companies that are **winning accelerating federal contract dollars** at the same moment **their own insiders are buying the stock** on the open market. Either signal alone is partial. A surge in federal awards says demand is real and funded; insiders buying says the people closest to the books are putting their own cash in. The edge is the overlap, and this pipeline scores it per company on a 0 to 100 scale.

### What it does

For each ticker you provide, the pipeline joins two independent public sources:

1. **Federal contract momentum** from [USAspending.gov](https://www.usaspending.gov/), the official source of US federal award data. For each recipient name it measures **new** awards (signed inside the recent window) against an equal prior window, so you see whether the company is accelerating, not just how large its backlog is.
2. **Insider open-market buying** from SEC Form 4 (transaction code P), via the `sec-form4-insider-tracker` actor. Open-market purchases are the conviction signal; grants, option exercises, and tax withholding are filtered out.

It then scores convergence and tiers every company:

| Tier | Meaning |
| --- | --- |
| `converging` | Accelerating federal awards **and** insider open-market buying. The premium signal. |
| `contract_only` | New federal award momentum, no insider buying. |
| `insider_only` | Insider open-market buying, no contract momentum. |
| `watch` | Neither leg clears its threshold. |

### Output

One row per company:

```json
{
  "ticker": "LDOS",
  "company": "Leidos",
  "tier": "converging",
  "convergenceScore": 78,
  "scoreBreakdown": { "contracts": 45, "insider": 21, "velocity": 12 },
  "contracts": {
    "recipientsSearched": ["LEIDOS"],
    "windowDays": 90,
    "recentNewAwardCount": 7,
    "recentNewAwardValueUsd": 142000000,
    "priorNewAwardCount": 3,
    "priorNewAwardValueUsd": 41000000,
    "growthRatio": 3.46,
    "newEntrantSurge": false,
    "lastNewAwardDate": "2026-06-02",
    "topNewAwards": [
      { "awardId": "...", "recipient": "LEIDOS, INC.", "agency": "Department of Defense", "amountUsd": 88000000, "startDate": "2026-05-19" }
    ]
  },
  "insider": {
    "lookbackDays": 90,
    "buyCount": 2,
    "sellCount": 0,
    "buyValueUsd": 310000,
    "netValueUsd": 310000,
    "netBuying": true,
    "lastBuyDate": "2026-05-28",
    "topBuys": [ { "insider": "...", "role": "Director", "shares": 1500, "price": 140.2, "valueUsd": 210300, "date": "2026-05-28" } ]
  },
  "scoredAt": "2026-06-11T00:00:00.000Z"
}
````

### Input

| Field | Default | Notes |
| --- | --- | --- |
| `tickers` | `["LDOS","LMT","BAH"]` | Public contractors to scan. |
| `recipientNames` | map | Ticker to USAspending recipient name(s). USAspending lists legal entity names that often differ from the brand, so set this for accurate matching. |
| `companyNames` | map | Ticker to a readable name for labeling. |
| `recentWindowDays` | `90` | Recent award window; momentum compares it against an equal prior window. |
| `insiderLookbackDays` | `90` | Form 4 lookback. |
| `minNewAwardValueUsd` | `1000000` | New award dollars required to count as contract momentum. |
| `includeContracts` / `includeInsider` | `true` | Turn either leg off to score on the other alone. |
| `minScore` | `0` | Drop and never charge companies below this score. |

### Pricing

Pay per result, by tier:

| Event | Price |
| --- | --- |
| Converging company | $0.12 (first one per run free) |
| Single-signal company (`contract_only` or `insider_only`) | $0.06 |
| Watch company | $0.02 |

**Combined cost note.** This pipeline calls the `sec-form4-insider-tracker` actor, which also charges its own small per-event fee (one charge per insider transaction it returns) directly to you. USAspending is queried inline with no extra actor and no proxy. A typical run of a handful of tickers costs a few cents plus the Form 4 transactions found.

### Why the data is trustworthy

Both sources are official and public: USAspending is the federal government's own award database, and Form 4 filings come straight from SEC EDGAR. No API keys, no logins, no scraped HTML, no residential proxy. The recipient name search is fuzzy by design, so set `recipientNames` precisely when a company files under a legal entity name that differs from its ticker brand.

# Actor input Schema

## `tickers` (type: `array`):

Stock tickers of the public contractors to scan, e.g. \["LDOS", "LMT", "BAH"]. The insider leg uses the ticker; the contract leg uses the recipient names below.

## `recipientNames` (type: `object`):

Map of ticker to the USAspending recipient name(s) to search, e.g. {"LDOS": \["LEIDOS"], "LMT": \["LOCKHEED MARTIN"]}. USAspending lists legal entity names, which often differ from the brand. Provide one or more strings per ticker for accurate matching. If omitted, the company name (or ticker) is used.

## `companyNames` (type: `object`):

Map of ticker to a human readable company name, e.g. {"LDOS": "Leidos"}. Used only to label output rows and as a fallback recipient search when no recipientNames entry is given.

## `recentWindowDays` (type: `integer`):

Length of the recent award window. Momentum compares new awards in this window against an equal window immediately before it. 90 = last quarter vs the quarter before.

## `insiderLookbackDays` (type: `integer`):

How far back to pull insider open-market buys and sells from SEC Form 4.

## `minNewAwardValueUsd` (type: `integer`):

A company needs at least this much in new award dollars within the recent window to count as having contract momentum. Below it, contract momentum is treated as absent.

## `includeContracts` (type: `boolean`):

Pull federal contract awards from USAspending. Turn off to score on insider buying alone.

## `includeInsider` (type: `boolean`):

Pull insider open-market buys and sells from SEC Form 4. Turn off to score on contract momentum alone.

## `minScore` (type: `integer`):

Drop and never charge companies scoring below this 0 to 100 threshold. 0 keeps every company with any signal.

## `proxyConfiguration` (type: `object`):

Optional. USAspending and EDGAR are public APIs that do not need a proxy, so the default is no proxy.

## Actor input object example

```json
{
  "tickers": [
    "LDOS",
    "LMT",
    "BAH"
  ],
  "recipientNames": {
    "LDOS": [
      "LEIDOS"
    ],
    "LMT": [
      "LOCKHEED MARTIN"
    ],
    "BAH": [
      "BOOZ ALLEN HAMILTON"
    ]
  },
  "companyNames": {
    "LDOS": "Leidos",
    "LMT": "Lockheed Martin",
    "BAH": "Booz Allen Hamilton"
  },
  "recentWindowDays": 90,
  "insiderLookbackDays": 90,
  "minNewAwardValueUsd": 1000000,
  "includeContracts": true,
  "includeInsider": true,
  "minScore": 0,
  "proxyConfiguration": {
    "useApifyProxy": 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 = {
    "tickers": [
        "LDOS",
        "LMT",
        "BAH"
    ],
    "recipientNames": {
        "LDOS": [
            "LEIDOS"
        ],
        "LMT": [
            "LOCKHEED MARTIN"
        ],
        "BAH": [
            "BOOZ ALLEN HAMILTON"
        ]
    },
    "companyNames": {
        "LDOS": "Leidos",
        "LMT": "Lockheed Martin",
        "BAH": "Booz Allen Hamilton"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapemint/federal-contract-momentum-pipeline").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 = {
    "tickers": [
        "LDOS",
        "LMT",
        "BAH",
    ],
    "recipientNames": {
        "LDOS": ["LEIDOS"],
        "LMT": ["LOCKHEED MARTIN"],
        "BAH": ["BOOZ ALLEN HAMILTON"],
    },
    "companyNames": {
        "LDOS": "Leidos",
        "LMT": "Lockheed Martin",
        "BAH": "Booz Allen Hamilton",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapemint/federal-contract-momentum-pipeline").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 '{
  "tickers": [
    "LDOS",
    "LMT",
    "BAH"
  ],
  "recipientNames": {
    "LDOS": [
      "LEIDOS"
    ],
    "LMT": [
      "LOCKHEED MARTIN"
    ],
    "BAH": [
      "BOOZ ALLEN HAMILTON"
    ]
  },
  "companyNames": {
    "LDOS": "Leidos",
    "LMT": "Lockheed Martin",
    "BAH": "Booz Allen Hamilton"
  }
}' |
apify call scrapemint/federal-contract-momentum-pipeline --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapemint/federal-contract-momentum-pipeline",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Federal Contract Momentum: Gov Awards + Insider Buying",
        "description": "Joins accelerating federal contract awards (USAspending) with insider open-market buying (SEC Form 4), scores 0 to 100, and tiers companies converging, contract_only, insider_only, or watch. A contractor winning surging government dollars while insiders buy is the signal. Public data, no API keys.",
        "version": "0.1",
        "x-build-id": "TkkljtzhRaAkgb8sl"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapemint~federal-contract-momentum-pipeline/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapemint-federal-contract-momentum-pipeline",
                "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/scrapemint~federal-contract-momentum-pipeline/runs": {
            "post": {
                "operationId": "runs-sync-scrapemint-federal-contract-momentum-pipeline",
                "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/scrapemint~federal-contract-momentum-pipeline/run-sync": {
            "post": {
                "operationId": "run-sync-scrapemint-federal-contract-momentum-pipeline",
                "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": {
                    "tickers": {
                        "title": "Tickers",
                        "type": "array",
                        "description": "Stock tickers of the public contractors to scan, e.g. [\"LDOS\", \"LMT\", \"BAH\"]. The insider leg uses the ticker; the contract leg uses the recipient names below.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "recipientNames": {
                        "title": "Recipient names (recommended)",
                        "type": "object",
                        "description": "Map of ticker to the USAspending recipient name(s) to search, e.g. {\"LDOS\": [\"LEIDOS\"], \"LMT\": [\"LOCKHEED MARTIN\"]}. USAspending lists legal entity names, which often differ from the brand. Provide one or more strings per ticker for accurate matching. If omitted, the company name (or ticker) is used.",
                        "default": {}
                    },
                    "companyNames": {
                        "title": "Company names (optional)",
                        "type": "object",
                        "description": "Map of ticker to a human readable company name, e.g. {\"LDOS\": \"Leidos\"}. Used only to label output rows and as a fallback recipient search when no recipientNames entry is given.",
                        "default": {}
                    },
                    "recentWindowDays": {
                        "title": "Recent window (days)",
                        "minimum": 7,
                        "maximum": 365,
                        "type": "integer",
                        "description": "Length of the recent award window. Momentum compares new awards in this window against an equal window immediately before it. 90 = last quarter vs the quarter before.",
                        "default": 90
                    },
                    "insiderLookbackDays": {
                        "title": "Insider lookback (days)",
                        "minimum": 1,
                        "maximum": 365,
                        "type": "integer",
                        "description": "How far back to pull insider open-market buys and sells from SEC Form 4.",
                        "default": 90
                    },
                    "minNewAwardValueUsd": {
                        "title": "Minimum new award value (USD)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "A company needs at least this much in new award dollars within the recent window to count as having contract momentum. Below it, contract momentum is treated as absent.",
                        "default": 1000000
                    },
                    "includeContracts": {
                        "title": "Include federal contracts",
                        "type": "boolean",
                        "description": "Pull federal contract awards from USAspending. Turn off to score on insider buying alone.",
                        "default": true
                    },
                    "includeInsider": {
                        "title": "Include insider buying",
                        "type": "boolean",
                        "description": "Pull insider open-market buys and sells from SEC Form 4. Turn off to score on contract momentum alone.",
                        "default": true
                    },
                    "minScore": {
                        "title": "Minimum convergence score",
                        "minimum": 0,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Drop and never charge companies scoring below this 0 to 100 threshold. 0 keeps every company with any signal.",
                        "default": 0
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Optional. USAspending and EDGAR are public APIs that do not need a proxy, so the default is no proxy.",
                        "default": {
                            "useApifyProxy": 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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
