Forming Queries

You can query the Datastore by building queries from filters. The identified data can then be output in an XML, JSON or CSV format depending on your needs.

Basic Query

A basic query will undertake no filtering, allowing you to access all the data in the Datastore.

Example: Query the Datastore, undertaking no filtering.

Use a Filter

You can build Datastore queries by using filters. This allows you to access information about only the activities that are relevant to your needs.

Example: Query for activities that provide benefit to Uganda (UG).

The recipient-country filter returns activities with your specified value from the IATI Country codelist – in this case, UG (Uganda).

Selecting multiple Values

You can request data matching multiple values for each filter by using the | operator. This acts as an or.

Example: Query for activities that provide benefit to Bangladesh (BD) or Honduras (HN) or Madagascar (MG).

Combining Filters

You can combine multiple filters to further restrict the requested data by using the & operator. This acts as an and.

Example: Query for activities that are classified using the DAC Sector Code for Teacher Training (11130) and are published by the UK Department for International Development (GB-GOV-1).

The iati-identifier filter returns activities with your specified IATI Organisation Identifier – in this case, DFID (GB-GOV-1).

More Information

For in-depth detail of all the available filters, see the Reference.