# Search Federal Contract Sub Awards

`Search_Federal_Contract_Sub_Awards` returns federal subcontract records from GovTribe, including sub-contractor, prime-contractor, and agency context.

## When To Use

Typical questions this tool answers well:

* Which subcontract records match a topic, vendor, agency, or timeframe?
* Which sub-awardees appear most often in a filtered subcontract population?
* Which funding or contracting agencies show the most subcontract record volume?
* What subcontract history exists for a known vendor across recent fiscal years?
* Which specific sub-award record IDs are present and how are they linked to prime contractors?
* When you need rollups only (`per_page: 0`) versus rollups plus example rows (`per_page > 0`).

## Required Reading

1. [Search\_Mode\_And\_Query\_Guide](/user-guide/mcp/guides/search_mode_and_query_guide.md): Required before setting free-text query strings and choosing keyword vs semantic retrieval.
2. [Date\_Filtering\_Guide](/user-guide/mcp/guides/date_filtering_guide.md): Required before setting date window filters.

## Output Contract

* Top-level keys:
  * `data`: Array of result rows when `per_page > 0`.
  * `current_page`, `from`, `to`, `last_page`, `per_page`: pagination fields when row paging is active.
  * `total`: Total matched row count for current query filters.
  * `path`: GovTribe search URL for this result set.
  * `contains`: Dataset label for the returned result set.
  * `search_results_id`, `search_results_id_can_generate_saved_search`, `view_search_results_url`: search-session metadata for saved-search and UI reuse flows.
  * `aggregations`: Aggregation payload keyed by requested aggregation names when requested.
* Row keys:
  * `govtribe_id`
  * `govtribe_type`
  * `name`
  * `award_date`
  * `description`
  * `updated_at`
  * `sub_contractor`
  * `prime_contractor`
  * `contracting_federal_agency`
  * `funding_federal_agency`
* Relationship retrieval map:
  * `contracting_federal_agency`
    * `resource_type`: `federal_agency`
    * `tool`: `Search_Federal_Agencies`
    * `filter`: `federal_agency_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
  * `funding_federal_agency`
    * `resource_type`: `federal_agency`
    * `tool`: `Search_Federal_Agencies`
    * `filter`: `federal_agency_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
  * `prime_contractor`
    * `resource_type`: `vendor`
    * `tool`: `Search_Vendors`
    * `filter`: `vendor_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `name`, `uei`, `govtribe_url`
  * `sub_contractor`
    * `resource_type`: `vendor`
    * `tool`: `Search_Vendors`
    * `filter`: `vendor_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `name`, `uei`, `govtribe_url`

## Usage Patterns

Pattern A: Semantic discovery of subcontract records for a topic with example rows. Tool: `Search_Federal_Contract_Sub_Awards`

```json
{
  "query": "cloud migration support subcontracting",
  "search_mode": "semantic",
  "fields_to_return": [
    "govtribe_id"
  ],
  "page": 1,
  "per_page": 5
}
```

Pattern B: Aggregations-only subcontract concentration by awardee and agency. Tool: `Search_Federal_Contract_Sub_Awards`

```json
{
  "search_mode": "keyword",
  "aggregations": [
    "top_awardees_by_doc_count",
    "top_funding_federal_agencies_by_doc_count",
    "top_contracting_federal_agencies_by_doc_count"
  ],
  "award_date_range": {
    "from": "2023-10-01",
    "to": "2025-09-30"
  },
  "sort": {
    "key": "timestamp",
    "direction": "desc"
  },
  "per_page": 0
}
```

Pattern C: Vendor-specific subcontract history over a defined period. Tool: `Search_Federal_Contract_Sub_Awards`

```json
{
  "search_mode": "keyword",
  "fields_to_return": [
    "govtribe_id"
  ],
  "award_date_range": {
    "from": "2024-01-01",
    "to": "2025-12-31"
  },
  "vendor_ids": [
    "PNELLLMA7881"
  ],
  "sort": {
    "key": "timestamp",
    "direction": "desc"
  },
  "page": 1,
  "per_page": 25
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.govtribe.com/user-guide/mcp/tools/search-federal-contract-sub-awards.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
