Search {MacrobondAPI}R Documentation

Perform a search for entities

Description

Search for entities with the provided SearchQuery.

Usage

Search(searchQuery)

Value

Returns a SearchResult.

Note

This method is only available if you run Macrobond app 1.23 or later and have a Data Scientist license.

See Also

CreateSearchQuery SearchQuery SearchResult

Examples

# Search for time series that are the key GDP series for the regions US, GB and DE.
query <- CreateSearchQuery()
setEntityTypeFilter(query, "TimeSeries")
addAttributeValueFilter(query, "RegionKey", "gdp_total")
addAttributeValueFilter(query, "Region", c("us", "gb", "de"))
searchResult <- Search(query)

# Search for time series, that are seasonally adjusted, belongs to the region us or de and matches the free text 'steel production'. Exclude series from the source ALFRED.
query <- CreateSearchQuery()
setEntityTypeFilter(query, "TimeSeries")
setSearchText(query, "steel production")
addAttributeFilter(query, "SeasonAdj")
addAttributeValueFilter(query, "Region", c("us", "de"))
addAttributeValueFilter(query, "Source", "src_usfbrstl_alfred", FALSE)
entities <- getEntities(Search(query))

[Package MacrobondAPI version 1.1-5 Index]