Facilitating the spread of knowledge and innovation in professional software development



Choose your language

InfoQ Homepage News UN's New ReliefWeb API Improves Humanitarian Dev Experience

UN's New ReliefWeb API Improves Humanitarian Dev Experience


This update to the premier source of humanitarian data worldwide will help international aid organizations by simplifying access, improving data flexibility, and improving the system's performance and robustness.

ReliefWeb is a data service created by the United Nations Office for the Coordination of Humanitarian Affairs (OCHA). Their RESTful API delivers both breaking news updates on current disasters and historical information on prior disasters around the world. In addition to 17 years of disaster data, the database includes UN reports on major disasters as far back as the 1980s. The API also provides a clearinghouse for job and training opportunities in the field of humanitarian relief.

This release, identified as version 1, builds off of the former API, now known as version 0. ReliefWeb has greatly improved the developer experience by making significant changes, both on the front end (API layout) and the back end (underlying infrastructure). Primary design goals included flexibility and ease of learning to lower barriers to entry, as well as the ability to scale up as demand grows. In addition, they've adopted Continuous Integration practices with automated build, deployments, and regression testing.

Version 1 of the API is HATEOAS-compliant. In addition to good Swagger-based documentation, there is also an API usage guide. The API includes several advanced query features, such as:

  • filtering queries by the contents of an arbitrary field, either by exact match or fuzzy search,
  • limiting which fields come down from the server on queries,
  • sorting by any number of fields, and
  • paging by offset and limit.

The addition of rate limiting prevents the system from being overwhelmed. The API restricts users to 1,000 results per query and 1,000 calls per day. Data from the API is only available in JSON format. An envelope holds the data, links, and other meta-information in all API responses. If an error occurs, a JSON response contains details explaining the cause and possible remedies.

For example, to search for reports on hurricane Katrina's impact on the USA, a user might call


to get the first 2 of 571 reports:

  "href": "",
  "time": 7,
  "version": "1",
  "links": {
    "self": {
      "href": ""
    "next": {
      "href": ""
  "totalCount": 571,
  "count": 2,
  "data": [
      "id": "185148",
      "score": 4.980242,
      "href": "",
      "fields": {
        "title": "Hurricane Katrina"
      "id": "416571",
      "score": 4.216302,
      "href": "",
      "fields": {
        "title": "Katrina Index: Tracking variables of post-Katrina reconstruction"

By default, the results are sorted by score, which is determined by the quality of the match on the query fields. It is possible to follow the href URI on any result to drill down and get the details on a report, or follow the next link to get the next page of results. 

The ReliefWeb API is a PHP application written using the Klein framework, with Drupal used as the CMS. According to Adam Ross, who worked on the project, it's written as

[...] a thin application layer built on top of an ElasticSearch datastore. ElasticSearch provides amazing capabilities in complex data mining and exploration. The application layer on top provides a layer of glossy, positive user experience for the developers who will build great new things with the API.

ReliefWeb is the leading source of information for the humanitarian community. Many governments and NGOs rely solely on ReliefWeb for their data needs in the humanitarian field. Journalists and media also use ReliefWeb to help them track ongoing disasters. ReliefWeb gathers information from over 4,000 sources worldwide. Their 30 editors review, edit, and tag information from these sources and publish it for the community.

We need your feedback

How might we improve InfoQ for you

Thank you for being an InfoQ reader.

Each year, we seek feedback from our readers to help us improve InfoQ. Would you mind spending 2 minutes to share your feedback in our short survey? Your feedback will directly help us continually evolve how we support you.

Take the Survey

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p


Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.