# AllTheBot Extract JSON from text

> AllTheBot Extract JSON from text is a paid API for AI agents from api.zkrobotics.fr, paid per call via x402, $0.007/call, status unknown (last checked 2026-10-12).

Extracts structured JSON fields from unstructured text (invoices, emails, CVs, ads, etc.) given user-defined field names

## Facts

- Endpoint: GET https://api.zkrobotics.fr/x402/extract-json?utm_source=zero.xyz
- Price: $0.007/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/allthebot-extract-json-from-text-afac0ce4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Wpv4c3TkDuiCWxmDwWrp2

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 allthebot-extract-json-from-text-afac0ce4
```

Example prompt: Extract the invoice date, total amount, invoice number, and customer name from this text as JSON: 'Invoice #42 | Date: March 3 2026 | Billed to John Smith | Total due: $120.00 — please remit within 30 days.'

## When to prefer this

Choose this endpoint when you have unstructured natural-language text (invoices, emails, CVs, ads) in any language and need to extract specific named fields as clean JSON without writing custom parsers. Ideal for lightweight, per-document extraction tasks up to 6,000 characters where you define the schema at call time. Prefer alternatives if you need batch processing of very large documents, complex nested schemas, or OCR from images.

## Known failure modes

- Text exceeds 6,000 character limit — request rejected
- Field names string exceeds 500 characters — truncated or rejected
- Requested fields not present in the text — keys returned with null or empty values
- Ambiguous or poorly formatted input may yield inaccurate extraction
- Network or payment (x402) failure returns non-200 response

## How this service works

Pay-per-call APIs for AI agents over x402: token safety reports, Base and Ethereum on-chain reads, crypto prices, domain checks (DNS, WHOIS, SSL, email), finance data (FX, SEC), worldwide weather forecasts, France alerts, text AI, fun content. USDC on Base, no account, no API key.

## Output

A JSON object whose keys match the field names the caller specified, with values extracted from the input text. For example, {"date":"2026-03-03","total":"$120","number":"42","customer":"John Smith"}.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "maxLength": 6000
      },
      "fields": {
       "type": "string",
       "maxLength": 500
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "data": {
       "type": "object"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "date": "2026-03-03",
   "total": "$120",
   "number": "42",
   "customer": "John Smith"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/allthebot-extract-json-from-text-afac0ce4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.zkrobotics.fr](https://www.zero.xyz/host/api.zkrobotics.fr/llms.txt)
