> ## Documentation Index
> Fetch the complete documentation index at: https://agentcash.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# search

> Find API providers by describing what you need in natural language.

The `search` tool finds paid API services that match a natural-language query. It returns ranked origins along with endpoint details and pricing, so you can call the best match immediately via [`fetch`](https://agentcash.dev/docs/tools/fetch).

Equivalent CLI command: `npx agentcash search <query>`

## When to use

Use `search` when you don't already know which origin to call. If the task clearly maps to a registered origin (people research → StableEnrich, image generation → StableStudio, social data → StableSocial, and so on), skip `search` and call [`discover_api_endpoints`](https://agentcash.dev/docs/tools/discover-api-endpoints) on that origin directly.

`search` is for discovering capabilities outside the registered origins.

## Parameters

**query** `string` *required*

Natural-language description of what you need. Examples: `"send physical mail"`, `"generate music"`, `"flight prices"`, `"company financials"`.

## Response

**query** `string`

The original query, echoed back.

**results** `object[]`

Ranked origins. The top result's `endpoint` includes the full input/output schema so it can be called without an extra `check_endpoint_schema` round-trip.

**origin** `string`

Origin URL.

**title** `string`

Human-readable name.

**description** `string`

What the origin offers.

**favicon** `string`

Favicon URL.

**protocols** `string[]`

Payment protocols the origin supports (e.g., `x402`, `mpp`).

**endpoint** `object`

Best-matching endpoint for the query, when one exists.

**method** `string`

HTTP method.

**path** `string`

Endpoint path.

**summary** `string`

What the endpoint does.

**authMode** `string`

`paid` or `siwx`.

**price** `string`

Cost in USDC.

**inputSchema** `object`

Request body schema.

**outputSchema** `object`

Response schema.

## Behavior

1. Sends the query to the AgentCash search index
2. Returns a ranked list of origins and their most relevant endpoints
3. The top result is pre-loaded with schema details so you can go straight to `fetch`

## Example

Ask your agent:

> Use AgentCash to search for an API that can send a physical postcard.

The agent calls `search`, picks the best matching origin, and then calls `fetch` on the endpoint it returned.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.