| swagger: "2.0" | |
| info: | |
| version: 1.0.0 | |
| title: Wikifeeds API | |
| description: | | |
| The Wikifeeds API provides daily curated content from Wikipedia, such as featured | |
| articles, most-read articles, and current events. Wikipedia content from this API | |
| is available under the [CC BY-SA](https://creativecommons.org/licenses/by-sa/4.0/) | |
| license. Images and media files from this API are licensed individually according | |
| to the image metadata. | |
| termsOfService: https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use#12._API_Terms | |
| contact: | |
| name: Wikimedia Content Transform Team | |
| url: https://www.mediawiki.org/wiki/Special:MyLanguage/Content_Transform_Team | |
| license: | |
| name: Apache2 | |
| url: http://www.apache.org/licenses/LICENSE-2.0 | |
| externalDocs: | |
| url: https://www.mediawiki.org/wiki/Special:MyLanguage/Wikifeeds_API | |
| description: API documentation | |
| tags: | |
| - name: Feed | |
| description: Daily featured content from Wikipedia | |
| - name: Page | |
| description: Wikipedia articles | |
| - name: Internal | |
| description: Private and internal endpoints | |
| x-default-params: | |
| domain: en.wikipedia.org | |
| parameters: | |
| domain: | |
| in: path | |
| name: domain | |
| required: true | |
| type: string | |
| description: Wikimedia project domain | |
| year: | |
| in: path | |
| name: year | |
| required: true | |
| type: integer | |
| description: Four-digit year (2016 and later) | |
| minimum: 2016 | |
| maximum: 2999 | |
| month: | |
| in: path | |
| name: month | |
| required: true | |
| type: string | |
| description: Two-digit month, 0-padded if necessary (01-12) | |
| pattern: "^(0[1-9]|1[012])$" | |
| day: | |
| in: path | |
| name: day | |
| required: true | |
| type: string | |
| description: Two-digit day of the month, 0-padded if necessary (01-31) | |
| pattern: "^(0[1-9]|[12][0-9]|3[01])$" | |
| paths: | |
| # from routes/root.js | |
| /robots.txt: | |
| get: | |
| summary: Get robots.txt | |
| operationId: getRobotsTxt | |
| tags: | |
| - Internal | |
| description: Returns the robots.txt file. | |
| responses: | |
| 200: | |
| description: Success | |
| default: | |
| description: Error | |
| schema: | |
| $ref: "#/definitions/problem" | |
| x-monitor: false | |
| /: | |
| get: | |
| summary: Root endpoint | |
| operationId: rootEndpoint | |
| tags: | |
| - Internal | |
| description: The root service end-point | |
| produces: | |
| - application/json | |
| - application/problem+json | |
| responses: | |
| 200: | |
| description: Success | |
| default: | |
| description: Error | |
| schema: | |
| $ref: "#/definitions/problem" | |
| x-amples: | |
| - title: spec from root | |
| request: | |
| query: | |
| spec: true | |
| response: | |
| status: 200 | |
| # from routes/info.js | |
| /_info: | |
| get: | |
| summary: Get service information | |
| operationId: getServiceInformation | |
| tags: | |
| - Internal | |
| description: Returns information about the service. | |
| produces: | |
| - application/json | |
| - application/problem+json | |
| responses: | |
| 200: | |
| description: Success | |
| default: | |
| description: Error | |
| schema: | |
| $ref: "#/definitions/problem" | |
| x-amples: | |
| - title: retrieve service info | |
| request: {} | |
| response: | |
| status: 200 | |
| headers: | |
| content-type: application/json | |
| body: | |
| name: /.+/ | |
| description: /.+/ | |
| version: /.+/ | |
| home: /.+/ | |
| # from routes/feed/availability.js | |
| /{domain}/v1/feed/availability: | |
| get: | |
| tags: | |
| - Feed | |
| summary: Get supported projects | |
| operationId: getSupportedProjects | |
| description: Returns availability of featured feed content by Wikimedia project domain. | |
| produces: | |
| - application/json | |
| - application/problem+json | |
| parameters: | |
| - $ref: "#/parameters/domain" | |
| responses: | |
| 200: | |
| description: Availability of the feed content by wiki domain | |
| schema: | |
| $ref: "#/definitions/availability" | |
| default: | |
| description: Error | |
| schema: | |
| $ref: "#/definitions/problem" | |
| x-amples: | |
| - title: Retrieve feed content availability from \'wikipedia.org\' | |
| request: | |
| params: | |
| domain: wikimedia.org | |
| response: | |
| status: 200 | |
| headers: | |
| content-type: application/json | |
| vary: /.+/ | |
| etag: /^"[^/"]+/[^/"]+"$/ | |
| access-control-allow-origin: "*" | |
| access-control-allow-headers: accept, x-requested-with, content-type | |
| content-security-policy: default-src | |
| x-content-security-policy: default-src | |
| x-frame-options: SAMEORIGIN | |
| body: | |
| todays_featured_article: [ /.+/ ] | |
| most_read: [ "*" ] | |
| picture_of_the_day: [ "*" ] | |
| in_the_news: [ /.+/ ] | |
| on_this_day: [ /.+/ ] | |
| did_you_know: [ /.+/ ] | |
| # from routes/feed/announcements.js | |
| /{domain}/v1/feed/announcements: | |
| get: | |
| tags: | |
| - Internal | |
| summary: Get app announcements | |
| operationId: getAppAnnouncements | |
| description: | | |
| Returns announcements for display in the official Wikipedia mobile apps. | |
| This is usually used to show announcements for surveys or fundraising. | |
| produces: | |
| - application/json; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/Announcements/0.3.0" | |
| - application/problem+json | |
| parameters: | |
| - $ref: "#/parameters/domain" | |
| responses: | |
| 200: | |
| description: Announcements for the wiki | |
| schema: | |
| $ref: "#/definitions/announcements" | |
| default: | |
| description: Error | |
| schema: | |
| $ref: "#/definitions/problem" | |
| x-amples: | |
| - title: Retrieve announcements | |
| response: | |
| status: 200 | |
| headers: | |
| content-type: application/json; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/Announcements/0.3.0" | |
| cache-control: public, max-age=86400, s-maxage=900 | |
| vary: /.+/ | |
| etag: /^"[^/"]+/[^/"]+"$/ | |
| access-control-allow-origin: "*" | |
| access-control-allow-headers: accept, x-requested-with, content-type | |
| content-security-policy: default-src | |
| x-content-security-policy: default-src | |
| x-frame-options: SAMEORIGIN | |
| # from routes/feed/on-this-day.js | |
| /{domain}/v1/feed/onthisday/{type}/{month}/{day}: | |
| get: | |
| tags: | |
| - Feed | |
| summary: Get events on a day in history | |
| operationId: getEventsOnADayInHistory | |
| description: | | |
| Returns events that occurred on a day in history, including notable historical | |
| events, holidays, and births and deaths of notable people. | |
| produces: | |
| - application/json | |
| - application/problem+json | |
| parameters: | |
| - $ref: "#/parameters/domain" | |
| - name: type | |
| in: path | |
| description: | | |
| Type of event, one of: | |
| - `selected`: Curated set of events | |
| - `births`: Notable births | |
| - `deaths`: Notable deaths | |
| - `holidays`: Fixed holidays | |
| - `events`: Events not included in another type | |
| - `all`: All of the above | |
| type: string | |
| required: true | |
| enum: | |
| - selected | |
| - births | |
| - deaths | |
| - holidays | |
| - events | |
| - all | |
| - $ref: "#/parameters/month" | |
| - $ref: "#/parameters/day" | |
| responses: | |
| 200: | |
| description: Events on this day in history | |
| schema: | |
| $ref: "#/definitions/onthisdayResponse" | |
| 404: | |
| description: No data found for the requested date | |
| schema: | |
| $ref: "#/definitions/problem" | |
| 501: | |
| description: Unsupported language | |
| schema: | |
| $ref: "#/definitions/problem" | |
| default: | |
| description: Error | |
| schema: | |
| $ref: "#/definitions/problem" | |
| x-amples: | |
| - title: retrieve selected events on January 15 | |
| request: | |
| params: | |
| type: selected | |
| month: 01 | |
| day: 15 | |
| response: | |
| status: 200 | |
| headers: | |
| content-type: application/json | |
| vary: /.+/ | |
| etag: /^"[^/"]+/[^/"]+"$/ | |
| access-control-allow-origin: "*" | |
| access-control-allow-headers: accept, x-requested-with, content-type | |
| content-security-policy: default-src | |
| x-content-security-policy: default-src | |
| x-frame-options: SAMEORIGIN | |
| body: | |
| selected: | |
| - text: /.+/ | |
| year: /.+/ | |
| pages: | |
| - title: /.+/ | |
| # from routes/feed/featured.js | |
| /{domain}/v1/page/featured/{year}/{month}/{day}: | |
| get: | |
| tags: | |
| - Internal | |
| summary: Get featured article of the day | |
| operationId: getFeaturedArticleOfTheDay | |
| description: | | |
| Returns the page title of "Today's featured article" (only works on select wikis). | |
| produces: | |
| - application/json | |
| - application/problem+json | |
| parameters: | |
| - $ref: "#/parameters/domain" | |
| - $ref: "#/parameters/year" | |
| - $ref: "#/parameters/month" | |
| - $ref: "#/parameters/day" | |
| responses: | |
| 200: | |
| description: The title of a Wikipedia's Featured Article of the Day | |
| schema: | |
| $ref: "#/definitions/summary" | |
| 204: | |
| description: Empty response (for feed content aggregation requests from RESTBase) | |
| schema: | |
| $ref: "#/definitions/empty" | |
| 404: | |
| description: Not found | |
| schema: | |
| $ref: "#/definitions/problem" | |
| 500: | |
| description: API Error | |
| schema: | |
| $ref: "#/definitions/problem" | |
| 501: | |
| description: Unsupported language | |
| schema: | |
| $ref: "#/definitions/problem" | |
| default: | |
| description: Error | |
| schema: | |
| $ref: "#/definitions/problem" | |
| x-amples: | |
| - title: retrieve title of the featured article for April 29, 2025 | |
| request: | |
| params: | |
| year: 2025 | |
| month: "04" | |
| day: 29 | |
| response: | |
| status: 200 | |
| headers: | |
| content-type: application/json; charset=utf-8 | |
| vary: /.+/ | |
| etag: /^"[^/"]+/[^/"]+"$/ | |
| access-control-allow-origin: "*" | |
| access-control-allow-headers: accept, x-requested-with, content-type | |
| content-security-policy: default-src | |
| x-content-security-policy: default-src | |
| x-frame-options: SAMEORIGIN | |
| body: | |
| title: /.+/ | |
| extract: /.+/ | |
| - title: retrieve featured article info for unsupported site (with aggregated=true) | |
| request: | |
| params: | |
| domain: is.wikipedia.org | |
| year: 2025 | |
| month: "04" | |
| day: 29 | |
| query: | |
| aggregated: true | |
| response: | |
| status: 204 | |
| body: "" | |
| # from routes/feed/featured-image.js | |
| /{domain}/v1/media/image/featured/{year}/{month}/{day}: | |
| get: | |
| tags: | |
| - Internal | |
| summary: Get picture of the day | |
| operationId: getPictureOfTheDay | |
| description: | | |
| Returns the daily featured image from Wikimedia Commons, including thumbnail and | |
| full resolution image URLs and a localized description based on the domain. | |
| produces: | |
| - application/json | |
| - application/problem+json | |
| parameters: | |
| - $ref: "#/parameters/domain" | |
| - $ref: "#/parameters/year" | |
| - $ref: "#/parameters/month" | |
| - $ref: "#/parameters/day" | |
| responses: | |
| 200: | |
| description: Picture of the day | |
| schema: | |
| $ref: "#/definitions/image" | |
| 204: | |
| description: Empty response (for feed content aggregation requests from RESTBase) | |
| schema: | |
| $ref: "#/definitions/empty" | |
| 404: | |
| description: Not found (no featured image for the requested date) | |
| schema: | |
| $ref: "#/definitions/problem" | |
| default: | |
| description: Error | |
| schema: | |
| $ref: "#/definitions/problem" | |
| x-amples: | |
| - title: retrieve featured image data for April 29, 2025 | |
| request: | |
| params: | |
| year: 2025 | |
| month: "04" | |
| day: 29 | |
| response: | |
| status: 200 | |
| headers: | |
| content-type: application/json; charset=utf-8 | |
| vary: /.+/ | |
| etag: /^"[^/"]+/[^/"]+"$/ | |
| access-control-allow-origin: "*" | |
| access-control-allow-headers: accept, x-requested-with, content-type | |
| content-security-policy: default-src | |
| x-content-security-policy: default-src | |
| x-frame-options: SAMEORIGIN | |
| body: | |
| title: /.+/ | |
| description: | |
| html: /.+/ | |
| text: /.+/ | |
| lang: /.+/ | |
| image: | |
| source: /.+/ | |
| width: /.+/ | |
| height: /.+/ | |
| credit: | |
| html: /.+/ | |
| text: /.+/ | |
| license: | |
| type: /.+/ | |
| code: /.+/ | |
| url: /.+/ | |
| artist: | |
| html: /.+/ | |
| text: /.+/ | |
| file_page: /.+/ | |
| wb_entity_id: /.+/ | |
| structured: | |
| captions: /.+/ | |
| thumbnail: | |
| source: /.+/ | |
| width: /.+/ | |
| height: /.+/ | |
| # from routes/feed/most-read.js | |
| /{domain}/v1/page/most-read/{year}/{month}/{day}: | |
| get: | |
| tags: | |
| - Internal | |
| summary: Get most-viewed pages | |
| operationId: getMostViewedPages | |
| description: | | |
| Returns the most-read articles for the date provided. | |
| The date is in UTC, as other endpoints, too. | |
| Only days prior to today's date are accepted. | |
| produces: | |
| - application/json | |
| - application/problem+json | |
| parameters: | |
| - $ref: "#/parameters/domain" | |
| - $ref: "#/parameters/year" | |
| - $ref: "#/parameters/month" | |
| - $ref: "#/parameters/day" | |
| responses: | |
| 200: | |
| description: Most-read article titles for this wiki for the requested date | |
| schema: | |
| $ref: "#/definitions/mostread" | |
| 204: | |
| description: Empty response (for feed content aggregation requests from RESTBase) | |
| schema: | |
| $ref: "#/definitions/empty" | |
| 404: | |
| description: No data found for the requested date | |
| schema: | |
| $ref: "#/definitions/problem" | |
| default: | |
| description: Error | |
| schema: | |
| $ref: "#/definitions/problem" | |
| x-amples: | |
| - title: retrieve the most-read articles for January 1, 2026 | |
| request: | |
| params: | |
| year: 2026 | |
| month: "01" | |
| day: "01" | |
| response: | |
| status: 200 | |
| headers: | |
| content-type: application/json | |
| vary: /.+/ | |
| etag: /^"[^/"]+/[^/"]+"$/ | |
| access-control-allow-origin: "*" | |
| access-control-allow-headers: accept, x-requested-with, content-type | |
| content-security-policy: default-src | |
| x-content-security-policy: default-src | |
| x-frame-options: SAMEORIGIN | |
| body: | |
| date: 2026-01-01Z | |
| articles: | |
| - views: /.+/ | |
| rank: /.+/ | |
| title: /.+/ | |
| extract: /.+/ | |
| - title: retrieve the most-read articles for January 1, 2026 (with aggregated=true) | |
| request: | |
| params: | |
| year: 2026 | |
| month: "01" | |
| day: "01" | |
| query: | |
| aggregated: true | |
| response: | |
| status: 200 | |
| headers: | |
| content-type: application/json; charset=utf-8 | |
| vary: /.+/ | |
| etag: /^"[^/"]+/[^/"]+"$/ | |
| access-control-allow-origin: "*" | |
| access-control-allow-headers: accept, x-requested-with, content-type | |
| content-security-policy: default-src | |
| x-content-security-policy: default-src | |
| x-frame-options: SAMEORIGIN | |
| body: | |
| date: 2025-12-31Z | |
| articles: | |
| - views: /.+/ | |
| rank: /.+/ | |
| title: /.+/ | |
| extract: /.+/ | |
| - title: retrieve most-read articles for date with no data (with aggregated=true) | |
| request: | |
| params: | |
| year: 2015 | |
| month: "01" | |
| day: "01" | |
| query: | |
| aggregated: true | |
| response: | |
| status: 204 | |
| body: "" | |
| # from routes/feed/news.js | |
| /{domain}/v1/page/news: | |
| get: | |
| tags: | |
| - Internal | |
| summary: Get current news headlines | |
| operationId: getCurrentNewsHeadlines | |
| description: | | |
| Returns content related to the current "In the News" template | |
| (for some wikis). | |
| produces: | |
| - application/json | |
| - application/problem+json | |
| parameters: | |
| - $ref: "#/parameters/domain" | |
| responses: | |
| 200: | |
| description: News content from a Wikipedia main page | |
| schema: | |
| $ref: "#/definitions/news" | |
| 204: | |
| description: Empty response (for feed content aggregation requests from RESTBase) | |
| schema: | |
| $ref: "#/definitions/empty" | |
| 501: | |
| description: Unsupported language | |
| schema: | |
| $ref: "#/definitions/problem" | |
| default: | |
| description: Error | |
| schema: | |
| $ref: "#/definitions/problem" | |
| x-amples: | |
| - title: get 'In the News' content | |
| response: | |
| status: 200 | |
| headers: | |
| content-type: application/json; charset=utf-8 | |
| vary: /.+/ | |
| etag: /^"[^/"]+/[^/"]+"$/ | |
| access-control-allow-origin: "*" | |
| access-control-allow-headers: accept, x-requested-with, content-type | |
| content-security-policy: default-src | |
| x-content-security-policy: default-src | |
| x-frame-options: SAMEORIGIN | |
| body: | |
| - story: /.+/ | |
| links: | |
| - title: /.+/ | |
| extract: /.+/ | |
| - title: get "In the News" content for unsupported language (with aggregated=true) | |
| request: | |
| params: | |
| domain: is.wikipedia.org | |
| query: | |
| aggregated: true | |
| response: | |
| status: 204 | |
| body: "" | |
| # from routes/page/random.js | |
| /{domain}/v1/page/random/title: | |
| get: | |
| tags: | |
| - Page | |
| summary: Get a random article | |
| operationId: getARandomArticle | |
| description: | | |
| Returns the title of a randomly picked article from the main namespace. | |
| Preference is given to articles with a thumbnail and an associated Wikidata description. | |
| produces: | |
| - application/json | |
| - application/problem+json | |
| parameters: | |
| - $ref: "#/parameters/domain" | |
| responses: | |
| 200: | |
| description: A random (good) article title | |
| schema: | |
| $ref: "#/definitions/random" | |
| 400: | |
| description: Bad request | |
| schema: | |
| $ref: "#/definitions/problem" | |
| default: | |
| $ref: "#/definitions/problem" | |
| x-amples: | |
| - title: retrieve a random article title | |
| response: | |
| status: 200 | |
| headers: | |
| content-type: application/json | |
| vary: /.+/ | |
| access-control-allow-origin: "*" | |
| access-control-allow-headers: accept, x-requested-with, content-type | |
| content-security-policy: default-src | |
| x-content-security-policy: default-src | |
| x-frame-options: SAMEORIGIN | |
| body: | |
| items: | |
| - title: /.+/ | |
| # from routes/configuration.js | |
| /{domain}/v1/feed/configuration: | |
| get: | |
| tags: | |
| - Internal | |
| summary: Get feed configuration | |
| operationId: getFeedConfiguration | |
| description: | | |
| Returns information for use in official Wikipedia mobile apps. | |
| produces: | |
| - application/json | |
| - application/problem+json | |
| parameters: | |
| - $ref: "#/parameters/domain" | |
| responses: | |
| 200: | |
| description: Configuration information | |
| 400: | |
| description: Bad request | |
| schema: | |
| $ref: "#/definitions/problem" | |
| default: | |
| $ref: "#/definitions/problem" | |
| x-amples: | |
| - title: retrieve configuration | |
| response: | |
| status: 200 | |
| headers: | |
| content-type: application/json | |
| body: | |
| commonv1: /.+/ | |
| # from routes/did-you-know.js | |
| /{domain}/v1/feed/did-you-know: | |
| get: | |
| tags: | |
| - Feed | |
| summary: Get featured facts | |
| operationId: getFeaturedFacts | |
| description: | | |
| Returns a series of facts from new or recently improved articles on Wikipedia. | |
| Featured facts are updated on a regular basis according to the policies | |
| of each wiki. | |
| produces: | |
| - application/json | |
| - application/problem+json | |
| parameters: | |
| - $ref: "#/parameters/domain" | |
| responses: | |
| 200: | |
| description: Featured facts | |
| schema: | |
| $ref: "#/definitions/didYouKnowList" | |
| 400: | |
| description: Bad request | |
| schema: | |
| $ref: "#/definitions/problem" | |
| default: | |
| $ref: "#/definitions/problem" | |
| x-amples: | |
| - title: retrieve featured facts | |
| response: | |
| status: 200 | |
| headers: | |
| content-type: application/json | |
| body: | |
| - html: /.+/ | |
| text: /.+/ | |
| # from routes/feed/aggregated.js | |
| /{domain}/v1/aggregated/featured/{year}/{month}/{day}: | |
| get: | |
| tags: | |
| - Feed | |
| summary: Get featured content | |
| operationId: getFeaturedContent | |
| description: | | |
| Returns featured content from Wikipedia for a given day. Depending on availability, | |
| the response can include the daily featured article (TFA), featured image or media file, | |
| list of most-read articles, and events from that day in history. Requests for the current | |
| day may also include the latest news stories and featured did-you-know facts (DYK). | |
| Use the availability endpoint to see supported content types per Wikimedia project. | |
| produces: | |
| - application/json | |
| - application/problem+json | |
| parameters: | |
| - $ref: "#/parameters/domain" | |
| - $ref: "#/parameters/year" | |
| - $ref: "#/parameters/month" | |
| - $ref: "#/parameters/day" | |
| responses: | |
| 200: | |
| description: Featured content | |
| schema: | |
| $ref: "#/definitions/featured_content" | |
| 404: | |
| description: Not found | |
| schema: | |
| $ref: "#/definitions/problem" | |
| 500: | |
| description: API Error | |
| schema: | |
| $ref: "#/definitions/problem" | |
| default: | |
| description: Error | |
| schema: | |
| $ref: "#/definitions/problem" | |
| x-amples: | |
| - title: retrieve aggregated featured content for April 29, 2025 | |
| request: | |
| params: | |
| year: 2025 | |
| month: "04" | |
| day: 29 | |
| response: | |
| status: 200 | |
| headers: | |
| content-type: application/json | |
| body: | |
| tfa: /.+/ | |
| mostread: /.+/ | |
| image: /.+/ | |
| onthisday: /.+/ | |
| definitions: | |
| # A https://tools.ietf.org/html/draft-nottingham-http-problem | |
| problem: | |
| required: | |
| - type | |
| properties: | |
| status: | |
| type: integer | |
| type: | |
| type: string | |
| title: | |
| type: string | |
| detail: | |
| type: string | |
| method: | |
| type: string | |
| uri: | |
| type: string | |
| empty: | |
| type: object | |
| properties: | |
| type: | |
| type: string | |
| description: description of original content type (buffer) | |
| data: | |
| type: array | |
| description: Buffer contents | |
| items: | |
| type: string | |
| additionalProperties: false | |
| dated_pageview: | |
| type: object | |
| properties: | |
| date: | |
| type: string | |
| description: Date that the data applies to in ISO 8601 format | |
| views: | |
| type: integer | |
| description: Number of views | |
| required: | |
| - date | |
| - views | |
| additionalProperties: false | |
| mostread_article: | |
| allOf: | |
| - $ref: "#/definitions/summary" | |
| - type: object | |
| properties: | |
| views: | |
| type: integer | |
| description: Number of views | |
| view_history: | |
| type: array | |
| description: Views for the previous five days | |
| items: | |
| $ref: "#/definitions/dated_pageview" | |
| rank: | |
| type: integer | |
| description: | | |
| Position in the list of most-viewed articles. Rank may | |
| not start with 1 and may not be sequential | |
| required: | |
| - views | |
| - rank | |
| mostread: | |
| description: List of most-read articles | |
| type: object | |
| properties: | |
| date: | |
| type: string | |
| description: Date that the data applies to in ISO 8601 format | |
| articles: | |
| type: array | |
| description: 50 articles with the highest number of views | |
| items: | |
| $ref: "#/definitions/mostread_article" | |
| required: | |
| - date | |
| - articles | |
| didYouKnowList: | |
| type: array | |
| description: | | |
| "List of facts continuing the question: Did you know... Facts start with an ellipsis | |
| and end with a question mark." | |
| items: | |
| type: object | |
| properties: | |
| text: | |
| type: string | |
| description: Fact in plain text | |
| html: | |
| type: string | |
| description: Fact in html | |
| required: | |
| - text | |
| - html | |
| onthisdayList: | |
| type: array | |
| items: | |
| type: object | |
| properties: | |
| text: | |
| type: string | |
| description: Short description in plain text | |
| year: | |
| type: integer | |
| description: Year the event occurred | |
| pages: | |
| type: array | |
| description: Related articles | |
| items: | |
| $ref: "#/definitions/summary" | |
| required: | |
| - text | |
| - pages | |
| onthisdayResponse: | |
| type: object | |
| description: Events that occurred on this day in history | |
| properties: | |
| births: | |
| $ref: "#/definitions/onthisdayList" | |
| deaths: | |
| $ref: "#/definitions/onthisdayList" | |
| events: | |
| $ref: "#/definitions/onthisdayList" | |
| holidays: | |
| $ref: "#/definitions/onthisdayList" | |
| selected: | |
| $ref: "#/definitions/onthisdayList" | |
| additionalProperties: false | |
| news_item: | |
| type: object | |
| properties: | |
| story: | |
| type: string | |
| description: Short summary of the story in HTML | |
| links: | |
| type: array | |
| description: Articles related to the story | |
| items: | |
| $ref: "#/definitions/summary" | |
| required: | |
| - story | |
| - links | |
| news: | |
| type: array | |
| description: Stories from today's news. Available only for the current day in UTC. | |
| items: | |
| $ref: "#/definitions/news_item" | |
| image: | |
| type: object | |
| properties: | |
| title: | |
| type: string | |
| description: Image title | |
| thumbnail: | |
| $ref: "#/definitions/image_props" | |
| image: | |
| $ref: "#/definitions/image_props" | |
| description: | |
| $ref: "#/definitions/extmetadata_property" | |
| file_page: | |
| type: string | |
| description: URL for the image's attribution page | |
| artist: | |
| type: object | |
| description: Information about the image's author | |
| properties: | |
| html: | |
| type: string | |
| description: Artist name in HTML | |
| text: | |
| type: string | |
| description: Artist name in plain text | |
| name: | |
| type: string | |
| description: Artist name in plain text | |
| user_page: | |
| type: string | |
| description: User page for the artist on Wikimedia Commons | |
| required: | |
| - html | |
| credit: | |
| $ref: "#/definitions/extmetadata_property" | |
| license: | |
| type: object | |
| description: License under which the image is available | |
| properties: | |
| type: | |
| type: string | |
| description: Name of the license in plain text | |
| code: | |
| type: string | |
| description: Code for the license, such as cc-by-sa-4.0 | |
| url: | |
| type: string | |
| description: URL describing the terms and conditions of the license, if any | |
| required: | |
| - type | |
| wb_entity_id: | |
| type: string | |
| description: Wikimedia Commons Wikibase (WB) identifier, if the file is on Wikimedia Commons | |
| structured: | |
| type: object | |
| description: Image captions and tags | |
| properties: | |
| captions: | |
| type: object | |
| description: | | |
| Multilingual captions for the image as key-value pairs with the language code | |
| and translated caption | |
| required: [ captions ] | |
| required: | |
| - title | |
| - thumbnail | |
| - image | |
| - license | |
| - structured | |
| announcements: | |
| type: object | |
| properties: | |
| announce: | |
| type: array | |
| description: List of active announcements for the wiki | |
| items: | |
| $ref: "#/definitions/announcement" | |
| required: | |
| - announce | |
| availability: | |
| type: object | |
| properties: | |
| todays_featured_article: | |
| type: array | |
| description: Domains for wikis with this feature enabled, or [ '*.<project>.org' ] for all wikis in a project family | |
| items: | |
| type: string | |
| most_read: | |
| type: array | |
| description: Domains for wikis with this feature enabled, or [ '*.<project>.org' ] for all wikis in a project family | |
| items: | |
| type: string | |
| picture_of_the_day: | |
| type: array | |
| description: Domains for wikis with this feature enabled, or [ '*.<project>.org' ] for all wikis in a project family | |
| items: | |
| type: string | |
| in_the_news: | |
| type: array | |
| description: Domains for wikis with this feature enabled, or [ '*.<project>.org' ] for all wikis in a project family | |
| items: | |
| type: string | |
| on_this_day: | |
| type: array | |
| description: Domains for wikis with this feature enabled, or [ '*.<project>.org' ] for all wikis in a project family | |
| items: | |
| type: string | |
| did_you_know: | |
| type: array | |
| description: Domains for wikis with this feature enabled, or [ '*.<project>.org' ] for all wikis in a project family | |
| items: | |
| type: string | |
| required: [ todays_featured_article, most_read, picture_of_the_day, in_the_news, on_this_day, did_you_know ] | |
| additionalProperties: false | |
| announcement: | |
| type: object | |
| properties: | |
| id: | |
| type: string | |
| description: Unique ID of the announcement | |
| type: | |
| type: string | |
| description: The announcement type | |
| enum: | |
| - survey | |
| - fundraising | |
| - announcement | |
| start_time: | |
| type: string | |
| description: The ISO 8601 date to begin showing the announcement. | |
| end_time: | |
| type: string | |
| description: The ISO 8601 date to stop showing the announcement. | |
| platforms: | |
| type: array | |
| description: | | |
| An array of platforms on which to display the announcement. | |
| items: | |
| type: string | |
| enum: | |
| - iOSApp | |
| - iOSAppV2 | |
| - iOSAppV3 | |
| - iOSAppV4 | |
| - iOSAppV5 | |
| - AndroidApp | |
| - AndroidAppV2 | |
| text: | |
| type: string | |
| description: The text of the announcement | |
| image: | |
| type: string | |
| description: \[DEPRECATED\] The URL of the image for the announcement (Android only) | |
| image_url: | |
| type: string | |
| description: The URL of the image for the announcement | |
| action: | |
| $ref: "#/definitions/action" | |
| caption_HTML: | |
| type: string | |
| description: HTML to display below the announcement. Usually a privacy statement and link to a policy | |
| countries: | |
| type: array | |
| description: | | |
| An array of country codes in which to display the announcement. Clients should derive | |
| the country from the 'GeoIP' portion of the Set-Cookie header. | |
| items: | |
| type: string | |
| min_version: | |
| type: string | |
| description: minimum app version code for which to show the announcement | |
| max_version: | |
| type: string | |
| description: maximum app version code for which to show the announcement | |
| beta: | |
| type: boolean | |
| description: | | |
| (AndroidAppV2 only) Optional boolean flag controlling the release builds for which the announcement should be shown. | |
| Set to true if the announcement should be shown only in pre-production builds (beta, alpha, dev). | |
| Set to false if the announcement should be shown only in release builds. | |
| If not defined, the announcement will be shown for all builds. | |
| logged_in: | |
| type: boolean | |
| description: | | |
| (AndroidAppV2 only) Optional boolean flag controlling whether announcements should be shown based on the user login state. | |
| Set to true if the announcement should be shown only if the user is logged in. | |
| Set to false if the announcement should be shown only if the user is NOT logged in. | |
| If not defined, the announcement will be shown regardless of the user's login state. | |
| reading_list_sync_enabled: | |
| type: boolean | |
| description: | | |
| (AndroidAppV2 only) Optional boolean flag controlling whether announcements should be shown based on whether the user | |
| has enabled reading list syncing. | |
| Set to true if the announcement should be shown only if the user has enabled reading list syncing. | |
| Set to false if the announcement should be shown only if the user has NOT enabled reading list syncing. | |
| If not defined, the announcement will be shown regardless of whether the user has enabled reading list syncing. | |
| negative_text: | |
| type: string | |
| description: | | |
| (AndroidAppV2 only) text to show on a "negative" button on the announcement. If absent, the button is not shown | |
| image_height: | |
| type: integer | |
| description: | | |
| (AndroidAppV2 only) height, in device-independent pixels, of the image portion of the announcement card | |
| articleTitles: | |
| type: array | |
| description: | | |
| (iOSAppV3+ only, survey type only) Array of article titles that will display the survey announcement. | |
| items: | |
| type: string | |
| displayDelay: | |
| type: integer | |
| description: | | |
| (iOSAppV3+ only, survey type only) Number in seconds to wait for survey announcement to appear after content load. | |
| percent_receiving_experiment: | |
| type: integer | |
| description: | | |
| (iOSAppV4+ only, survey type only) Integer between 0 and 100 representing the percentage of users that will fall into the iOS Article as a Living Document experiment. This percentage will see the feature, the others will not. Both groups will see the survey announcement. | |
| required: | |
| - id | |
| - type | |
| - start_time | |
| - end_time | |
| - platforms | |
| - text | |
| - action | |
| random_article: | |
| type: object | |
| properties: | |
| title: | |
| type: string | |
| description: Article title | |
| page_id: | |
| type: integer | |
| description: Article identifier | |
| rev: | |
| type: integer | |
| description: Identifier of the latest revision | |
| tid: | |
| type: string | |
| description: Time-based UUID associated with the underlying HTML content | |
| namespace: | |
| type: integer | |
| description: MediaWiki namespace identifier | |
| user_id: | |
| type: integer | |
| description: Identifier of the user who made the latest edit | |
| user_text: | |
| type: string | |
| description: Username of the user who made the latest edit | |
| comment: | |
| type: string | |
| description: Summary for the latest edit | |
| timestamp: | |
| type: string | |
| description: Timestamp of the latest edit in ISO 8601 format | |
| tags: | |
| type: array | |
| description: Tags associated with the edit | |
| items: | |
| type: string | |
| restrictions: | |
| type: array | |
| description: Article protection restrictions at the time of the latest edit | |
| items: | |
| type: string | |
| page_language: | |
| type: string | |
| description: Language code for the language of the article | |
| redirect: | |
| type: boolean | |
| description: Indicates whether the article is a redirect | |
| required: | |
| - title | |
| - page_id | |
| - rev | |
| - tid | |
| - namespace | |
| - user_id | |
| - user_text | |
| - comment | |
| - timestamp | |
| - tags | |
| - restrictions | |
| - page_language | |
| - redirect | |
| image_props: | |
| type: object | |
| properties: | |
| source: | |
| type: string | |
| description: Image URI | |
| width: | |
| type: integer | |
| minimum: 0 | |
| description: Image width in pixels | |
| height: | |
| type: integer | |
| minimum: 0 | |
| description: Image height in pixels | |
| mime: | |
| type: string | |
| description: MIME type | |
| required: | |
| - source | |
| - width | |
| - height | |
| additionalProperties: false | |
| extmetadata_property: | |
| type: object | |
| properties: | |
| html: | |
| type: string | |
| description: Description in HTML | |
| text: | |
| type: string | |
| description: Description in plain text | |
| lang: | |
| type: string | |
| description: Language code for the description | |
| required: | |
| - html | |
| - text | |
| action: | |
| type: object | |
| properties: | |
| title: | |
| type: string | |
| description: The title to display on the button that performs the action | |
| url: | |
| type: string | |
| description: The URL to navigate to when the button is pressed | |
| required: | |
| - title | |
| - url | |
| random: | |
| type: object | |
| properties: | |
| items: | |
| type: array | |
| items: | |
| $ref: "#/definitions/random_article" | |
| required: | |
| - items | |
| titles_set: | |
| type: object | |
| description: | | |
| Article title in multiple formats. Examples: | |
| - https://en.wikipedia.org/api/rest_v1/page/summary/IOS_13 | |
| - https://en.wikipedia.org/api/rest_v1/page/summary/Man%27s_best_friend | |
| properties: | |
| canonical: | |
| type: string | |
| description: Article title with underscores instead of spaces | |
| normalized: | |
| type: string | |
| description: Article title with spaces instead of underscores | |
| display: | |
| type: string | |
| description: Article title as it should be displayed to the user | |
| required: | |
| - canonical | |
| - normalized | |
| - display | |
| content_urls: | |
| type: object | |
| properties: | |
| page: | |
| type: string | |
| description: URL for the article | |
| revisions: | |
| type: string | |
| description: URL for the article's revision history | |
| edit: | |
| type: string | |
| description: URL to edit the article | |
| talk: | |
| type: string | |
| description: URL for the article's discussion page, if applicable | |
| required: | |
| - page | |
| - revisions | |
| - edit | |
| additionalProperties: false | |
| featured_content: | |
| type: object | |
| description: | | |
| Daily featured content. Depending on availability, may include: | |
| - Daily featured article (`tfa`) | |
| - Daily featured image from Wikimedia Commons (`image`) | |
| - Previous day's most-read articles (`mostread`) – not available for the current | |
| day in UTC | |
| - Stories from the news (`news`) – available only for the current day in UTC | |
| - Featured facts (`dyk`) – available only for the current day in UTC | |
| properties: | |
| tfa: | |
| $ref: "#/definitions/summary" | |
| mostread: | |
| $ref: "#/definitions/mostread" | |
| image: | |
| $ref: "#/definitions/image" | |
| news: | |
| $ref: "#/definitions/news" | |
| onthisday: | |
| $ref: "#/definitions/onthisdayList" | |
| dyk: | |
| $ref: "#/definitions/didYouKnowList" | |
| summary: | |
| type: object | |
| description: Information about an article | |
| properties: | |
| type: | |
| type: string | |
| description: Type of article | |
| enum: | |
| - standard | |
| - disambiguation | |
| - no-extract | |
| - mainpage | |
| titles: | |
| $ref: "#/definitions/titles_set" | |
| title: | |
| type: string | |
| description: \[DEPRECATED\] Use `titles.normalized` instead | |
| displaytitle: | |
| type: string | |
| description: \[DEPRECATED\] Use `titles.display` instead | |
| namespace: | |
| type: object | |
| properties: | |
| id: | |
| type: integer | |
| description: MediaWiki namespace identifier | |
| text: | |
| type: string | |
| description: Localized name of the namespace | |
| required: [ id, text ] | |
| additionalProperties: false | |
| wikibase_item: | |
| type: string | |
| description: Identifier for the associated Wikidata entity (if any) | |
| pageid: | |
| type: integer | |
| description: Article identifier | |
| revision: | |
| type: string | |
| description: Revision identifier for the latest revision | |
| tid: | |
| type: string | |
| description: Time-based UUID associated with the underlying HTML content | |
| extract: | |
| type: string | |
| description: First few sentences of the article in plain text | |
| extract_html: | |
| type: string | |
| description: First few sentences of the article in HTML | |
| thumbnail: | |
| $ref: "#/definitions/image_props" | |
| originalimage: | |
| $ref: "#/definitions/image_props" | |
| lang: | |
| type: string | |
| description: Language code for the language of the article | |
| example: en | |
| dir: | |
| type: string | |
| description: Language direction | |
| enum: | |
| - ltr | |
| - rtl | |
| timestamp: | |
| type: string | |
| format: date-time | |
| description: Time when the article was last edited in ISO 8601 format | |
| example: "1970-01-01T00:00:00.000Z" | |
| description: | |
| type: string | |
| description: Short summary of the topic of the article | |
| example: American poet | |
| description_source: | |
| type: string | |
| description: Source of the description, either local (from the article) or central (from Wikidata) | |
| enum: | |
| - local | |
| - central | |
| content_urls: | |
| type: object | |
| description: Article URLs | |
| properties: | |
| desktop: | |
| $ref: "#/definitions/content_urls" | |
| mobile: | |
| $ref: "#/definitions/content_urls" | |
| coordinates: | |
| type: object | |
| description: Geographic coordinates associated with the article | |
| properties: | |
| lat: | |
| type: number | |
| description: Latitude | |
| lon: | |
| type: number | |
| description: Longitude | |
| required: [ lat, lon ] | |
| normalizedtitle: | |
| type: string | |
| description: \[DEPRECATED\] Use titles.normalized instead | |
| required: | |
| - type | |
| - titles | |
| - title | |
| - displaytitle | |
| - pageid | |
| - lang | |
| - dir | |
| - revision | |
| - timestamp | |
| - content_urls | |
| - extract | |
| - extract_html |
US