Simple form to help people build queries for the IATI datastore API
PHP JavaScript HTML Other
Switch branches/tags
Nothing to show
Clone or download
Ocre42 Merge pull request #108 from IATI/dev
merge dev into master
Latest commit eb3a8e9 Aug 15, 2018
Failed to load latest commit information.
codelists Update Sector and SectorCategory codelists Jul 26, 2017
helpers Fix tab and space mixing Oct 16, 2017
static Merge branch 'dev' into split-js-and-html Aug 14, 2018
templates Merge pull request #108 from IATI/dev Aug 15, 2018
.gitignore Use twig templating Mar 10, 2017
CONTRIBUTING.rst Update CONTRIBUTING.rst to match new branching Oct 8, 2017
LICENCES-3RD-PARTY.txt Put license info in relevant docs Jul 3, 2017
index.php Add a comment to explain some weirdness Sep 28, 2017 Add script to update codelists Jul 27, 2016


License: MIT


A simple form that will build a query string that can then be used to fetch data from the IATI Datastore API.

See it in action here -


A webserver running php and php-curl. PHP dependencies are managed using Composer.


# Clone the repository and enter into the root folder
git clone
cd IATI-Query-Builder

# Install dependencies
composer install

# If running for the first time, prepare the helper script that enables you to get data for current IATI publishers
# This involves copying the file to a filename of your choice and uncommenting the code
cp helpers/refresh_group_data.example.php helpers/YOUR_FILENAME.php
nano helpers/YOUR_FILENAME.php

# Run the script to get data for current IATI publishers using the CKAN API
php helpers/YOUR_FILENAME.php

# You may wish to ensure that the included codelists are up-to-date (optional)

# Run a webserver
php -S localhost:8000

# Open a browser and visit localhost:8000

Helper scripts

Getting the latest IATI publishers

The /helpers directory has a script refresh_group_data.example.php that will enable you to get data relating to current IATI publishers.

Running this script will generate a .json file of 'groups' (i.e. publishers) in use on the IATI registry, and this in turn will populate the 'Reporting Organisation' multi-select element in the form.

Getting the latest IATI publishers

The script will re-download latest versions of the required codelists.

Automating updates

To automate regular updates, you could set-up both of these scripts as a cron job on your server.