# x402stock News Sentiment API

> x402stock News Sentiment API is a paid API for AI agents from x402stock.xyz, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-13).

Returns media sentiment analysis and tone scoring for a search query over a specified timespan, powered by GDELT news data

## Facts

- Endpoint: GET https://x402stock.xyz/api/v1/news-sentiment
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402stock-news-sentiment-api-6abeacbb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_eRAE8zbARR1jPv9LjWxN4

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 x402stock-news-sentiment-api-6abeacbb
```

Example prompt: What's the current news sentiment for Nvidia over the past week — is coverage trending positive or negative, and can you show me the tone timeline?

## When to prefer this

Use this endpoint when you need structured, quantified news sentiment for any financial asset, company, macro topic, or public figure — especially when you need tone trends over time (hourly timeline) rather than just a headline score. Prefer this over generic social sentiment APIs when you want news media coverage specifically, backed by GDELT's global news monitoring. Ideal for AI agents making investment-adjacent decisions or summarizing how the press is covering a topic.

## Known failure modes

- Missing required 'q' parameter returns validation error
- Query string too short (under 2 chars) or too long (over 120 chars) fails schema validation
- Invalid timespan value outside enum fails validation
- No matching news coverage for obscure query returns empty or null tone values
- Payment failure via x402/USDC returns 402 Payment Required
- GDELT upstream outage may cause delayed or unavailable data

## How this service works

Global news attention and tone for any company, ticker, or topic, from the GDELT Project's worldwide news monitoring. Pass `?q=Nvidia` (required), `?timespan=1d|3d|1w|2w|1m|3m` (default 1w). Returns average and latest tone with a positive/neutral/negative label and trend, an article-volume timeline, and recent headlines. A media-sentiment read distinct from the Reddit/4chan feeds. From x402stock

## Output

Returns a sentiment object with average and latest GDELT tone scores (roughly -10 to +10), a label (positive/neutral/negative), a trend direction (improving/worsening), a hourly tone timeline, an article volume timeline with total monitored count, and a list of recent articles with titles, URLs, domains, and publication times — all attributed to the GDELT Project.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "q": "artificial intelligence",
   "timespan": "1w"
  }
 }
}
```

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "required": [
      "timespan"
     ],
     "properties": {
      "q": {
       "type": "string",
       "maxLength": 120,
       "minLength": 2
      },
      "timespan": {
       "enum": [
        "1d",
        "3d",
        "1w",
        "2w",
        "1m",
        "3m"
       ],
       "type": "string",
       "default": "1w"
      }
     },
     "additionalProperties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "required": [
      "source",
      "venue",
      "as_of",
      "query",
      "timespan",
      "sentiment",
      "volume",
      "tone_timeline",
      "volume_timeline",
      "recent_articles",
      "attribution"
     ],
     "properties": {
      "as_of": {
       "type": "string"
      },
      "query": {
       "type": "string"
      },
      "venue": {
       "type": "string",
       "const": "gdelt"
      },
      "source": {
       "type": "string",
       "const": "x402stock"
      },
      "volume": {
       "type": "object",
       "required": [
        "total_articles",
        "points"
       ],
       "properties": {
        "points": {
         "type": "number"
        },
        "total_articles": {
         "type": "number"
        }
       },
       "additionalProperties": false
      },
      "timespan": {
       "type": "string"
      },
      "sentiment": {
       "type": "object",
       "required": [
        "latest_tone",
        "average_tone",
        "label",
        "trend",
        "scale"
       ],
       "properties": {
        "label": {
         "type": "string"
        },
        "scale": {
         "type": "string"
        },
        "trend": {
         "type": "string"
        },
        "latest_tone": {
         "anyOf": [
          {
           "type"
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "as_of": "2026-06-06T02:40:00.000Z",
  "query": "Nvidia",
  "venue": "gdelt",
  "source": "x402stock",
  "volume": {
   "points": 167,
   "total_articles": 2841
  },
  "timespan": "1w",
  "sentiment": {
   "label": "neutral",
   "scale": "GDELT average tone, roughly -10 (very negative) to +10 (very positive); 0 is neutral.",
   "trend": "improving",
   "latest_tone": 0.42,
   "average_tone": 0.31
  },
  "attribution": "Source: The GDELT Project (https://www.gdeltproject.org/)",
  "tone_timeline": [
   {
    "date": "2026-06-06T00:00:00Z",
    "tone": -0.198
   },
   {
    "date": "2026-06-06T01:00:00Z",
    "tone": 0.755
   },
   {
    "date": "2026-06-06T02:00:00Z",
    "tone": 0.42
   }
  ],
  "recent_articles": [
   {
    "url": "https://www.techtimes.com/articles/317846/20260605/nvidia-not-only-ai-chip-winner-broadcom.htm",
    "seen": "2026-06-06T02:15:00Z",
    "title": "NVIDIA Is Not the Only AI Chip Winner: Broadcom Forecasts $56 Billion",
    "domain": "techtimes.com",
    "language": "English",
    "source_country": "United States"
   }
  ],
  "volume_timeline": [
   {
    "date": "2026-06-06T01:00:00Z",
    "articles": 21,
    "total_monitored": 3104
   },
   {
    "date": "2026-06-06T02:00:00Z",
    "articles": 17,
    "total_monitored": 3179
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402stock-news-sentiment-api-6abeacbb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402stock.xyz](https://www.zero.xyz/host/x402stock.xyz/llms.txt)
