# Delx Commerce Regex API

> Delx Commerce Regex API is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Applies a regular expression pattern to an HTTP request body and returns the match result, paid per-call via USDC on Base or Solana

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/regex?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-regex-api-ef168521
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nMqj8vts0umDa2ybxuxMM

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 delx-commerce-regex-api-ef168521 -d '<json body>'
```

Example prompt: Run a regex pattern like `\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z]{2,}\b` against this JSON body `{"text": "Contact us at hello@example.com or support@test.org"}` and return all email matches — pay per result via Delx Commerce.

## When to prefer this

Choose this endpoint when you need lightweight, per-call regex extraction or validation inside an AI agent workflow without standing up your own infrastructure. It is especially useful for agents that need to pay only for what they use (no subscription), want verifiable delivery, and require crypto-native micropayments via USDC on Base or Solana. Prefer it over self-hosted regex for serverless agent pipelines where cost predictability and no-signup access matter.

## Known failure modes

- Invalid regex pattern causes a parse or runtime error
- Body type mismatch (e.g. sending binary data as JSON) results in a 400 error
- Missing required fields (input.body, input.type, input.bodyType, output.example) returns a validation error
- Payment failure via x402 protocol (insufficient USDC balance) blocks the call
- Regex with catastrophic backtracking may cause a timeout
- Empty body or no matching content returns empty match array

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

A JSON object containing the regex match results — typically matched substrings, capture groups, or a boolean indicating whether the pattern was found — derived from applying the regex to the provided HTTP request body.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "additionalProperties": true
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object",
     "additionalProperties": true
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {}
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-regex-api-ef168521/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
