ReliefWeb API Result structure

Structure of a successful result

Result body comes as a json object with the following fields:

  • href: Url of the current request - POST request bodies aren't reflected here.
  • time: Milliseconds taken to calculate the response.
  • links: HAL-type links to previous and next resources, for lists, or to collection for items.
    • self: Current request.
    • next: Next page of results in list. Previous link also shown when appropriate.
  • totalCount: Total number of results that match the request. See How can I get just the total?
  • count: Number of results returned in this result.
  • data: All the requested items:
    • id Unique ReliefWeb id for the item (for items and lists). Ids can be used to find the resource directly on the ReliefWeb site.
      For reports, jobs and training:<id>
      For countries, disasters, sources, and some category fields with an id:<id>
    • fields Fields returned for this result. These can be selected by specifying fields, profile and preset parameters (for items and lists).
    • score Relevance of result to query. If there was no query parameter, this will be 1 (for lists only).
    • href Url of the resource item. Useful for drilling down into individual results (for lists only).


  • Query:

Structure of an error

The message of an error should give information to fix the request. Again, for clarification or suggested improvements, please contact us.

  • Invalid "limit" specified. Valid values are between 0 and 1000

    In the example, change 5000 to fix this.
  • Invalid range 'from' value for field 'date.created'. It must be an ISO 8601 date.

    In this example, the date field is non url-encoded. To fix it, replace the + sign to %2B.[field]=date.created&filter[value][from]=2004-06-01T00:00:00+00:00
  • Invalid query field 'field'. Valid values are 'value', 'operator', 'fields'.

    In this example, there are two errors.

    • The wrong key is used for the query parameter. Replace query[field] with query[fields] to fix it.
    • This exposes another error, that query[fields] expects an array. To fix that error: query[fields][]=country.[field]=country&query[value]=France