# Search Government Related News Articles

`Search_Government_Related_News_Articles` searches GovTribe article records and returns news content with title, source metadata, publication time, GovTribe URL, and article body text.

## When To Use

Typical questions this tool answers well:

* What recent government-related news articles mention a specific topic, phrase, vendor, or agency?
* Which article records match a known GovTribe article ID?
* What are the newest articles for a topic within a date window?
* How many recent articles match filters before retrieving full rows (`per_page: 0`)?
* Which known article IDs should be excluded from follow-on review?

## Required Reading

1. [Search\_Query\_Guide](https://docs.govtribe.com/user-guide/mcp/guides/search_query_guide): Required before setting free-text query strings when search\_mode is used.
2. [Search\_Mode\_Guide](https://docs.govtribe.com/user-guide/mcp/guides/search_mode_guide): Required before choosing keyword vs semantic retrieval.
3. [Date\_Filtering\_Guide](https://docs.govtribe.com/user-guide/mcp/guides/date_filtering_guide): Required before setting date window filters.

## Input Contract

* `query`: Free-text query string. See Required Reading: [Search\_Query\_Guide](https://docs.govtribe.com/user-guide/mcp/guides/search_query_guide).
  * `type`: `string`
  * `required`: `no`
  * `default`: `n/a`
* `page`: 1-based page index.
  * `type`: `null|number`
  * `required`: `no`
  * `default`: `1`
* `per_page`: Rows per page.
  * `type`: `null|number`
  * `required`: `no`
  * `default`: `10`
* `search_mode`: Query interpretation mode. See Required Reading: [Search\_Mode\_Guide](https://docs.govtribe.com/user-guide/mcp/guides/search_mode_guide).
  * `type`: `string`
  * `required`: `no`
  * `default`: `keyword`
  * `options`: `keyword`, `semantic`
* `date_published`: Filter by date published. See Required Reading: [Date\_Filtering\_Guide](https://docs.govtribe.com/user-guide/mcp/guides/date_filtering_guide).
  * `type`: `object`
  * `required`: `no`
  * `default`: `n/a`
  * `shape`: `{ from?: null|string, to?: null|string }`
* `similar_filter`: Find similar to the provided govtribe\_type + govtribe\_id.
  * `type`: `null|object`
  * `required`: `no`
  * `default`: `n/a`
  * `shape`: `{ govtribe_type: string, govtribe_id: string }`
* `government_related_news_article_ids`: Include or exclude results by GovTribe IDs.
  * `type`: `array<string>`
  * `required`: `no`
  * `default`: `n/a`
* `government_related_news_article_ids_operator`: Choose whether to include or exclude values for GovTribe IDs.
  * `type`: `null|string`
  * `required`: `no`
  * `default`: `in`
  * `options`: `in`, `not_in`
* `sort`: Sort configuration.
  * `type`: `object`
  * `required`: `no`
  * `default`: `n/a`
  * `shape`: `{ key?: null|string, direction?: null|string }`
  * `options`: `key`: `datePublished`, `_score`; `direction`: `asc`, `desc`
* `fields_to_return`: Optional field list for row payloads. If omitted and `per_page > 0`, rows default to `govtribe_id`. For `per_page: 0` aggregation/meta calls, this field may be omitted. Specify `fields_to_return` whenever the user asks for fields beyond `govtribe_id`, and prefer omitting it in pure aggregation workflows.
  * `type`: `array<string>`
  * `required`: `no`
  * `default`: `n/a`
  * `options`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `title`, `subheader`, `published_date`, `site_name`, `body`, `updated_at`

## 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.
  * `per_page: 0` behavior: metadata-only response with `path`, `total`, `contains`, `search_results_id_can_generate_saved_search`, `search_results_id`, and `view_search_results_url`.
* Row keys:
  * `govtribe_id`
  * `govtribe_type`
  * `govtribe_url`
  * `title`
  * `subheader`
  * `published_date`
  * `site_name`
  * `body`
  * `updated_at`
* Relationship retrieval map:
  * `none`: This resource has no relationship fields.

## Usage Patterns

Pattern A: Keyword phrase lookup for recent articles, sorted by publication date. Tool: `Search_Government_Related_News_Articles`

```json
{
  "date_published": {
    "from": "now-30d/d",
    "to": "now/d"
  },
  "query": "\"artificial intelligence\" | \"machine learning\"",
  "search_mode": "keyword",
  "fields_to_return": [
    "govtribe_id"
  ],
  "sort": {
    "key": "datePublished",
    "direction": "desc"
  },
  "page": 1,
  "per_page": 10
}
```

Pattern B: Semantic topic discovery across the recent-year corpus. Tool: `Search_Government_Related_News_Articles`

```json
{
  "query": "federal cloud modernization priorities and acquisition execution challenges",
  "search_mode": "semantic",
  "fields_to_return": [
    "govtribe_id"
  ],
  "sort": {
    "key": "_score",
    "direction": "desc"
  },
  "page": 1,
  "per_page": 15
}
```

Pattern C: Retrieve known article IDs while excluding records already reviewed. Tool: `Search_Government_Related_News_Articles`

```json
{
  "query": "",
  "search_mode": "keyword",
  "fields_to_return": [
    "govtribe_id"
  ],
  "sort": {
    "key": "datePublished",
    "direction": "desc"
  },
  "page": 1,
  "per_page": 25,
  "government_related_news_article_ids": [
    "<ARTICLE_ID_2>"
  ],
  "government_related_news_article_ids_operator": "not_in"
}
```

Pattern D: Metadata-only volume check before fetching rows. Tool: `Search_Government_Related_News_Articles`

```json
{
  "date_published": {
    "from": "now-14d/d",
    "to": "now/d"
  },
  "query": "\"Department of Defense\" cybersecurity",
  "search_mode": "keyword",
  "sort": {
    "key": "_score",
    "direction": "desc"
  },
  "page": 1,
  "per_page": 0
}
```
