> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/technical-reference/files-knowledge-and-retrieval/indexed-search-and-connected-app-search.md).

# Indexed Search and Connected-App Search

Knowledge-base search queries indexed source material. Connected-app search uses supported provider search capabilities through a connection. Choose the path that matches the freshness and coverage you need.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2FlYCvDuhLsQWgr71s4DIN%2FG013.mp4?alt=media&token=fa116f07-bf45-4bb0-9571-4e5b75de056a>" %}

## Before you begin

A populated knowledge base or an authorized connection to the relevant provider.

## Key concepts

| Term                 | Definition                                                                                                                                 |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| Connected-app search | Search performed through a supported provider connection. Provider permissions, query support, and pagination affect the results.          |
| Indexed search       | Search over a prepared knowledge-base index. Freshness depends on the last completed source update and processing.                         |
| Synchronization      | Updating a knowledge base from a connected source. The searchable copy can lag the source until synchronization and indexing finish.       |
| Connection           | A saved authorization to a particular provider account. An action uses the selected account’s access, subject to StackAI sharing controls. |
| Pagination           | Retrieval of a collection through multiple pages. Use the continuation method exposed by the selected operation.                           |

## Choose a search method

1. Choose the search tool and inspect its required source or connection.

![Choose whether search uses the builder’s connection or each end user’s connected account.](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/IMfHze3PFAYCaxyIWSFo/assets/g013-g013-02-connection-modes.png)

Choose whether search uses the builder’s connection or each end user’s connected account.

2. Submit the query and read the actual returned fields.
3. Retrieve the full file separately when the result contains only an excerpt or metadata.

You obtain evidence from the intended source path.

## Behavior and limitations

An indexed copy can lag the provider until synchronization completes. Provider search can have its own permissions, pagination, and query limits. A search result does not automatically contain a full document, download URL, or citation. Diagnose the selected search path before changing model instructions.

## Related resources

[Search connected apps with Federated Search](https://docs.stackai.com/guides-and-quickstarts/agent-builder-and-skills/search-connected-apps-with-federated-search.md)

[File Inputs, Supported Formats, and Size Limits](https://docs.stackai.com/technical-reference/files-knowledge-and-retrieval/file-inputs-supported-formats-and-size-limits.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/technical-reference/files-knowledge-and-retrieval/indexed-search-and-connected-app-search.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
