The Data Catalog API enables users to retrieve the contents of the data catalog along with data and metadata about individual datasets and their resources.
All API endpoints begin with the protocol and hostname:
https://datacatalogapi.worldbank.org
Returns a list of published datasets. Use $top
and $skip
together
to efficiently access the entire catalog with multiple calls.
Parameter | Description | Required |
---|---|---|
$top | Number of datasets (default: 100) | No |
$skip | Record offset (default: 0) | No |
Examples
Search the data catalog programatically.
Parameter | Description | Required |
---|---|---|
qname | Specifies the search context and should be either 'dataset' or 'dataresource' | Yes |
qterm | Search keywords. If blank then all records are returned | Yes |
$top | Number of records to return (default: 50) | No |
$skip | Record offset (default: 0) | No |
$filter | Filter conditions | No |
$orderby | Sort order | No |
Hint: you can infer helpful examples for $filter
and $orderby
by
changing parameters in the search engine and noting
the resulting changes to the URL.
Examples
- Search for "climate change"
- Just datasets available by API
- Return most recently updated results first
Return metadata for a dataset.
Parameter | Description | Required |
---|---|---|
dataset_unique_id | Identifies the dataset | Yes |
version_id | Used to retrieve prior versions; if omitted or blank, latest version is returned | No |
Hint: version information is provided in the maintanance information
object of a dataset. To request
a previous version, provide its version_id
without the "@" prefix.
Examples
Return complete metadata for a dataset citation.
Parameter | Description | Required |
---|---|---|
citation_unique_id | Identifies the citation | Yes |
Example
Return metadata for a dataset indicator.
Parameter | Description | Required |
---|---|---|
indicator_unique_id | Identifies the indicator | Yes |
Example
Return metadata for all of a dataset's indicators.
Parameter | Description | Required |
---|---|---|
dataset_unique_id | Identifies the dataset | Yes |
Example
Return complete metadata for a resource (DatasetView only returns partial metadata for resources)
Parameter | Description | Required |
---|---|---|
resource_unique_id | Identifies the resource | Yes |
Download a resource file.
Parameter | Description | Required |
---|---|---|
resource_unique_id | Identifies the resource | Yes |
version_id | Must be included but should be blank | Yes |
Hint: resource downloads can be very large. To conserve memory, you might consider streaming the API response directly to a file, as demonstrated here.
Example
Access a CSV or Excel file as a JSON object.
Parameter | Description | Required |
---|---|---|
resource_unique_id | Identifies the resource | Yes |
version_id | Used to retrieve prior versions | No |
$filter | filter expression (need example) | No |
rowLimit | maximum number of rows to return | No |
Hint: Not all Excel files are available via this endpoint. In particular, Excel files that consist of multiple worksheets or that do not have well-formed column headers cannot be parsed.
Example
open