Description
The concept of whether or not content is ‘trending’ is increasingly common on Search and AI reuse scenarios. Increases in activity relative to other pages often correlate with current events. For that reason, this signal is useful to communicate the timely relevance of articles and to highlight Wikipedia as a source of both popular and up-to-date information.
Within the concept of trending, there are also two flavors: The notion of the top articles within WIkimedia as a whole, as well as highlighting when pages are trending relative to their baseline performance. For the scope of this ticket, we will focus on the first element, which will provide context about whether or not the given article is in the 'top' category for editing, reading, or both.
Conditions of acceptance
- Determine a path for implementing the 'top' signal, within a trust_and_relevance.trending object (see recommended object structure below)
- Pages should be tagged with:
- top_read: true --> Returned if the requested page is in the top read category for the project
- top_edited: true --> Returned if the requested page is in the top edited category for the project
- top_read_and_edited: true --> Returned if the requested page is in both the top read and top edited categories for the project
- Return false if the pages is not in any of the given categories
- Determine how to best cache/store this information so that it is not pulled on every request
- AQS updates data every 24 hours (confirm this with DPE), meaning the 'top' indicators will not change more frequently than that
- Calculate top for a per-day window (eg: Top read yesterday)
- Document recommended path to review with team
Implementation details
The notion of "Top" currently exists within the AQS Analytics API:
- List most-viewed pages: https://doc.wikimedia.org/generated-data-platform/aqs/analytics-api/reference/page-views.html#list-most-viewed-pages --> Returns top 1000 viewed pages per project; updated every 24 hours (?)
- List most-edited pages: https://doc.wikimedia.org/generated-data-platform/aqs/analytics-api/reference/edits.html#list-most-edited-pages-by-number-of-edits --> Returns top 100 pages based on number of edits per project; updated every 24 hours (?)
Potential tech approach:
- Implement as a maintenance script on daily cron job & store within Attribution stash
- Iterate through wiki projects
Suggested response payload (but open to whatever other structure/recommendations):
"trust_and_relevance": {
"last_modified": "2026-02-22T15:39:51Z",
"page_views": 470381,
"contributor_counts": 0,
"trending": {
"top": {
"read": boolean,
"edited": boolean,
"read_and_edited": boolean
},
"relative": {
"read": boolean,
"edited": boolean,
"read_and_edited": boolean
}
}
},