x402 Agent Services Text To Structure API

The Text To Structure API from x402 Agent Services — 1 operation(s) for text to structure.

Operations 1

POST /api/text-to-structure Text to strict JSON structure #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/call402-com:call402-com-text-to-structure-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

call402-com-text-to-structure-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: x402 Agent Services Text To Structure API
  version: 1.0.0
  contact:
    name: x402 Agent Services
    url: https://call402.com/
  x-guidance: 'All /api/* endpoints are pay-per-call via x402 v2 (exact, Base mainnet, USDC). Call any endpoint without payment to receive the live 402 challenge with exact price, network, asset and payTo; the runtime 402 response is authoritative over this document. Pay with any x402 client (e.g. @x402/fetch) and retry with the PAYMENT-SIGNATURE header. Free endpoints: /, /pricing, /stats, /health, /openapi.json, /llms.txt, /.well-known/x402.json, /.well-known/agent.json, and POST /mcp for initialize/tools/list.'
  description: USDC pay-per-call APIs for AI agents via the x402 protocol (v2, exact, Base mainnet). Send a request, receive HTTP 402 with payment requirements, pay with @x402/fetch or any x402 client, retry with the PAYMENT-SIGNATURE header.
servers:
- url: https://call402.com
tags:
- name: Text To Structure
paths:
  /api/text-to-structure:
    post:
      summary: Text to strict JSON structure
      description: 'Turn unstructured text into strict, machine-readable JSON for agent pipelines: a deterministic, reproducible alternative to an LLM extraction call. Extracts emails, URLs, EVM wallet addresses, transaction hashes, ISO-normalized dates, money amounts, percentages, phone numbers and key:value pairs from invoices, emails, messages, logs or documents. Pass fields or a JSON schema to receive exactly the fields you need. Same input, same output, in milliseconds.'
      operationId: Text_to_strict_JSON_structure
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '0.002'
        protocols:
        - x402: {}
        network: eip155:8453
        asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
        payTo: '0xAc6F1C3C3b17040730F16dC24Ee9993e9565BE4A'
        scheme: exact
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                text:
                  type: string
                fields:
                  type: array
                  items:
                    type: string
                schema:
                  type: object
              required:
              - text
            example:
              text: 'Invoice 1042 from Acme Corp. Total due: $1,250.00 by 2026-11-15. Questions: billing@acme.com'
              fields:
              - total
              - due_date
              - email
      responses:
        '200':
          description: Success (after x402 payment settles)
          content:
            application/json:
              schema:
                type: object
                description: Tool result payload; per-endpoint fields are documented in the docs page and llms.txt
              example:
                total: $1,250.00
                due_date: '2026-11-15'
                email: billing@acme.com
        '400':
          description: Invalid input
        '402':
          description: Payment Required — x402 v2 challenge in PAYMENT-REQUIRED header
          headers:
            PAYMENT-REQUIRED:
              schema:
                type: string
              description: Base64-encoded PaymentRequired JSON
      tags:
      - Text To Structure
x-x402:
  version: 2
  network: eip155:8453
  asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
  payTo: '0xAc6F1C3C3b17040730F16dC24Ee9993e9565BE4A'
  facilitator: https://api.cdp.coinbase.com/platform/v2/x402