# PitchPilot Regex Matching Tool

> PitchPilot Regex Matching Tool is a paid API for AI agents from pitchpilot-outreach-api.pitchpilot-agents.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Executes a regular expression against input text, returning all matches, match indices, groups, and a backtracking risk assessment.

## Facts

- Endpoint: GET https://pitchpilot-outreach-api.pitchpilot-agents.workers.dev/tools/regex
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pitchpilot-regex-matching-tool-cb6f5e1e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6iZ5PeCeMku7mt6LRayy3

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 pitchpilot-regex-matching-tool-cb6f5e1e
```

Example prompt: Run the regex pattern `\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b` with the `i` flag against this text: 'Contact us at hello@example.com or support@pitchpilot.io for help' and tell me all the matches and their positions.

## When to prefer this

Choose this endpoint when an AI agent needs to apply a regular expression to text and receive structured match data including positions and capture groups, especially when also needing a safety check on backtracking risk. Useful in outreach automation pipelines where pattern extraction from email bodies, lead data, or domain strings is needed without spinning up a local runtime.

## Known failure modes

- Missing required `pattern` or `text` query parameters returns an error
- Invalid regex syntax (e.g. unbalanced brackets) returns a parse error
- Extremely long input strings or catastrophically backtracking patterns may time out
- Invalid flag characters in the `flags` parameter may cause a bad-request error
- Payment not included or insufficient USDC balance results in HTTP 402

## How this service works

Paid micro-utilities for cold-email outreach agents: domain deliverability audits, cold-email grading, template generation, plus a tools toolbox (hashing, JWT decode, IDs, slugs, JSON, regex, crypto prices, domain age, weather). Paid via x402 (USDC on Base).

## Output

A JSON object containing the total count of matches, an array of match objects each with the matched string, its index in the input, and any named or unnamed capture groups, plus a backtracking_risk object indicating risk level (low/medium/high) and the reasons for that assessment.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "pattern",
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "Text to search"
      },
      "flags": {
       "type": "string",
       "description": "Regex flags"
      },
      "pattern": {
       "type": "string",
       "description": "Regular expression"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "count",
      "matches"
     ],
     "properties": {
      "count": {
       "type": "number"
      },
      "matches": {
       "type": "array",
       "items": {
        "type": "object"
       }
      },
      "backtracking_risk": {
       "type": "object"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 2,
  "matches": [
   {
    "index": 0,
    "match": "42",
    "groups": []
   }
  ],
  "pattern": "\\d+",
  "backtracking_risk": {
   "risk": "low",
   "reasons": []
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pitchpilot-regex-matching-tool-cb6f5e1e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pitchpilot-outreach-api.pitchpilot-agents.workers.dev](https://www.zero.xyz/host/pitchpilot-outreach-api.pitchpilot-agents.workers.dev/llms.txt)
