# Losbeto /extract — Structured Data Extraction from Unstructured Text

> Losbeto /extract — Structured Data Extraction from Unstructured Text is a paid API for AI agents from markets.losbeto.xyz, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-14).

Converts messy free-form text into strict JSON by extracting only the fields you specify, returning null for anything not stated in the source.

## Facts

- Endpoint: POST https://markets.losbeto.xyz/extract?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/losbeto-extract-structured-data-extraction-from-unstructured-text-130cd604
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_keemwisup6-U4gYhmgTR_

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 losbeto-extract-structured-data-extraction-from-unstructured-text-130cd604 -d '<json body>'
```

Example prompt: Parse this invoice text and give me back JSON with just the vendor name, invoice number, total amount, and due date — anything not mentioned should come back as null: 'Invoice #4821 from Acme Corp, dated March 3 2025, total due $1,240.00 by April 1 2025.'

## When to prefer this

Choose this endpoint when you need to reliably convert free-form text (invoices, emails, contracts, scraped pages, chat logs) into a strict JSON schema without building your own parse-and-retry error handling. It is especially useful for AI agents that need structured data from unstructured sources without API keys or subscriptions — paying per call in USDC via x402. Prefer it over rolling your own LLM prompt when you want guaranteed null-for-missing semantics and built-in retry logic.

## Known failure modes

- Text exceeds 6000 character limit — request rejected
- Model returns malformed JSON — one automatic retry is attempted
- After retry, still invalid JSON — payment refunded as call credit
- Requested field not present in source text — field returned as null (not an error)
- USDC payment fails on Base/Solana/Algorand/Polygon — call not processed

## How this service works

OpenAI-compatible LLM gateway at $0.005/call — change base_url, pay in USDC. Plus pay-per-call market data: multi-oracle price consensus, sentiment, forex, equities, commodities, Brazil macro (BCB/B3) and crypto. No API keys, no accounts. USDC on Base, Solana, Algorand and Polygon via x402.

## Output

A JSON object containing exactly the keys requested, populated with values found in the source text or null where the text makes no mention. One automatic retry is performed if the model returns malformed JSON; if valid JSON still cannot be produced, the $0.01 USDC payment is returned as call credit.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "method": {
     "type": "string",
     "description": "POST"
    },
    "bodyParams": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "Messy source text (max 6000 chars)."
      },
      "fields": {
       "type": "string",
       "description": "Alternative to schema: comma-separated field names."
      },
      "schema": {
       "type": "object",
       "description": "{field: description} — the keys you want back."
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "properties": {
    "example": {
     "type": "object",
     "description": "Turn messy text into strict JSON: send text plus the fields you want and get back exactly those keys, null for anything the text does not state — never invented. Invoices, emails, contracts, scraped pages, chat logs. One retry repairs malformed model output; if valid JSON still cannot be produced the payment is returned as call credit. Replaces your own parse-and-retry error branch..."
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/losbeto-extract-structured-data-extraction-from-unstructured-text-130cd604/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from markets.losbeto.xyz](https://www.zero.xyz/host/markets.losbeto.xyz/llms.txt)
