News Sentiment API
GET/v1/newssignals/sentiment/{entity}/history
Mentions and tone per 15-minute window (last 90 days) or per day, newest first. Point in time by construction: a window holds only records GDELT published in it. Refreshes every 15 minutes.
Price
$0.02/ callEdge cache
1800s
Uptime 24h
100.00%
p95
296ms
MCP tool
newssignals_sentiment-entity-history
The News Sentiment API provides signals derived from GDELT's 15-minute global news coding. It offers tone in basis points, mention volume, novelty, and trending data for various entities. The API returns mentions and tone per 15-minute window or per day, with a maximum history of 90 days. The data is refreshed every 15 minutes.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| entity* | path | string | |
| interval | query | string = 1d | 15m or 1d |
| from | query | string | |
| to | query | string | |
| limit | query | integer = 200 |
Code
# 1. No key, no payment: the gateway answers 402 with the price
curl -i "https://api.realtimeapi.ai/v1/newssignals/sentiment/org_nvidia/history"
# 2. Pay: retry with a signed x402 payment (any x402 client builds this header)
curl "https://api.realtimeapi.ai/v1/newssignals/sentiment/org_nvidia/history" -H "PAYMENT-SIGNATURE: $X402_PAYMENT"// npm i @x402/fetch @x402/core @x402/evm viem
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = x402Client.fromConfig({ schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(privateKeyToAccount(PRIVATE_KEY)) }] });
const pay = wrapFetchWithPayment(fetch, client);
const data = await (await pay("https://api.realtimeapi.ai/v1/newssignals/sentiment/org_nvidia/history")).json();
console.log(data);# pip install "x402[requests,evm]==2.27.0" eth-account
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact import register_exact_evm_client
client = x402ClientSync()
register_exact_evm_client(client, EthAccountSigner(Account.from_key(PRIVATE_KEY)))
session = x402_requests(client)
print(session.get("https://api.realtimeapi.ai/v1/newssignals/sentiment/org_nvidia/history").json())curl "https://api.realtimeapi.ai/v1/newssignals/sentiment/org_nvidia/history" -H "X-API-Key: $RTAPI_KEY"Frequently asked questions
What is the API endpoint?
The API endpoint is /sentiment/{entity}/history
What parameters are required?
The required parameters are entity, interval, from, to, and limit
How often is the data refreshed?
The data is refreshed every 15 minutes
What is the price of the API?
The price of the API is $0.020 per request