# GDELT News Monitor - Keyword News Tracking API (`vhsgreed/news-monitor-gdelt-fresh`) Actor

Monitor global news coverage for one or more keywords via the keyless GDELT 2.0 DOC API. Returns matching articles with title, source, URL and publication timestamp.

- **URL**: https://apify.com/vhsgreed/news-monitor-gdelt-fresh.md
- **Developed by:** [Karl Sundström](https://apify.com/vhsgreed) (community)
- **Categories:** News, Developer tools
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.25 / 1,000 article delivereds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## GDELT News Monitor (keyless)

Apify actor that monitors global news via the **GDELT 2.0 DOC API**
(`https://api.gdeltproject.org/api/v2/doc/doc`) — no API key required.

**Verification date: 2026-09-25.** The parameter set below was verified with
live calls to the API on that date:

### Verified parameter set

| Parameter | Value | Notes |
|---|---|---|
| `query` | keywords + filters | required; see query syntax below |
| `mode` | `ArtList` | article list mode |
| `format` | `json` | returns `{"articles": [...]}` |
| `sort` | `DateDesc` | newest first |
| `maxrecords` | `75` | API caps a single request at 75 |
| `timespan` | e.g. `24h`, `7d` | rolling window; alternative to datetime range |
| `startdatetime` / `enddatetime` | `YYYYMMDDHHMMSS` | explicit UTC window |
| `domain:<d>` | optional query suffix | e.g. `domain:reuters.com` |
| `sourcecountry:<c>` | optional query suffix | lowercase code; uppercase `SK` was rejected live with "Invalid/Unsupported Country" |

### Query syntax (verified)

- Multiple keywords must be OR'd as a **quoted, parenthesized** group:
  `("renewable energy" OR "solar power")`. Unparenthesized OR groups are
  rejected by the API ("Queries containing OR'd terms must be surrounded
  by ()").
- The actor quotes multi-word keywords and builds the parenthesized OR
  group automatically from comma-separated input.
- Rate limit: GDELT allows ~1 request / 5 s per IP. The actor retries
  throttled responses (up to 5 times, 6 s apart).

### Input

```json
{
  "keywords": "renewable energy, solar power",
  "timespan": "7d",
  "maxItems": 10
}
```

Optional: `startDateTime`/`endDateTime` (`YYYYMMDDHHMMSS`), `domain`
(comma-separated), `sourceCountry` (comma-separated lowercase codes).

### Output

One item per article, deduplicated by URL:

```json
{
  "url": "...",
  "title": "...",
  "seendate": "20260925T094500Z",
  "domain": "example.com",
  "language": "English",
  "sourcecountry": "United States",
  "queryMatch": "(\"renewable energy\" OR \"solar power\")"
}
```

### Pricing (pay-per-event)

- `actor-start`: $0.05 (once per run)
- `result-found`: $0.00125 per article
- max total charge: $5.00 per run

# Actor input Schema

## `keywords` (type: `string`):

Comma-separated keywords OR'd together, e.g. 'renewable energy, solar power'. Multi-word terms are quoted automatically.

## `timespan` (type: `string`):

How far back to search, GDELT format e.g. '24h', '7d', '1w' (default 24h). Ignored if start/end datetime given.

## `startDateTime` (type: `string`):

Optional window start, format YYYYMMDDHHMMSS (UTC), e.g. 20260918000000. Use together with End datetime.

## `endDateTime` (type: `string`):

Optional window end, format YYYYMMDDHHMMSS (UTC).

## `domain` (type: `string`):

Optional comma-separated domains to restrict results, e.g. 'reuters.com, apnews.com'. Appended as GDELT domain: filters.

## `sourceCountry` (type: `string`):

Optional comma-separated GDELT source-country codes (lowercase FIPS-style, e.g. 'us, sk, de'). Appended as sourcecountry: filters.

## `maxItems` (type: `integer`):

Cap on articles returned (default 75, max 500). GDELT returns up to 75 per request; older pages are fetched only if needed.

## Actor input object example

```json
{
  "timespan": "24h",
  "maxItems": 75
}
```

# Actor output Schema

## `articles` (type: `string`):

Array of matching articles: url, title, seendate, domain, language, sourcecountry, queryMatch.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("vhsgreed/news-monitor-gdelt-fresh").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("vhsgreed/news-monitor-gdelt-fresh").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call vhsgreed/news-monitor-gdelt-fresh --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vhsgreed/news-monitor-gdelt-fresh"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/fbQv1HFcLXTIuCyem/builds/bx6iGGW1PWHduiBvx/openapi.json
