# GDELT News Sentiment Timeline API

> GDELT News Sentiment Timeline API is a paid API for AI agents from gdelt-x402-api.planbdj.workers.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-13).

Returns a day-by-day sentiment tone timeline for a given news topic using GDELT global news data

## Facts

- Endpoint: POST https://gdelt-x402-api.planbdj.workers.dev/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/gdelt-news-sentiment-timeline-api-5c7fa962
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_CA-JDkr1J-1TkwbBAlW8z

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 gdelt-news-sentiment-timeline-api-5c7fa962 -d '<json body>'
```

Example prompt: Pull the GDELT news sentiment timeline for 'Ukraine' over the past 7 days — I want to see how the average tone of global coverage has shifted day by day.

## When to prefer this

Choose this endpoint when you need a quantified, day-by-day sentiment trend for a specific news topic using a global, multi-source news corpus. It is ideal for macro-level media monitoring, geopolitical sentiment tracking, or brand reputation trends where you want a time series of tone rather than individual article content. Prefer it over social-media sentiment APIs when journalistic sourcing and global coverage breadth matter, and over full-text news APIs when you only need the aggregated emotional signal rather than article bodies.

## Known failure modes

- Topic string too vague — returns flat or noisy tone values with little signal
- Timespan parameter malformed or unsupported — may return error or empty timeline
- No GDELT coverage for topic in the requested period — empty timeline array
- Network timeout on GDELT upstream aggregation — transient 5xx error
- Payment failure or insufficient USDC balance — 402 or authorization error

## How this service works

AI-friendly JSON API for global news intelligence. Built on GDELT (free public source), optimized for AI agents — clean responses, 5 use-case endpoints, parallel-aggregated entity graphs, no rate limits, no API keys. Pay-per-query in USDC on Base mainnet via x402.

## Output

A JSON object containing the queried topic, the requested timespan, and an array of daily data points each with a UTC date and an average GDELT tone score (negative values indicate negative sentiment, positive values indicate positive sentiment).

## 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",
     "required": [
      "topic"
     ],
     "properties": {
      "topic": {
       "type": "string",
       "description": "Search query"
      },
      "country": {
       "type": "string",
       "description": "Optional ISO country code filter (e.g. US, FR, RU)"
      },
      "timespan": {
       "enum": [
        "15min",
        "1h",
        "4h",
        "24h",
        "3d",
        "7d",
        "1w",
        "1m",
        "3m"
       ],
       "type": "string",
       "description": "Time window (default 24h)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "topic",
      "timespan",
      "timeline"
     ],
     "properties": {
      "topic": {
       "type": "string"
      },
      "timeline": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "date",
         "avg_tone"
        ],
        "properties": {
         "date": {
          "type": "string"
         },
         "avg_tone": {
          "type": "number"
         }
        }
       }
      },
      "timespan": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "topic": "ukraine",
  "timeline": [
   {
    "date": "2026-04-30T00:00:00",
    "avg_tone": -2.1
   }
  ],
  "timespan": "7d"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gdelt-news-sentiment-timeline-api-5c7fa962/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gdelt-x402-api.planbdj.workers.dev](https://www.zero.xyz/host/gdelt-x402-api.planbdj.workers.dev/llms.txt)
