parliament-opensearch is a gem created by the Parliamentary Digital Service to allow connections to and the processing of data from OpenSearch APIs.

NOTE: This gem is in active development and is likely to change at short notice. It is not recommended that you use this in any production environment.


parliament-opensearch requires the following:


Add this line to your application's Gemfile:

This gem is currently not available on RubyGems. To use it in an application, install it directly from GitHub via your Gemfile

gem 'parliament-opensearch', git: '', branch: 'master'

You will also need to include the parliament-ruby gem. Add the following to your Gemfile:

gem 'parliament-ruby'

then run:

bundle install


This gem's main function is fetching data from an OpenSearch API and parsing it.

Note: Comprehensive class documentation can be found on rubydocs.

Getting Started with Development

To clone the repository and set up the dependencies, run the following:

git clone
cd parliament-opensearch
bundle install

Running the tests

We use RSpec as our testing framework and tests can be run using:

bundle exec rake


If you wish to submit a bug fix or feature, you can create a pull request and it will be merged pending a code review.

  1. Fork the repository
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Ensure your changes are tested using Rspec
  6. Create a new Pull Request