# whatson.red skill

Use the whatson.red Agent API when the user wants XiaoHongShu / RED search results returned as JSON.

## Auth
For account-based access, create an API key on https://www.whatson.red/agents and store it as `WHATSON_RED_API_KEY`.

Send:
`Authorization: Bearer ${WHATSON_RED_API_KEY}`

For accountless REST access, omit the bearer token and use x402. The first request returns `402 Payment Required` with a `PAYMENT-REQUIRED` header. Pay the returned requirement, then retry with the x402 payment header.

x402 is currently REST-only. MCP still requires an API key.

## HTTP API
POST https://www.whatson.red/api/agent/search

```json
{
  "query": "best cafes shanghai",
  "limit": 10,
  "includeNoteDetails": true,
  "includeBlog": false
}
```

Response shape:
- `query`
- `translatedQuery`
- `searchQuery`
- `notes`
- `noteDetails` (optional)
- `blog` (optional)
- `blogError` (optional)
- `usage`

## x402 REST Payments
Endpoint:
`POST https://www.whatson.red/api/agent/search`

Price:
- `$0.05` USDC per raw search
- Networks: Base (`eip155:8453`), Polygon (`eip155:137`), Arbitrum (`eip155:42161`)
- Asset: USDC

Limitations:
- x402 does not require a whatson.red login.
- x402 currently supports raw REST search only.
- `includeBlog=true` is not available on x402 yet.
- Existing API keys continue to use account credits.

## MCP
Streamable HTTP endpoint:
`https://www.whatson.red/api/agent/mcp`

Primary tool:
`search_xiaohongshu_notes`

Arguments:
- `query` (required)
- `limit` (1-20)
- `include_note_details`
- `include_blog`

## Billing
- UI search on whatson.red: 1 credit
- Agent search with API key: 0.5 credit
- Agent search with API key and bundled blog draft: 1 credit
- REST x402 search: $0.05 USDC

## Behavior
- API-key and MCP requests act on behalf of a paid whatson.red user account.
- x402 REST requests are accountless and are authorized by payment.
- Notes are returned as normalized JSON.
- `includeBlog=true` returns a draft blog/article payload and does not publish a public post.
