# Format Validator API

> Format Validator API is a paid API for AI agents from format-validator.pdfextractapi.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Validates a string value against one of 12 known formats including email, URL, UUID, IP addresses, credit card, IBAN, phone, date, and postal codes.

## Facts

- Endpoint: POST https://format-validator.pdfextractapi.workers.dev/validate
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/format-validator-api-8aa4c00a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_aOlaqfQs123oz5WZWaQiW

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 format-validator-api-8aa4c00a -d '<json body>'
```

Example prompt: Can you check if 'user@example.com' is a valid email address format?

## When to prefer this

Use this endpoint when you need lightweight, fast, server-side format validation for any of the 12 supported string formats without spinning up your own regex or parsing library. Ideal for agent workflows that need to sanitize or pre-validate user inputs before downstream processing, particularly for email, phone, IBAN, UUID, IP addresses, and postal codes across US, UK, and Canada.

## Known failure modes

- Unsupported format type provided — only the 12 enumerated formats are accepted
- Value field missing from request body
- Empty string submitted as value
- Network or worker timeout on the Cloudflare edge
- Malformed JSON body causing a parse error

## How this service works

Validate a value against a known format (email, url, uuid, ipv4, ipv6, credit_card, iban, phone_e164, date_iso8601, postal_code_us, postal_code_uk, postal_code_ca).

## Output

Returns a validation result indicating whether the provided value matches the specified format. The response confirms if the string is valid or not for the chosen format type (e.g. email, uuid, ipv4, iban, phone_e164, etc.).

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [
      "value",
      "format"
     ],
     "properties": {
      "value": {
       "type": "string",
       "description": "The value to validate."
      },
      "format": {
       "enum": [
        "email",
        "url",
        "uuid",
        "ipv4",
        "ipv6",
        "credit_card",
        "iban",
        "phone_e164",
        "date_iso8601",
        "postal_code_us",
        "postal_code_uk",
        "postal_code_ca"
       ],
       "type": "string",
       "description": "The format to validate against."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/format-validator-api-8aa4c00a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from format-validator.pdfextractapi.workers.dev](https://www.zero.xyz/host/format-validator.pdfextractapi.workers.dev/llms.txt)
