# Global Tender Match (`formnexa/global-tender-match`) Actor

Find and rank open U.S. federal contract opportunities for a business, with similar historical awards.

- **URL**: https://apify.com/formnexa/global-tender-match.md
- **Developed by:** [formnexa Tools](https://apify.com/formnexa) (community)
- **Categories:** Business, Lead generation
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 matched tender opportunities

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are 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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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

## Global Tender Match

Global Tender Match is an Apify Actor that finds open U.S. federal contract opportunities and ranks them for a specific business. It combines current notices from SAM.gov with comparable historical contract awards from USAspending.gov.

It does not use a paid AI API. Matching is deterministic, explainable, and inexpensive to run.

### What it returns

Each dataset item contains:

- a 0-100 match score and plain-English scoring reasons;
- title, solicitation number, NAICS code, agency, dates, set-aside, contacts, and SAM.gov link;
- the amount published by SAM.gov, when one exists (many open notices do not include an estimated value);
- top comparable historical awards, recipient names, values, descriptions, and USAspending links;
- source labels and retrieval time.

### Required setup

SAM.gov's public Opportunities API requires a personal API key. A registered SAM.gov user can request one from **Account Details**. The key is entered through the Actor's secret `samApiKey` field and is never written to the dataset or run summary.

USAspending currently requires no authorization.

Official references:

- [SAM.gov Get Opportunities Public API](https://open.gsa.gov/api/get-opportunities-public-api/)
- [USAspending API endpoints](https://api.usaspending.gov/docs/endpoints)
- [Apify Actor input schemas](https://docs.apify.com/actors/development/actor-definition/input-schema)

### Example input

```json
{
  "samApiKey": "YOUR_PERSONAL_SAM_KEY",
  "businessDescription": "We build secure cloud software and provide data engineering services for public-sector organizations.",
  "keywords": ["cloud software", "data engineering"],
  "naicsCodes": ["541511", "541512"],
  "postedWithinDays": 30,
  "maxOpportunities": 50,
  "minMatchScore": 20,
  "includeHistoricalAwards": true,
  "awardsLookbackYears": 3,
  "maxHistoricalAwards": 5,
  "maxHistoricalQueries": 10
}
````

Use specific title phrases and six-digit NAICS codes when possible. If `keywords` is empty, the Actor derives up to five English terms from `businessDescription`.

### Match score

The score is intentionally transparent:

| Signal | Maximum points |
| --- | ---: |
| Exact NAICS match | 45 |
| Related NAICS family | 20 |
| Search phrases found in title/agency text | 35 |
| Business capability terms found | 10 |
| Open or active response window | 5 |
| Recently posted | 5 |

Expired/inactive notices, award notices, and justification records are excluded from open-opportunity results. The low score cap remains a defensive signal when scoring an individual raw record.

### Run locally

Node.js 20 or newer is required.

```bash
npm install
npm test
```

The Apify SDK reads local input from `storage/key_value_stores/default/INPUT.json` when using its default local storage. Then run:

```bash
npm start
```

### Deploy to Apify

Create an Actor on Apify, upload or connect this source folder, and build it. The `.actor` folder contains the Dockerfile, input/output schemas, dataset table view, and memory limits. No separate server or database is required.

### Product limitations

- This is opportunity discovery, not legal, procurement, or bid/no-bid advice.
- SAM.gov searches titles and NAICS codes; it does not offer a general full-description keyword parameter in this public endpoint.
- Open notices often omit contract value. The Actor returns `null` with an explanation instead of inventing an estimate.
- Historical awards are comparable by NAICS or keywords, not proof that the same buyer or requirement will recur.
- SAM.gov and USAspending can change fields or rate limits. API errors are retried, and historical enrichment failures do not discard current opportunities.

# Actor input Schema

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

Personal public API key from SAM.gov Account Details. It is sent only to api.sam.gov.

## `businessDescription` (type: `string`):

In English, describe the products, services, customers, and capabilities of the business.

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

Specific English phrases likely to appear in solicitation titles. The Actor derives phrases from the description when this is empty.

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

Optional 2-6 digit NAICS industry codes. Six-digit codes produce the most precise results.

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

Search notices posted during this many recent days. SAM.gov allows at most one year.

## `maxOpportunities` (type: `integer`):

Maximum number of ranked dataset items to save.

## `minMatchScore` (type: `integer`):

Discard results scoring below this value (0-100). Use 0 for broad discovery.

## `includeHistoricalAwards` (type: `boolean`):

Enrich matches with USAspending contract winners. This API needs no key.

## `awardsLookbackYears` (type: `integer`):

How far back to search for comparable contract awards.

## `maxHistoricalAwards` (type: `integer`):

Maximum comparable awards attached to each opportunity.

## `maxHistoricalQueries` (type: `integer`):

Cost guardrail: maximum unique NAICS/keyword searches sent to USAspending.

## Actor input object example

```json
{
  "businessDescription": "We build secure cloud software and provide data engineering services for public-sector organizations.",
  "keywords": [],
  "naicsCodes": [],
  "postedWithinDays": 30,
  "maxOpportunities": 50,
  "minMatchScore": 20,
  "includeHistoricalAwards": true,
  "awardsLookbackYears": 3,
  "maxHistoricalAwards": 5,
  "maxHistoricalQueries": 10
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "businessDescription": "We build secure cloud software and provide data engineering services for public-sector organizations."
};

// Run the Actor and wait for it to finish
const run = await client.actor("formnexa/global-tender-match").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 = { "businessDescription": "We build secure cloud software and provide data engineering services for public-sector organizations." }

# Run the Actor and wait for it to finish
run = client.actor("formnexa/global-tender-match").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 '{
  "businessDescription": "We build secure cloud software and provide data engineering services for public-sector organizations."
}' |
apify call formnexa/global-tender-match --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=formnexa/global-tender-match",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Global Tender Match",
        "description": "Find and rank open U.S. federal contract opportunities for a business, with similar historical awards.",
        "version": "0.1",
        "x-build-id": "54L0Z2eF6cImCAjSV"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/formnexa~global-tender-match/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-formnexa-global-tender-match",
                "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/formnexa~global-tender-match/runs": {
            "post": {
                "operationId": "runs-sync-formnexa-global-tender-match",
                "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/formnexa~global-tender-match/run-sync": {
            "post": {
                "operationId": "run-sync-formnexa-global-tender-match",
                "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",
                "required": [
                    "samApiKey",
                    "businessDescription"
                ],
                "properties": {
                    "samApiKey": {
                        "title": "SAM.gov API key",
                        "type": "string",
                        "description": "Personal public API key from SAM.gov Account Details. It is sent only to api.sam.gov."
                    },
                    "businessDescription": {
                        "title": "Business description",
                        "minLength": 10,
                        "type": "string",
                        "description": "In English, describe the products, services, customers, and capabilities of the business."
                    },
                    "keywords": {
                        "title": "Search phrases",
                        "type": "array",
                        "description": "Specific English phrases likely to appear in solicitation titles. The Actor derives phrases from the description when this is empty.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "naicsCodes": {
                        "title": "NAICS codes",
                        "type": "array",
                        "description": "Optional 2-6 digit NAICS industry codes. Six-digit codes produce the most precise results.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "postedWithinDays": {
                        "title": "Posted within (days)",
                        "minimum": 1,
                        "maximum": 365,
                        "type": "integer",
                        "description": "Search notices posted during this many recent days. SAM.gov allows at most one year.",
                        "default": 30
                    },
                    "maxOpportunities": {
                        "title": "Maximum matched opportunities",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Maximum number of ranked dataset items to save.",
                        "default": 50
                    },
                    "minMatchScore": {
                        "title": "Minimum match score",
                        "minimum": 0,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Discard results scoring below this value (0-100). Use 0 for broad discovery.",
                        "default": 20
                    },
                    "includeHistoricalAwards": {
                        "title": "Include similar past awards",
                        "type": "boolean",
                        "description": "Enrich matches with USAspending contract winners. This API needs no key.",
                        "default": true
                    },
                    "awardsLookbackYears": {
                        "title": "Award history (years)",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "How far back to search for comparable contract awards.",
                        "default": 3
                    },
                    "maxHistoricalAwards": {
                        "title": "Past awards per opportunity",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Maximum comparable awards attached to each opportunity.",
                        "default": 5
                    },
                    "maxHistoricalQueries": {
                        "title": "Maximum award-history queries",
                        "minimum": 1,
                        "maximum": 30,
                        "type": "integer",
                        "description": "Cost guardrail: maximum unique NAICS/keyword searches sent to USAspending.",
                        "default": 10
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
