Complex queries

Count queries

You are able to combine the count and search functions to enable you to get a count of results for a specific search term. So for

https://api.ids.ac.uk/openapi/eldis/count/documents/country/?q=undp

you would get a set of results that told you, for each country, how many documents existed that had the text “undp” and were concerned with that country.

Number of results

The num_results_only query parameter returns the number of results (in the metadata) but not the actual results. The response format will only have the metadata section, and that will only have the num_results item present. The nesting of data will be the same as for the full response though, allowing the same code to be used in both cases.