Skip to content
Gregor Leban edited this page Sep 3, 2026 · 6 revisions

Different things and topics are popular on different days. Today it can be refugees, tomorrow Malaysian Airlines. Event Registry can provide you with an up to date list of concepts and categories that are currently trending the most.

The trends in Event Registry are computed by comparing how much is a particular thing appearing in the articles in the last two days compared to the last two weeks.

Trending concepts

In order to get a list of concepts that are currently trending the most, you can simply use the GetTrendingConcepts() class. Here is an example use of this class:

from eventregistry import *
er = EventRegistry(apiKey = YOUR_API_KEY)
q = GetTrendingConcepts(source = "news", count = 10,
    returnInfo = ReturnInfo(
        conceptInfo = ConceptInfoFlags(trendingHistory = True)))
ret = er.execQuery(q)

The resulting list in ret contains concept information of this form:

{
        "id": "270226",
        "uri": "http://en.wikipedia.org/wiki/Beau_Biden",
        "type": "person",
        "label": {
            "eng": "Beau Biden"
        },
        "trendingScore": {
            "news": {
                "nullPopFq": 31,
                "score": 209.213658995857,
                "testPopFq": 244
            }
        },
        "trendingHistory": {
            "latestArticleTimestamp": "2015-06-01 17:02:00",
            "news": [
                0, 1, 0, 0, 3, 21, 6, 0, 1, 0, 0, 0, 0, 0, 0, 0, 9, 12, 1, 0, 4, 0, 2, 1, 1, 0, 0, 1, 220, 26
            ]
        }
    },

Beside the id, uri, type, label, the object also includes the trendingScore information as well as the trendingHistory with counts for the concept in the last 30 days.

The parameters that you can specify when constructing the GetTrendingConcepts() class are the following:

  • source: source information from which to compute top trends. Options: news, social, pr, blogs
  • count: number of top trends to return
  • conceptType: which types of concepts should be returned. Default is ["person", "org", "loc"]
  • returnInfo: details about the concepts to return

Trending categories

As for trending concepts, we can also compute the currently top trending categories. The class to use in this case is GetTrendingCategories() and it can be used as follows:

from eventregistry import *
er = EventRegistry(apiKey = YOUR_API_KEY)
q = GetTrendingCategories(source = "news", count = 10)
ret = er.execQuery(q)

Trending groups of concepts

The class GetTrendingConceptGroups() returns the trending information for groups of concepts, where a group is identified either by the concept type or by a concept class URI. Use the getConceptTypeGroups(types) method to request trending of concepts of the specified types, or getConceptClassUris(conceptClassUris) to request trending of concepts assigned to the specified concept classes:

from eventregistry import *
er = EventRegistry(apiKey = YOUR_API_KEY)
q = GetTrendingConceptGroups(source = "news", count = 10)
q.getConceptTypeGroups(["person", "org"])
ret = er.execQuery(q)

Trending of custom items

If you are uploading your own data (such as stock prices or energy prices) into Event Registry, the class GetTrendingCustomItems(count, returnInfo) returns the top trending items among the ones you provided.

Clone this wiki locally