80trust / 100

Text Frequency

by Tanod utilpeek in Weather & location

x402 APIPassing, checked 3 h ago

utilpeek (Tanod) word frequency: top words or n-grams with counts.

POST https://tanod.dev/v1/text/frequency

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
272 ms typical, 275 ms slowest 5%
Last check
3 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://tanod.dev/v1/text/frequency" \
  -H "content-type: application/json" \
  -d '{"text":"The cat sat. The cat ran. A dog sat.","top_n":3}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Ftanod.dev%2Fv1%2Ftext%2Ffrequency
const res = await pay("https://tanod.dev/v1/text/frequency", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"text":"The cat sat. The cat ran. A dog sat.","top_n":3}),
});
console.log(await res.json());

Example input

{
  "text": "The cat sat. The cat ran. A dog sat.",
  "top_n": 3
}

Example output

{
  "language": "en",
  "ngram": 1,
  "source": {
    "library": "own implementation (standard library)",
    "license": "n/a"
  },
  "stopwords_removed": true,
  "top": [
    {
      "count": 2,
      "share": 0.333333,
      "term": "cat"
    },
    {
      "count": 2,
      "share": 0.333333,
      "term": "sat"
    },
    {
      "count": 1,
      "share": 0.166667,
      "term": "dog"
    }
  ],
  "total": 6,
  "unique": 4
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed402272 ms$0.001
7 h agoPassed402275 ms$0.001
11 h agoPassed402359 ms$0.001
14 h agoPassed402274 ms$0.001
18 h agoPassed402268 ms$0.001
21 h agoPassed402260 ms$0.001
25 h agoPassed402264 ms$0.001
30 h agoPassed402272 ms$0.001