# 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-14).

Counts the frequency of each word in a given text input, returning word counts as structured data

## Facts

- Endpoint: POST https://pennyrail.vercel.app/api/p/nano/text.word-frequency--count-words-frequency
- 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/pennyrail-word-frequency-counter-fbc0416d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_94EAr90dJhZ9TfOOMRgQ9

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-fbc0416d -d '<json body>'
```

Example prompt: Can you count how often each word appears in this text: '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 quick, cheap ($0.001 USDC) server-side word frequency count without running local NLP libraries. Prefer it over client-side solutions when you need a reproducible, stateless computation in a pipeline or agent workflow. It's well-suited for small-to-medium text snippets where spinning up a full NLP stack is overkill.

## Known failure modes

- Empty input string may return an empty object or an error
- Very large text inputs may hit payload size limits or timeout
- Missing 'input' field returns a 400-level validation error
- Non-string values for 'input' may cause a parsing error
- Punctuation handling may vary — words may or may not be stripped of punctuation

## How this service works

Machine-readable settlement service

## Output

A JSON object mapping each unique word (lowercased or as parsed) to its integer count of occurrences in the input text. The response schema is open (additionalProperties: true), so the keys are the words and the values are their frequencies.

## 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-fbc0416d/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)
