# ONE Engine Word Count API

> ONE Engine Word Count API is a paid API for AI agents from one-search.one-engine.workers.dev, paid per call via x402, $0.0009/call, status unknown (last checked 2026-10-02).

Counts the number of words and characters in a given text string, returning both metrics as a JSON response.

## Facts

- Endpoint: POST https://one-search.one-engine.workers.dev/v1/text/word-count?utm_source=zero.xyz
- Price: $0.0009/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/one-engine-word-count-api-e2f59800
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xCqM5zYRGzZ9q7y9qVxAr

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 one-engine-word-count-api-e2f59800 -d '<json body>'
```

Example prompt: How many words and characters are in this text: 'The quick brown fox jumps over the lazy dog'?

## When to prefer this

Choose this endpoint when you need a cheap, fast, on-demand word and character count for text up to 50,000 characters in an autonomous agent pipeline. At $0.0009 per call via x402 on Base, it is ideal for pay-per-use workflows where spinning up a local NLP library or calling a heavyweight API would be overkill. Prefer this over general LLM-based counting (which is slow and expensive) or building custom string-processing logic.

## Known failure modes

- Text exceeds 50,000 character limit — request rejected or truncated
- Empty text input — may return zero counts or an error
- Missing 'text' field in request body — returns validation error
- Payment failure via x402 — 402 response if USDC payment not provided or insufficient

## How this service works

Low-cost pay-per-call utility APIs for autonomous agents using x402 on Base.

## Output

A JSON object containing two fields: 'words' (integer count of words in the input text) and 'characters' (integer count of characters in the input text). Example: {"words": 3, "characters": 20}.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "Text up to 50000 characters"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "words": 3,
  "characters": 20
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/one-engine-word-count-api-e2f59800/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from one-search.one-engine.workers.dev](https://www.zero.xyz/host/one-search.one-engine.workers.dev/llms.txt)
