# Pocket Network Structured Extraction

> Pocket Network Structured Extraction is a paid API for AI agents from agent.pocket.network, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-01).

Extracts named fields from unstructured text using rule-based pattern matching and JSON Schema definitions, returning only what the text explicitly states.

## Facts

- Endpoint: POST https://agent.pocket.network/v1/structured-extraction?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pocket-network-structured-extraction-1ece7c19
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wK1qqHwp32yL8Ny0FeZUT

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 pocket-network-structured-extraction-1ece7c19 -d '<json body>'
```

Example prompt: Pull the email, phone number, company name, and any dates from this text: 'Please contact Sarah at sarah@acme.com or call 555-234-5678. Acme Corp is hosting a kickoff on March 15, 2025.'

## When to prefer this

Choose this endpoint when you need deterministic, rule-based field extraction from text and do not want an LLM to infer or hallucinate values — it returns only what the text explicitly states. Ideal for parsing contact info, invoices, receipts, or structured documents where field labels follow consistent patterns. Prefer it over LLM-based extraction when auditability, cost predictability, and strict literal fidelity matter more than semantic understanding.

## Known failure modes

- Field not found in text — field is omitted or null if the pattern or label is absent
- Ambiguous or malformed schema — returns error if the schema argument cannot be interpreted
- Text too short or lacks structure — built-in heuristics may miss values in highly unstructured prose
- Regex pattern mismatch — custom regex fields return nothing if no substring matches
- Payment failure — request rejected if USDC payment is not included or insufficient

## How this service works

Rule-based extraction of named fields from text; not a language model, it returns only what the text states. POST /v1/extract with {text, schema}: schema is a JSON Schema, a list of field names, or {fields: {name: regex}}. Built-in fields include email, phone, date, url, money and company; other fields come from "Label: value" lines. Pay per request in USDC; no account, no API key.

## Output

A JSON object mapping each requested field name to the value extracted from the text, using only content explicitly present in the input. Built-in fields (email, phone, date, url, money, company) are recognized automatically; custom fields match 'Label: value' lines or user-supplied regex patterns. Fields not found in the text are omitted or returned as null.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "The text to extract from."
  },
  "schema": {
   "description": "A JSON Schema with properties, a list of field names, or {fields: {name: regex}}."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pocket-network-structured-extraction-1ece7c19/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent.pocket.network](https://www.zero.xyz/host/agent.pocket.network/llms.txt)
