Skip to main content

Exporting Metadata from Omeka to CSV


February 2018 Update: There is now a plugin for Omeka that allows users to export to CSV via the interface.

The Omeka digital collections platform features many easy to use plugins to facilitate editing and sharing metadata.  Oddly, there isn't a built in option or even a plugin available yet that allows a user to export the metadata directly to a spreadsheet. This post lists a step by step method to do this using a PHP script written by an Omeka developer. 

Note: This script will export all items that have been marked Public. It will also export all of the elements, even if they are empty.


1. Clone or download OmekaApiToCsv.  This is a version of the original script, but has the addition of a pipe delimiter for multivalued elements.

2. Upload and extract this same set of scripts to the same web server as the Omeka installation. 


Folder of the OmekaApiToCsv scripts within the rest of the Omeka files


3. Open the php file within the OmekaApiToCsv folder called OmekaApiToCsv.php. 




  • Change the URL in line 3 that says: define('OMEKA_ENDPOINT', 'http://localhost/whatevomeka/api');
    • The URL is generally just your full website name followed by "/api"
  • Change the default filename at about line 23 that says:
    • $this->csv=fopen($baseDir . '/files/OmekaApiToCsv.csv', 'w'); The CSV will be saved in the folder called files and be named whatever you change this value to.


4. Use the Terminal or Command Line to SSH into your web server from your desktop.
  • ssh username@hostname (the hostname should be the root domain)
  • The terminal will prompt for a password. Type or paste it in and hit return even though it does not show up in the interface
  • Use the Change directory command to change into the script folder. Example:
    cd public_html/omeka/OmekaApiToCsv
5. Enter the command to run the script: php OmekaApiToCsv.php

6. Open the /files folder on the web server and find the newly created CSV.  It may take several minutes before it is fully populated depending upon how many records are exported.  When the command line finishes the script, the CSV is ready for downloading.