{"id":15134646,"url":"https://github.com/wikimedia/mediawiki-api-demos","last_synced_at":"2025-09-05T06:32:03.426Z","repository":{"id":39177291,"uuid":"140202109","full_name":"wikimedia/mediawiki-api-demos","owner":"wikimedia","description":"Demo apps and code snippets in Python, Javascript and PHP demonstrating how to use various modules of the MediaWiki Action API","archived":false,"fork":false,"pushed_at":"2024-06-04T13:23:38.000Z","size":8158,"stargazers_count":170,"open_issues_count":6,"forks_count":88,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-05-26T07:26:59.086Z","etag":null,"topics":["code-snipets","demo-apps","mediawiki","mediawiki-api","web-apis"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wikimedia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-08T20:57:06.000Z","updated_at":"2025-05-14T06:39:42.000Z","dependencies_parsed_at":"2023-02-10T09:45:41.331Z","dependency_job_id":"53c37a1e-4506-4e32-90fb-205873b9ee3f","html_url":"https://github.com/wikimedia/mediawiki-api-demos","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wikimedia/mediawiki-api-demos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikimedia%2Fmediawiki-api-demos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikimedia%2Fmediawiki-api-demos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikimedia%2Fmediawiki-api-demos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikimedia%2Fmediawiki-api-demos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wikimedia","download_url":"https://codeload.github.com/wikimedia/mediawiki-api-demos/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikimedia%2Fmediawiki-api-demos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273722737,"owners_count":25156300,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-snipets","demo-apps","mediawiki","mediawiki-api","web-apis"],"created_at":"2024-09-26T05:23:25.544Z","updated_at":"2025-09-05T06:32:03.345Z","avatar_url":"https://github.com/wikimedia.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/MediaWiki-2020-logo.svg/220px-MediaWiki-2020-logo.svg.png\" height=\"200px\" alt=\"MediaWiki\"/\u003e\n\n# MediaWiki API Demos\nThe [MediaWiki Action API](https://www.mediawiki.org/wiki/API:Main_page) is a web service that allows access to some wiki-features like authentication, page operations, and search. It can provide meta information about the wiki and the logged-in user. This repository contains code snippets and demo apps in various programming languages to assist developers for easy use of various modules of the API. \n\n\u003e :information_source: **View a showcase of interactive demo apps built using the API on Wikimedia Toolforge: https://tools.wmflabs.org/apps-gallery/**\n\n### Code snippets\n* [Python](python/)\n* [Javascript](javascript/)\n* [PHP](php/)\n* [MediaWikiJS](mediawikijs/)\n\n### Demo apps\n* [Holidays viewer](apps/holidays-viewer):\nDemo app that fetches the holidays for a given date from Wikipedia, with an option to login to add new holidays. The app uses [API:Parse](https://www.mediawiki.org/wiki/API:Parse) to fetch the holidays and [API:Edit](https://www.mediawiki.org/wiki/API:Edit) to add a new holiday.\n* [Nearby places viewer](apps/nearby-places-viewer):\nDemo of geo search for wiki pages near a location using the [Geolocation API](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation_API) and MediaWiki Action API's [Geosearch](https://www.mediawiki.org/wiki/API:Geosearch) module.\n* [Picture of the day viewer](apps/picture-of-the-day-viewer):\nDemo app that uses [prop=images](https://www.mediawiki.org/wiki/API:Images) module to fetch Wikipedia's Picture of the Day (POTD) from a template page and displays it on a webpage. The app also allows users to go backward or forward a date to view other POTD.\n* [User contributions feed](apps/user-contributions-feed):\nDemo app that uses [list=usercontribs](https://www.mediawiki.org/wiki/API:Usercontribs) module to fetch the top 50 edits made by a user.\n* [View more demo apps](apps/)\n\n### Installation\n```\n$ git clone https://github.com/wikimedia/mediawiki-api-demos.git\n$ cd mediawiki-api-demos\n\nFor running python code samples: \n$ cd python\n$ python3 filename.py \nNote: Install any necessary python modules with pip and enter any credentials \nrequired in the file to run the sample code\n\nFor running javascript code samples:\n$ cd javascript\n$ node filename.js\nNote: Install any necessary node modules with npm and enter any credentials required\nin the file to run the sample code\n\nFor running php code samples:\n$ cd php\n$ php filename.php\nNote: Install necessary modules by `apt-get install php-cli php-curl` and enter any credentials\nrequired in the file to run the sample code\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwikimedia%2Fmediawiki-api-demos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwikimedia%2Fmediawiki-api-demos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwikimedia%2Fmediawiki-api-demos/lists"}