Go to file
Sebastian Meyer d305f8a9bb Update composer.lock 2024-05-16 14:04:37 +02:00
Classes Fix date parsing error 2024-05-10 15:02:28 +02:00
Configuration Rename configuration template 2021-08-14 09:10:38 +02:00
Data/oai_dc Rename example record 2020-01-08 17:26:59 +01:00
Resources Rename GitHub repository 2023-09-29 21:08:00 +02:00
.editorconfig Add EditorConfig file 2023-09-29 20:29:44 +02:00
.gitattributes Update metadata 2024-05-08 15:29:44 +02:00
.gitignore Update metadata 2024-05-08 15:29:44 +02:00
CODE_OF_CONDUCT.md Update code of conduct to version 2.0 2020-01-08 15:58:24 +01:00
CONTRIBUTING.md Add Contribution Guidelines 2017-10-19 19:56:50 +02:00
LICENSE Add new license file 2020-05-28 13:01:24 +02:00
README.md Rename composer project 2023-09-29 21:22:22 +02:00
composer.json Stricter PHP version constraints 2024-05-16 10:53:47 +02:00
composer.lock Update composer.lock 2024-05-16 14:04:37 +02:00
index.php Handle POST requests 2022-07-01 16:18:23 +02:00
update.php Add summary to update.php 2021-08-14 09:28:45 +02:00


Simple OAI-PMH 2.0 Data Provider

This is a stand-alone and easy to install data provider implementing the Open Archives Initiative's Protocol for Metadata Harvesting (OAI-PMH). It serves records in any metadata format from directories of XML files using the directory name as metadataPrefix, the filename as identifier and the filemtime as timestamp. 0-byte files are considered deleted records and handled accordingly. Resumption tokens are managed using files. Sets are currently not supported.

Just put the records as XML files in the data directory, adjust a few configuration settings and you are ready to go!

A demo installation can be found here.

Codacy Badge


  1. Run composer create-project opencultureconsulting/simple-oai-pmh <path>.

  2. Create a data directory in a location not publicly accessible (i. e. outside of <path>). Create a subdirectory inside the specified data directory for every format (i. e. metadataPrefix) you want to provide.

  3. Copy Configuration/Main.template.php to Configuration/Main.php and edit the settings according to your preferences. Don't forget pointing $config['dataDirectory'] to your newly created data directory.

  4. Put the records into the respective directories according to their format. Each record has to be a separate XML file with its identifier as filename (e. g. the file 12345678.xml can be adressed using the identifier 12345678). Optionally you can maintain deletions by keeping 0-byte files for deleted records.

  5. Congratulations! Now you are running your own Simple OAI-PMH 2.0 Data Provider. You can access the entry point by calling index.php?verb=Identify in your browser.


  1. Backup Configuration/Main.php!

  2. Delete <path> and re-install by running composer create-project opencultureconsulting/simple-oai-pmh <path>.

  3. Move your configuration back into Configuration/Main.php.

  4. Congratulations! Now you are running the newest version of the Simple OAI-PMH 2.0 Data Provider. You can access the entry point by calling index.php?verb=Identify in your browser.


Updating your records is just as easy with the update.php script! The script automatically handles deletions by maintaining 0-byte files for deleted records. Just call php update.php from the command line and follow the instructions. (Of course, you can simply replace the records manually as well.)


This project was originally initiated in 2002 by Heinrich Stamerjohanns at University of Oldenburg. His latest implementation can still be found via the Internet Archive's Wayback Machine.

It was then modified in 2011 by Jianfeng Li at University of Adelaide for The Plant Accelerator. The modified version can be found in the Google Code Archive.

In 2013 Daniel Neis Araujo at Federal University of Santa Catarina modified the project again in order to integrate it with Moodle. His implementation can be found on GitHub. In 2014 Kazimierz Pietruszewski provided some further bugfixes.

The current implementation was derived from the latter in 2017 by Sebastian Meyer at Open Culture Consulting for the German Literature Archive. It is a stand-alone version focused on easy deployment and file based record handling.