PHPackages                             addwiki/mediawiki-api-base - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. addwiki/mediawiki-api-base

ActiveLibrary[API Development](/categories/api)

addwiki/mediawiki-api-base
==========================

Simple MediaWiki API library

3.1.0(1y ago)37149.7k↓18.6%23[1 PRs](https://github.com/addwiki/mediawiki-api-base/pulls)10GPL-2.0-or-laterPHPPHP &gt;=8.1

Since May 12Pushed 1y ago7 watchersCompare

[ Source](https://github.com/addwiki/mediawiki-api-base)[ Packagist](https://packagist.org/packages/addwiki/mediawiki-api-base)[ RSS](/packages/addwiki-mediawiki-api-base/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (26)Used By (10)

mediawiki-api-base
==================

[](#mediawiki-api-base)

[![GitHub issue custom search in repo](https://camo.githubusercontent.com/9982c9269154c8f0980de53c2660bde19893f56492701f4aa776773bc1ba3340/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d7365617263682f61646477696b692f61646477696b693f6c6162656c3d6973737565732671756572793d6973253341697373756525323069732533416f70656e2532302535426d6564696177696b692d6170692d62617365253544)](https://github.com/addwiki/addwiki/issues?q=is%3Aissue+is%3Aopen+%5Bmediawiki-api-base%5D+)[![Latest Stable Version](https://camo.githubusercontent.com/ecadd81935f887dd32994e9ad8dadecc9880290fc765083bd4b8c8d749e512ed/68747470733a2f2f706f7365722e707567782e6f72672f61646477696b692f6d6564696177696b692d6170692d626173652f76657273696f6e2e706e67)](https://packagist.org/packages/addwiki/mediawiki-api-base)[![Download count](https://camo.githubusercontent.com/27a12bbf8eda8ac6f26943f4f7405fb71df3026995e89c3dabe3e55c75903f49/68747470733a2f2f706f7365722e707567782e6f72672f61646477696b692f6d6564696177696b692d6170692d626173652f642f746f74616c2e706e67)](https://packagist.org/packages/addwiki/mediawiki-api-base)

This library provides basic access to the MediaWiki Action API. This library features simple methods allowing you to login, logout and do both GET and POST requests. This library should work with most if not all MediaWiki versions due to its simplicity.

You can find the full documentation at

Example
-------

[](#example)

A quick example can be found below:

```
use \Addwiki\Mediawiki\Api\Client\Auth\UserAndPassword;
use \Addwiki\Mediawiki\Api\Client\Action\MediawikiApi;

$auth = new UserAndPassword( 'username', 'password' );
$api = MediawikiApi::newFromPage( 'https://en.wikipedia.org/wiki/Berlin', $auth );
$purgeRequest = FluentRequest::factory()->setAction( 'purge' )->setParam( 'titles', 'Berlin' );
$api->postRequest( $purgeRequest );
```

Integration tests
-----------------

[](#integration-tests)

Run the MediaWiki test site:

```
docker compose -f docker-compose-ci.yml up -d
```

Run the tests:

```
composer phpunit-integration
```

Destroy the site that was used for testing:

```
docker compose -f docker-compose-ci.yml down --volumes
```

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity45

Moderate usage in the ecosystem

Community34

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 75.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~190 days

Recently: every ~337 days

Total

21

Last Release

580d ago

Major Versions

0.3 → 1.0.02015-08-23

1.1.0 → 2.0.02015-12-18

1.1.1 → 2.2.12016-08-03

2.8.0 → 3.0.02021-10-23

PHP version history (5 changes)2.2.0PHP &gt;=5.5

2.6.0PHP ^7.2

2.8.0PHP &gt;=7.3

3.0.0PHP &gt;=7.4

3.1.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/ccc2c40c150701b6b72f598f342b6a7aa57d7ab06a08c5f085f6add75094b82b?d=identicon)[addshore](/maintainers/addshore)

---

Top Contributors

[![addshore](https://avatars.githubusercontent.com/u/3308769?v=4)](https://github.com/addshore "addshore (133 commits)")[![samwilson](https://avatars.githubusercontent.com/u/213655?v=4)](https://github.com/samwilson "samwilson (12 commits)")[![JeroenDeDauw](https://avatars.githubusercontent.com/u/146040?v=4)](https://github.com/JeroenDeDauw "JeroenDeDauw (10 commits)")[![Tpt](https://avatars.githubusercontent.com/u/458123?v=4)](https://github.com/Tpt "Tpt (6 commits)")[![Benestar](https://avatars.githubusercontent.com/u/2998254?v=4)](https://github.com/Benestar "Benestar (4 commits)")[![kaldari](https://avatars.githubusercontent.com/u/1707155?v=4)](https://github.com/kaldari "kaldari (2 commits)")[![c960657](https://avatars.githubusercontent.com/u/111346?v=4)](https://github.com/c960657 "c960657 (2 commits)")[![RobinR1](https://avatars.githubusercontent.com/u/6793011?v=4)](https://github.com/RobinR1 "RobinR1 (1 commits)")[![wfletch](https://avatars.githubusercontent.com/u/57062151?v=4)](https://github.com/wfletch "wfletch (1 commits)")[![Albert221](https://avatars.githubusercontent.com/u/4085280?v=4)](https://github.com/Albert221 "Albert221 (1 commits)")[![Cladis](https://avatars.githubusercontent.com/u/3663169?v=4)](https://github.com/Cladis "Cladis (1 commits)")[![gbirke](https://avatars.githubusercontent.com/u/223326?v=4)](https://github.com/gbirke "gbirke (1 commits)")[![joecampo](https://avatars.githubusercontent.com/u/3619398?v=4)](https://github.com/joecampo "joecampo (1 commits)")[![michaelmillar](https://avatars.githubusercontent.com/u/4921418?v=4)](https://github.com/michaelmillar "michaelmillar (1 commits)")[![reedy](https://avatars.githubusercontent.com/u/67615?v=4)](https://github.com/reedy "reedy (1 commits)")

---

Tags

apimediawiki

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/addwiki-mediawiki-api-base/health.svg)

```
[![Health](https://phpackages.com/badges/addwiki-mediawiki-api-base/health.svg)](https://phpackages.com/packages/addwiki-mediawiki-api-base)
```

###  Alternatives

[saloonphp/saloon

Build beautiful API integrations and SDKs with Saloon

2.4k9.6M468](/packages/saloonphp-saloon)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[bushlanov-dev/max-bot-api-client-php

Max Bot API Client library

281.6k](/packages/bushlanov-dev-max-bot-api-client-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
