# 2s Document Store Full-Text Search

> 2s Document Store Full-Text Search is a paid API for AI agents from 2s.io, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Performs FTS5 full-text search over a named namespace in the 2s document store, returning ranked matching documents.

## Facts

- Endpoint: POST https://2s.io/api/store/doc-search
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-document-store-full-text-search-51fcdec0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_EuxGEL4Z58nu_WbtTaOyb

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 2s-document-store-full-text-search-51fcdec0 -d '<json body>'
```

Example prompt: Search my 'contracts' namespace in the 2s document store for all documents matching 'renewal AND 2025', returning up to 100 results.

## When to prefer this

Use this endpoint when you have already stored documents in a 2s namespace and need to retrieve them by content using full-text search with FTS5 syntax (boolean operators, exact phrases, prefix wildcards). Prefer this over generic web search when querying private, agent-owned document stores. It is the right choice for agent memory retrieval, stored knowledge bases, or any corpus you previously uploaded to 2s storage.

## Known failure modes

- Empty namespace or namespace not found returns zero hits
- Malformed FTS5 query syntax returns a parse error
- Limit out of range (below 1 or above 1000) returns a validation error
- Missing required 'query' field returns a 400-style error
- No matching documents returns an empty result set

## How this service works

The (most) everything API: 575+ pay-per-call endpoints for AI agents — ground-truth data, a full AI gateway, and agent infrastructure (storage, queues, watchers). USDC via x402, no signup, no API keys, and upto billing: pay actual usage, not the quote.

## Output

Returns a ranked list of matching documents (up to the specified limit, default 50, max 1000) from the specified namespace that satisfy the FTS5 query, including document content and relevance metadata.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "ns": {
   "type": "string",
   "description": "Namespace to search."
  },
  "limit": {
   "type": "integer",
   "maximum": 1000,
   "minimum": 1,
   "description": "Max hits. Default 50, max 1000."
  },
  "query": {
   "type": "string",
   "minLength": 1,
   "description": "FTS5 query. e.g. `invoice AND 2026`, `\"exact phrase\"`, `lim*`."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-document-store-full-text-search-51fcdec0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
