# x402node AFINN Sentiment Scorer

> x402node AFINN Sentiment Scorer is a paid API for AI agents from api.x402node.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Scores the sentiment of a text string using lexicon-based (AFINN-style) analysis, returning a raw score, normalized score, label, and positive/negative word hits.

## Facts

- Endpoint: GET https://api.x402node.dev/nlp/sentiment
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-x402node-dev-949f2fac
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nsy-qvMsFELZdWCMwlS9j

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 api-x402node-dev-949f2fac
```

Example prompt: Score the sentiment of this review and tell me if it's positive, negative, or neutral, along with which words pushed it each way: 'The battery life is incredible but the screen is way too dim.'

## When to prefer this

Choose this endpoint when you need fast, lightweight, interpretable sentiment scoring with explicit word-level evidence (positive/negative hits) — ideal for review triage, social monitoring, and feedback classification where you want to see which specific words drove the score, rather than a black-box ML model output.

## Known failure modes

- Empty or missing text parameter returns an error or neutral score
- Very short or stopword-only text may produce a neutral label with zero word hits
- Non-English text may score inaccurately since AFINN is English-centric
- Payment failure (402) if USDC balance is insufficient

## How this service works

Lexicon-based sentiment scoring (AFINN-style). Returns raw score, length-normalized score, label (positive/neutral/negative), positive/negative word hits. Use ?text=This+product+is+amazing. Built for AI agents doing review analysis, social monitoring, and feedback triage. Accepts payment on Base or Solana — either network works.

## Output

Returns a raw AFINN-style sentiment score, a length-normalized score, a categorical label (positive/neutral/negative), and lists of positive and negative word hits found in the input text.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "Input text (required)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-x402node-dev-949f2fac/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402node.dev](https://www.zero.xyz/host/api.x402node.dev/llms.txt)
