# Search Jurisdictions

`Search_Jurisdictions` retrieves GovTribe jurisdiction participant records that represent state-level subdivisions and local governing entities.

## When To Use

* Which jurisdictions match a state, a jurisdiction name, or a known FIPS code?
* Which jurisdiction records correspond to a list of IDs provided by a user or workflow?
* Which states currently have the most jurisdiction records in a filtered set?
* Which jurisdictions are similar to a known jurisdiction or related GovTribe entity?
* Which jurisdiction records should be used as normalized inputs for downstream state-and-local opportunity analysis?

## 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. [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_type`
  * `govtribe_url`
  * `name`
  * `fips_code`
  * `updated_at`
* Relationship retrieval map:
  * `none`: This resource has no relationship fields.

## Usage Patterns

Pattern A: Jurisdictions in a target state with row output. Tool: `Search_Jurisdictions`

```json
{
  "search_mode": "keyword",
  "fields_to_return": [
    "govtribe_id"
  ],
  "state_ids": [
    "CA"
  ],
  "per_page": 25
}
```

Pattern B: Exact jurisdiction lookup by FIPS code. Tool: `Search_Jurisdictions`

```json
{
  "search_mode": "keyword",
  "fields_to_return": [
    "govtribe_id"
  ],
  "per_page": 10,
  "jurisdiction_ids": [
    "06081"
  ]
}
```

Pattern C: Aggregation-only distribution of jurisdictions by state. Tool: `Search_Jurisdictions`

```json
{
  "search_mode": "keyword",
  "aggregations": [
    "top_states_by_doc_count"
  ],
  "per_page": 0
}
```

Pattern D: Similar jurisdictions to a known jurisdiction record. Tool: `Search_Jurisdictions`

```json
{
  "search_mode": "semantic",
  "fields_to_return": [
    "govtribe_id"
  ],
  "similar_filter": {
    "govtribe_type": "jurisdiction",
    "govtribe_id": "<JURISDICTION_ID>"
  },
  "per_page": 10
}
```


---

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