> For the complete documentation index, see [llms.txt](https://agpt.co/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://agpt.co/docs/integrations/block-integrations/parallel_search.md).

# AnySearch Parallel Search

Runs multiple AnySearch queries in a single block (client-side concurrency, max 5 queries). Runs anonymously or with an `ANYSEARCH_API_KEY` credential - see the AnySearch Search page for setup.

## AnySearch Parallel Search

### What it is

Runs several AnySearch queries in parallel (client-side concurrency via asyncio)

### How it works

The block fans out up to 5 queries client-side with asyncio.gather - each query is an independent POST to /v1/search, so this is client-side concurrency, not a server-side batch endpoint (the AnySearch REST surface does not expose one). Results return grouped per query in input order; a failing query does not fail the batch - the error field on that group carries the message while the other groups still return results. The shared vertical inputs apply to every query in the batch: `sub_domain` (e.g. `finance.quote`) is sent as `tag` and `sub_domain_params` as `params`; setting `domain` without `sub_domain`, or a `sub_domain` outside the domain prefix, is rejected by input validation before any request is sent. Providing more than five queries, or an empty list, is likewise rejected by input validation (`queries` allows 1-5 entries).

### Inputs

| Input               | Description                                                                  | Type                                                                                                                                                                                                                       | Required |
| ------------------- | ---------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| auth                | Anonymous tier (lower rate limit, no key) or an AnySearch API key credential | "api\_key" \| "anonymous"                                                                                                                                                                                                  | No       |
| queries             | The search queries to run in parallel (max 5)                                | List\[str]                                                                                                                                                                                                                 | Yes      |
| max\_results        | Maximum number of results per query                                          | int                                                                                                                                                                                                                        | No       |
| domain              | Restrict every query to a vertical domain                                    | "academic" \| "agriculture" \| "business" \| "code" \| "energy" \| "environment" \| "film" \| "finance" \| "gaming" \| "general" \| "health" \| "ip" \| "legal" \| "resource" \| "security" \| "social\_media" \| "travel" | No       |
| sub\_domain         | Sub-domain inside the domain, applied to every query (e.g. finance.quote)    | str                                                                                                                                                                                                                        | No       |
| sub\_domain\_params | Structured parameters for the shared sub\_domain                             | Dict\[str, Any]                                                                                                                                                                                                            | No       |

### Outputs

| Output  | Description                                | Type                         |
| ------- | ------------------------------------------ | ---------------------------- |
| error   | Error message if the operation failed      | str                          |
| results | One result group per query, in input order | List\[AnySearchQueryResults] |

### Possible use case

**Multi-angle research**: Fan out 2-5 phrasings or sub-topics of one question in parallel, then merge the groups for an LLM synthesis step.

**Single-vertical sweep**: Run several phrasings inside one shared vertical - e.g. domain=finance with sub\_domain=finance.quote and sub\_domain\_params {"type": "stock", "symbol": "NVDA"} applied to earnings, guidance, and analyst-rating queries at once.

**Bounded batch retrieval**: Fetch up to 5 independent lookups in one node while sharing the same credential and result shape.

***


---

# 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://agpt.co/docs/integrations/block-integrations/parallel_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.
