6 min readUpdated Mar 2, 2026

eventSearch Documentation

Purpose

The eventSearch logic is designed to interface with the GDELT (Global Database of Events, Language, and Tone) API. It enables users to search for global events and articles based on different parameters such as keywords, country, themes, domains, languages, and tones. This functionality is critical for applications that require the aggregation and analysis of real-time news and events across the globe.

Settings

The eventSearch component includes several settings that can be customized to fine-tune the behavior of the event search. Below is a detailed breakdown of each setting.

1. query

2. timespan

3. maxRecords

4. sort

5. country

6. theme

7. domain

8. language

9. toneFilter

How It Works

The eventSearch function asynchronously executes a search for articles using the configured parameters. Upon receiving the inputs and config, the function:

  1. Constructs a search configuration object (searchConfig) that consolidates the parameters for the search.
  2. Validates that the query field is not empty; if it is, an error message is returned.
  3. Calls the searchArticles method from the GDELT integration with the constructed searchConfig.
  4. Processes the results:
    • If articles are found, they are returned.
    • If no results are found, a default object is returned indicating no results.
    • In case of an error during the API call, the error message is returned.

AI Integrations

The eventSearch component does not incorporate any direct AI integrations. However, by leveraging the GDELT API, it indirectly utilizes AI to analyze and categorize news coverage and global events, offering insights into trends, sentiment, and thematic occurrences.

Billing Impact

Utilizing the eventSearch functionality may incur costs depending on the API usage limits set by GDELT, which typically depends on the number of requests made and the volume of data retrieved. It is advisable to review the GDELT API usage policy to understand potential impacts on billing.

Use Cases & Examples

Use Case 1: International News Monitoring

A global corporation wants to monitor international news for events affecting supply chain logistics. Using eventSearch, they can search for articles mentioning specific keywords related to logistics and filter them by country.

Use Case 2: Social Media Sentiment Analysis

A marketing team wishes to analyze the sentiment of articles published online regarding their brand. By setting a specific toneFilter, they can retrieve articles reflecting positive or negative sentiments of brand mentions.

Detailed Example Configuration

Scenario: A business needs to monitor logistics-related articles in the United States over the past week, with a maximum of 30 articles returned, sorted by the date.

Sample Configuration Data:

json
{
    "query": "logistics transport supply chain",
    "timespan": "7d",
    "maxRecords": 30,
    "sort": "datedesc",
    "country": "US",
    "theme": "",
    "domain": "reuters.com",
    "language": "en",
    "toneFilter": "positive"
}

Using this configuration, the eventSearch component would return the most recent 30 articles written in English about logistics, focusing particularly on positive sentiment within the United States.