Search HDX for Philippine humanitarian datasets
search_hdx_datasetsSearch for Philippine humanitarian datasets by keyword, returning recently modified matches with licenses and up to 20 resources per dataset.
Instructions
Search HDX for Philippine humanitarian datasets by keyword.
Calls the CKAN package_search action filtered to the Philippines
country group and returns matching datasets, most recently modified
first, each with its own license and up to 20 resources. Examples:
search_hdx_datasets("flood") datasets matching "flood" search_hdx_datasets("food prices", rows=5) 5 most recently modified matches
On failure: an empty query, a query over 200 characters, a query with a control character, or a rows value outside 1 to 50 gives validation_error true and data_status "invalid_request". An unreachable HDX API gives upstream_error true and data_status "unavailable". A response whose success field is not true, or whose result.results field is not a list, gives upstream_error true and data_status "indeterminate". Datasets sent beside a missing or non-integer count also give data_status "indeterminate", with the parsed datasets kept and never cached: CKAN always sends a real count, so a bad one is drift even when the datasets read fine. Zero datasets on a clean query with a real integer count gives data_status "empty", never a failure, and still caches. Every dataset carries its own license_id: read it before you reuse a resource.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | No | Number of datasets to return, 1 to 50 (default 10). | |
| query | Yes | Free-text search term, 1 to 200 printable characters, for example "flood", "food security", "displacement". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||