The Newspilot API provides programmatic access to news signal intelligence. Three endpoints let your AI agent search for related topics, discover emerging signals, and track trending stories.
Base URL:
https://api.newspilot.cc/api/v1All endpoints return JSON. Use the Authorization: Bearer <api_key> header for authentication.
Give your AI agent real-time news intelligence. Works with Claude Code, Codex, Cursor, Windsurf, and any tool that supports skill/md files.
Run in terminal:
Set your API key as an environment variable in your shell. The agent will read it automatically. Not sure how? Just give your key to the agent — it can configure it for you.
export NEWSPILOT_API_KEY="np_your_api_key_here"After installation, ask your AI agent:
Your AI agent will search Newspilot and return related topics with full context — background overview, weekly update, latest events, and parent/child topic hierarchy.
Your AI agent will call the hot_signal endpoint and present trending topics ranked by recent event count.
Input an event description and retrieve the most semantically similar news topics. Each result includes a rich topic profile with descriptions, hierarchy, and optional event details.
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | Event description (declarative statement of the event, avoid temporal modifiers like "recently") |
| top_k | int | No | Number of topics to return (0-20, default 5) |
| events_per_topic | int | No | Events per topic. 0 = none (default), -1 = all, N = latest N events sorted by date descending |
Retrieve the daily generated snapshot of newly formed signals (topics). The date field indicates which UTC+0 day this snapshot describes, and the returned topic content is resolved from the snapshot's stored topic indices.
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | int | No | Number of signals to return (0-200, default 50) |
Retrieve the daily generated snapshot of hottest signals ranked by the number of newly added events for that day. The date field indicates which UTC+0 day this snapshot describes, and the returned topic content is resolved from the snapshot's stored topic indices.
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | int | No | Number of signals to return (0-200, default 50) |
All API requests require an API key passed via the Authorization header.
Authorization: Bearer your_api_key_here
You can manage your API keys from the Dashboard. Keep your keys secret — do not expose them in client-side code.
All errors follow a consistent JSON format with an error code and human-readable message.
{
"error": {
"code": "INVALID_QUERY",
"message": "query parameter is required"
}
}| Status | Code | Scenario |
|---|---|---|
| 400 | INVALID_QUERY | Query is empty or malformed |
| 401 | UNAUTHORIZED | Invalid or missing API key |
| 429 | RATE_LIMITED | Rate limit exceeded |
| 500 | INTERNAL_ERROR | Server internal error |