# Search Federal Forecasts

`Search_Federal_Forecasts` retrieves GovTribe federal forecast records for planned federal requirements, including timing, estimated value range, set-aside posture, and point-of-contact context.

## When To Use

* Which forecasted requirements match a topic, agency, NAICS, geography, or time window?
* Which forecasts are expected to release soon (`estimated_solicitation_release_date`)?
* Which recompetes or new requirements exist for a target agency portfolio?
* Which forecast set-asides are most common in the current filtered market?
* Which forecast records are similar to a known forecast/opportunity/award entity?

## 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:
  * `current_page`: Current page number when `per_page > 0`.
  * `data`: Array of result rows when `per_page > 0`.
  * `from`: First row position in the current page.
  * `last_page`: Last page number for current filters.
  * `path`: GovTribe search URL for this result set.
  * `per_page`: Applied page size.
  * `to`: Last row position in the current page.
  * `total`: Total matched row count for current query filters.
  * `contains`: Dataset label for the returned result set.
  * `search_results_id_can_generate_saved_search`: Saved-search eligibility flag.
  * `search_results_id`: Server-side search result identifier.
  * `view_search_results_url`: URL to open this exact result set.
  * `aggregations`: Aggregation payload keyed by requested aggregation names when requested.
* Row keys:
  * `govtribe_id`
  * `govtribe_ai_summary`
  * `govtribe_type`
  * `govtribe_url`
  * `name`
  * `forecast_type`
  * `set_aside`
  * `estimated_solicitation_release_date`
  * `estimated_award_start_date`
  * `estimated_award_value`
  * `descriptions`
  * `updated_at`
  * `federal_agency`
  * `place_of_performance`
  * `points_of_contact`
* `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:
  * `federal_agency`
    * `resource_type`: `federal_agency`
    * `tool`: `Search_Federal_Agencies`
    * `filter`: `federal_agency_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
  * `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`
  * `points_of_contact`
    * `resource_type`: `contact`
    * `tool`: `Search_Contacts`
    * `filter`: `contact_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `name`, `email`, `govtribe_url`

## Usage Patterns

Pattern A: Aggregations-only market shape for a forecast segment. Tool: `Search_Federal_Forecasts`

```json
{
  "search_mode": "keyword",
  "aggregations": [
    "top_federal_agencies_by_doc_count",
    "top_set_aside_types_by_doc_count",
    "top_naics_codes_by_doc_count"
  ],
  "anticipated_award_start_date_range": {
    "from": "now/d",
    "to": "now+365d/d"
  },
  "estimated_solicitation_release_date_range": {
    "from": "now-90d/d",
    "to": "now+365d/d"
  },
  "sort": {
    "key": "_score",
    "direction": "desc"
  },
  "per_page": 0
}
```

Pattern B: Upcoming releases for a specific agency and NAICS area. Tool: `Search_Federal_Forecasts`

```json
{
  "search_mode": "keyword",
  "fields_to_return": [
    "govtribe_id"
  ],
  "estimated_solicitation_release_date_range": {
    "from": "now/d",
    "to": "now+180d/d"
  },
  "federal_agency_ids": [
    "<FEDERAL_AGENCY_ID>"
  ],
  "forecast_type": [
    "Recompete",
    "New Requirement"
  ],
  "naics_category_ids": [
    "<NAICS_ID_OR_CODE>"
  ],
  "sort": {
    "key": "estimated_solicitation_release_date",
    "direction": "asc"
  },
  "per_page": 25
}
```

Pattern C: Semantic mission discovery seeded by a known entity. Tool: `Search_Federal_Forecasts`

```json
{
  "query": "zero trust network modernization for civilian agencies",
  "search_mode": "semantic",
  "fields_to_return": [
    "govtribe_id"
  ],
  "similar_filter": {
    "govtribe_type": "federal_forecast",
    "govtribe_id": "<FORECAST_ID>"
  },
  "sort": {
    "key": "_score",
    "direction": "desc"
  },
  "per_page": 10
}
```

Pattern D: Exclude known forecasts while monitoring new recompetes. Tool: `Search_Federal_Forecasts`

```json
{
  "search_mode": "keyword",
  "fields_to_return": [
    "govtribe_id"
  ],
  "estimated_solicitation_release_date_range": {
    "from": "now/d",
    "to": "now+365d/d"
  },
  "federal_agency_ids": [
    "<FEDERAL_AGENCY_ID>"
  ],
  "forecast_type": [
    "Recompete"
  ],
  "sort": {
    "key": "anticipated_award_start_date",
    "direction": "asc"
  },
  "per_page": 20,
  "federal_forecast_ids": [
    "<KNOWN_FORECAST_ID_1>",
    "<KNOWN_FORECAST_ID_2>"
  ],
  "federal_forecast_ids_operator": "not_in"
}
```


---

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