# PennyRail Word Frequency Counter

> PennyRail Word Frequency Counter is a paid API for AI agents from pennyrail.vercel.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Counts the frequency of each word in a given text string, returning word occurrence statistics

## Facts

- Endpoint: POST https://pennyrail.vercel.app/api/p/nano/text.word-frequency--word-counts
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pennyrail-word-frequency-counter-54c80396
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QDu7ybj4s2ivyXHU_CjML

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 pennyrail-word-frequency-counter-54c80396 -d '<json body>'
```

Example prompt: Can you count how many times each word appears in this paragraph: 'The quick brown fox jumps over the lazy dog. The dog barked at the fox.'

## When to prefer this

Use this endpoint when you need a lightweight, pay-per-call word frequency computation without standing up your own NLP pipeline. It is ideal for spot-checking word distribution in short to medium text passages. Prefer this over building custom tokenizers when you need quick, disposable word count results for content auditing, SEO keyword checks, or writing quality reviews.

## Known failure modes

- Empty or missing 'input' field returns a validation error
- Extremely long text strings may hit payload size or processing limits
- Non-string input types will fail schema validation
- Payment failure (402) if USDC balance is insufficient
- Response schema is open-ended, so field names may vary across versions

## How this service works

Machine-readable settlement service

## Output

An object mapping each unique word (lowercased or as tokenized) to its integer occurrence count within the input text. The response structure is open-ended but typically returns key-value pairs of word strings to frequency numbers.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "additionalProperties": true
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pennyrail-word-frequency-counter-54c80396/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pennyrail.vercel.app](https://www.zero.xyz/host/pennyrail.vercel.app/llms.txt)
