# Search Federal Grant Awards

`Search_Federal_Grant_Awards` returns federal grant award records with spending, recipient, agency, and program context from GovTribe's grant-award dataset.

## When To Use

* "Find grant awards for this topic, recipient, agency, or program."
* "Show the top awardees/agencies/programs by dollars obligated."
* "Find a specific federal grant award by known ID or exact title text."
* "Compare funding agency vs contracting agency funding patterns."
* "Limit to grant type (Project, Formula, Cooperative, Block) and analyze obligations."
* "Run rollups only (`per_page: 0`) or rollups plus sample 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.
3. [Location\_Filtering\_Guide](/user-guide/mcp/guides/location_filtering_guide.md): Required before setting location 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 returned with row results.
  * `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 reuse/saved-search flows.
  * `aggregations`: Aggregation payload keyed by requested aggregation names when requested.
* Row keys:
  * `govtribe_id`
  * `govtribe_ai_summary`
  * `govtribe_type`
  * `govtribe_url`
  * `name`
  * `description`
  * `grant_number`
  * `award_date`
  * `completion_date`
  * `ultimate_completion_date`
  * `assistance_type`
  * `assistance_recipient_type`
  * `dollars_obligated`
  * `updated_at`
  * `funding_federal_agency`
  * `contracting_federal_agency`
  * `place_of_performance`
  * `awardee`
  * `parent_of_awardee`
  * `federal_grant_program`
  * `federal_grant_sub_awards`
* `place_of_performance` returns a nested location object with `govtribe_id`, `govtribe_type`, `name`, `lat`, and `lng` when the place-of-performance relation is loaded.
* Relationship retrieval map:
  * `awardee`
    * `resource_type`: `vendor`
    * `tool`: `Search_Vendors`
    * `filter`: `vendor_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `name`, `uei`, `govtribe_url`
  * `contracting_federal_agency`
    * `resource_type`: `federal_agency`
    * `tool`: `Search_Federal_Agencies`
    * `filter`: `federal_agency_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
  * `federal_grant_program`
    * `resource_type`: `federal_grant_program`
    * `tool`: `Search_Federal_Grant_Programs`
    * `filter`: `federal_grant_program_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
  * `federal_grant_sub_awards`
    * `resource_type`: `federal_grant_sub_award`
    * `tool`: `Search_Federal_Grant_Sub_Awards`
    * `filter`: `federal_grant_sub_award_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`
  * `parent_of_awardee`
    * `resource_type`: `vendor`
    * `tool`: `Search_Vendors`
    * `filter`: `vendor_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `name`, `uei`, `govtribe_url`
  * `place_of_performance`
    * `resource_type`: `location`
    * `tool`: `n/a`
    * `filter`: `n/a`
    * `fallback`: No direct Search\_\* tool returns this resource class; use parent dataset filters and parent IDs.
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `name`, `lat`, `lng`

## Usage Patterns

Pattern A: Topic-level grant award discovery with representative rows. Tool: `Search_Federal_Grant_Awards`

```json
{
  "query": "rural broadband deployment planning and implementation",
  "search_mode": "semantic",
  "fields_to_return": [
    "govtribe_id"
  ],
  "sort": {
    "key": "_score",
    "direction": "desc"
  },
  "per_page": 5,
  "page": 1
}
```

Pattern B: Aggregation-only market sizing by recipient, agency, location, and program. Tool: `Search_Federal_Grant_Awards`

```json
{
  "search_mode": "keyword",
  "aggregations": [
    "dollars_obligated_stats",
    "top_awardees_by_dollars_obligated",
    "top_funding_federal_agencies_by_dollars_obligated",
    "top_locations_by_dollars_obligated",
    "top_federal_grant_programs_by_dollars_obligated"
  ],
  "award_date_range": {
    "from": "2023-01-01",
    "to": "2025-12-31"
  },
  "sort": {
    "key": "financialStats.dollarsObligated",
    "direction": "desc"
  },
  "per_page": 0
}
```

Pattern C: Project-grant-only analysis for a mission topic. Tool: `Search_Federal_Grant_Awards`

```json
{
  "query": "opioid treatment access",
  "search_mode": "semantic",
  "fields_to_return": [
    "govtribe_id"
  ],
  "aggregations": [
    "dollars_obligated_stats",
    "top_awardees_by_dollars_obligated"
  ],
  "assistance_types": [
    "Project Grant"
  ],
  "assistance_types_operator": "in",
  "award_date_range": {
    "from": "2022-01-01",
    "to": null
  },
  "sort": {
    "key": "_score",
    "direction": "desc"
  },
  "per_page": 10
}
```

Pattern D: Known grant award lookup by ID-like token (exact lookup intent). Tool: `Search_Federal_Grant_Awards`

```json
{
  "query": "\"693JJ22430000ZS5EALRR23926\"",
  "search_mode": "keyword",
  "fields_to_return": [
    "govtribe_id"
  ],
  "sort": {
    "key": "_score",
    "direction": "desc"
  },
  "per_page": 1
}
```

Pattern E: Cross-award topic analysis with grants and contracts in parallel. Tool: `Search_Federal_Grant_Awards`

```json
{
  "query": "advanced manufacturing workforce training",
  "search_mode": "semantic",
  "fields_to_return": [
    "govtribe_id"
  ],
  "sort": {
    "key": "_score",
    "direction": "desc"
  },
  "per_page": 5
}
```


---

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