Server402 marketplace

Paid API service

Word Count

Count Unicode characters, whitespace-delimited words, and lines in a text string.

Invocation

Service ID
word-count
Method
POST
Endpoint
/api/tools/word-count
Legacy Endpoint
none
MCP Tool
word_count
Price
USD 0.05

Payment

Call the endpoint without payment to receive HTTP 402 metadata. After payment is complete, retry with X-Payment-Token, an x402 payment signature, or MCP paymentToken.

Create a payment with POST /api/payments using serviceId="word-count", then pass the returned token in X-Payment-Token or MCP paymentToken.

Schema And Examples

{
  "exampleRequest": {
    "text": "hello paid api"
  },
  "exampleResponse": {
    "characters": 14,
    "lines": 1,
    "words": 3
  },
  "inputSchema": {
    "properties": {
      "text": {
        "type": "string"
      }
    },
    "required": [
      "text"
    ],
    "type": "object"
  },
  "outputSchema": {
    "properties": {
      "characters": {
        "type": "integer"
      },
      "lines": {
        "type": "integer"
      },
      "words": {
        "type": "integer"
      }
    },
    "type": "object"
  }
}