Wikifeeds

Wikifeeds is a Node.js service that provides content used in the featured content feeds of the. It was originally written as part of the Mobile Content Service, and later split out into a separate service.

Code repository: https://gerrit.wikimedia.org/g/mediawiki/services/wikifeeds

Deployment steps: Wikifeeds/Deployment Process

.../feed/announcements
 Stability: experimental 

This endpoint is meant to provide information about surveys and fundraising announcements for the iOS and Android apps only. It is experimental to the extent that it might significantly change or even go away in the future, more likely than other experimental endpoints. Client should code very defensively about the structure and the existence of this endpoint. If a client gets 404s, an exponential backoff strategy may be advisable.

Examples: [ https://en.wikipedia.org/api/rest_v1/feed/announcements Prod] | [ https://en.wikipedia.beta.wmflabs.org/api/rest_v1/feed/announcements Beta cluster] | [ http://wikifeeds.wmflabs.org/en.wikipedia.org/v1/feed/announcements Labs] | [ http://localhost:7231/en.wikipedia.org/v1/feed/announcements Local RB] | [ http://localhost:8889/en.wikipedia.org/v1/feed/announcements Local Wikifeeds]

See the announcement config spec: Wikimedia Apps/Team/RESTBase services for apps/Feed announcement config spec

.../feed/featured/{yyyy}/{mm}/{dd}
 Stability: unstable 

This endpoint provides an aggregation of feed related microservices for one specific day. Note that year has to be exactly four digits, and month and day have to be two digits. Pad with 0 if needed. Earliest year supported is 2016. Example: 2016/07/01.

The response contains the following properties:


 * : featured article (WP languages supported: bg, bn, bs, cs, de, el, en, fa, he, hu, ja, la, no, sco, sd, sv, ur, vi, zh) Latest list and implementation
 * : featured image of the day (from Wikimedia Commons)
 * : a list of the previous day's top read articles
 * : current news, irrespective of day requested. This item is only available for a few wikis right now: da, de, el, en, es, fi, fr, he, ko, no, pl, pt, ru, sv, vi. Latest list and implementation if you want to help us expand it to more languages.

While the other feed microservices are implemented in Wikifeeds they are not exposed via RESTBase at this time. Some example URIs to just invoke the microservices locally is in the README.md of the source repo.

Examples: [ https://en.wikipedia.org/api/rest_v1/feed/featured/2017/02/06 Prod] | [ https://en.wikipedia.beta.wmflabs.org/api/rest_v1/feed/featured/2017/02/06 Beta cluster] | Labs | [ http://localhost:7231/en.wikipedia.org/v1/feed/featured/2017/02/06 Local RB] | Local Wikifeeds (Aggregated feed for Febuary 6th, 2017)

For debugging: Local Wikifeeds routes of microservices: [ http://localhost:8889/en.wikipedia.org/v1/page/featured/2017/02/06 tfa] | [ http://localhost:8889/en.wikipedia.org/v1/media/image/featured/2017/02/06 image] | [ http://localhost:8889/en.wikipedia.org/v1/page/most-read/2017/02/06 mostread] | [ http://localhost:8889/en.wikipedia.org/v1/page/news news] (news in Wikifeeds directly is always current, not easy to get to historic content, recent versions of the aggregated RESTBase endpoint try to preserve historical news as much as possible)

Note: Not all feed content may be supported for all languages.

.../feed/onthisday/{type}/{mm}/{dd}
 Stability: experimental 

This endpoint provides information about what event which happened on a specific day and month of the year. Note that month and day have to be two digits. Pad with 0 if needed. Example: selected/07/01. Supported types of events and some examples:


 * all: all of the following. Examples: [ https://en.wikipedia.org/api/rest_v1/feed/onthisday/all/02/06 Prod] | [ https://en.wikipedia.beta.wmflabs.org/api/rest_v1/feed/onthisday/all/02/06 Beta cluster] | [ http://wikifeeds.wmflabs.org/en.wikipedia.org/v1/feed/onthisday/all/02/06 Labs] | [ http://localhost:7231/en.wikipedia.org/v1/feed/onthisday/all/02/06 Local RB] | [ http://localhost:8889/en.wikipedia.org/v1/feed/onthisday/all/02/06 Local Wikifeeds]
 * selected: a list of a few selected anniversaries which happen on the provided day and month; often the entries are curated for the current year. Examples: [ https://en.wikipedia.org/api/rest_v1/feed/onthisday/selected/02/06 Prod] | [ https://en.wikipedia.beta.wmflabs.org/api/rest_v1/feed/onthisday/selected/02/06 Beta cluster] | [ http://wikifeeds.wmflabs.org/en.wikipedia.org/v1/feed/onthisday/selected/02/06 Labs] | [ http://localhost:7231/en.wikipedia.org/v1/feed/onthisday/selected/02/06 Local RB] | [ http://localhost:8889/en.wikipedia.org/v1/feed/onthisday/selected/02/06 Local Wikifeeds]
 * births: a list of birthdays which happened on the provided day and month. Examples: [ https://en.wikipedia.org/api/rest_v1/feed/onthisday/births/02/06 Prod] | [ https://en.wikipedia.beta.wmflabs.org/api/rest_v1/feed/onthisday/births/02/06 Beta cluster] | [ http://wikifeeds.wmflabs.org/en.wikipedia.org/v1/feed/onthisday/births/02/06 Labs] | [ http://localhost:7231/en.wikipedia.org/v1/feed/onthisday/births/02/06 Local RB] | [ http://localhost:8889/en.wikipedia.org/v1/feed/onthisday/births/02/06 Local Wikifeeds]
 * deaths: a list of deaths which happened on the provided day and month. Examples: [ https://en.wikipedia.org/api/rest_v1/feed/onthisday/deaths/02/06 Prod] | [ https://en.wikipedia.beta.wmflabs.org/api/rest_v1/feed/onthisday/deaths/02/06 Beta cluster] | [ http://wikifeeds.wmflabs.org/en.wikipedia.org/v1/feed/onthisday/deaths/02/06 Labs] | [ http://localhost:7231/en.wikipedia.org/v1/feed/onthisday/deaths/02/06 Local RB] | [ http://localhost:8889/en.wikipedia.org/v1/feed/onthisday/deaths/02/06 Local Wikifeeds]
 * holidays: a list of fixed holidays celebrated on the provided day and month. Examples: [ https://en.wikipedia.org/api/rest_v1/feed/onthisday/holidays/02/06 Prod] | [ https://en.wikipedia.beta.wmflabs.org/api/rest_v1/feed/onthisday/holidays/02/06 Beta cluster] | [ http://wikifeeds.wmflabs.org/en.wikipedia.org/v1/feed/onthisday/holidays/02/06 Labs] | [ http://localhost:7231/en.wikipedia.org/v1/feed/onthisday/holidays/02/06 Local RB] | [ http://localhost:8889/en.wikipedia.org/v1/feed/onthisday/holidays/02/06 Local Wikifeeds]
 * events: a list of significant events which happened on the provided day and month and which are not covered by the other types yet. Examples: [ https://en.wikipedia.org/api/rest_v1/feed/onthisday/events/02/06 Prod] | [ https://en.wikipedia.beta.wmflabs.org/api/rest_v1/feed/onthisday/events/02/06 Beta cluster] | [ http://wikifeeds.wmflabs.org/en.wikipedia.org/v1/feed/onthisday/events/02/06 Labs] | [ http://localhost:7231/en.wikipedia.org/v1/feed/onthisday/events/02/06 Local RB] | [ http://localhost:8889/en.wikipedia.org/v1/feed/onthisday/events/02/06 Local Wikifeeds]

Note: May not be supported for all languages.

.../page/random/{format}
 Stability: unstable 

Wikifeeds provides the format. All other formats ( and  ) are provided by RESTBase. See T132597 (Agree on feed endpoints).

This endpoint tries to provide more interesting pages in its result than a straight random MW API query. It prefers pages with a lead image, WD description, and longer text extract.

Examples:
 * : [ https://en.wikipedia.org/api/rest_v1/page/random/title Prod] | [ https://en.wikipedia.beta.wmflabs.org/api/rest_v1/page/random/title Beta cluster] | [ http://mobileapps.wmflabs.org/en.wikipedia.org/v1/page/random/title Labs] | [ http://localhost:7231/en.wikipedia.org/v1/page/random/title Local RB] | [ http://localhost:8889/en.wikipedia.org/v1/page/random/title Local Wikifeeds]
 * : [ https://en.wikipedia.org/api/rest_v1/page/random/summary Prod] | [ https://en.wikipedia.beta.wmflabs.org/api/rest_v1/page/random/summary Beta cluster] | [ http://mobileapps.wmflabs.org/en.wikipedia.org/v1/page/random/summary Labs] | [ http://localhost:7231/en.wikipedia.org/v1/page/random/summary Local RB] | [ http://localhost:8889/en.wikipedia.org/v1/page/random/summary Local Wikifeeds]
 * : [ https://en.wikipedia.org/api/rest_v1/page/random/mobile-sections-lead Prod] | [ https://en.wikipedia.beta.wmflabs.org/api/rest_v1/page/random/mobile-sections-lead Beta cluster] | [ http://mobileapps.wmflabs.org/en.wikipedia.org/v1/page/random/mobile-sections-lead Labs] | [ http://localhost:7231/en.wikipedia.org/v1/page/random/mobile-sections-lead Local RB] | [ http://localhost:8889/en.wikipedia.org/v1/page/random/mobile-sections-lead Local Wikifeeds]