# 2s Store Document Get

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

Fetches a stored document by ID from a named namespace in the 2s key-value document store

## Facts

- Endpoint: POST https://2s.io/api/store/doc-get
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-store-document-get-54014a7b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lc7Z37wCflbRHJVrFe_j4

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-store-document-get-54014a7b -d '<json body>'
```

Example prompt: Fetch the document with ID 'agent-state-001' from the 'my-workflow' namespace in the 2s store and show me its body and when it expires.

## When to prefer this

Use this endpoint when you need to retrieve a previously stored document from the 2s key-value document store by its exact ID and namespace. Prefer this over alternatives when you are already using the 2s ecosystem for agent infrastructure, need pay-per-call pricing with no API key setup, and want to retrieve structured document bodies with expiry metadata. Not appropriate for full-text search or listing documents — use it only when you have the specific document ID.

## Known failure modes

- Document ID not found — returns empty items array with total 0
- Invalid or missing namespace — may return empty result or error
- Expired document — may not be returned if TTL has elapsed
- Malformed request body — returns error response
- Payment failure — x402 payment not accepted, endpoint not called

## 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 JSON object with ok=true, an items array containing matching documents (each with id, body string, optional meta, and expiresAt timestamp), a total count (or null if unknown), and a source object with provider name, URL, and license information.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "id": {
   "type": "string",
   "description": "Document id to fetch."
  },
  "ns": {
   "type": "string",
   "description": "Namespace the document lives in."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-store-document-get-54014a7b/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)
