item_search: Search for Product on Walmart.com

Description Usage Arguments Value References Examples

View source: R/item_search.R

Description

This function allows text search on the Walmart.com catalogue and returns matching items available for sale online.

Usage

1
2
3
item_search(apikey = NULL, query, categoryID = NULL, start = NULL,
  sort = NULL, order = NULL, numItems = 10, facet = NULL,
  facet_filter = NULL, facet_range = NULL)

Arguments

apikey

Your API access key authorized by Walmart API (Required)

query

Search text - whitespace separated sequence of keywords to search for (Required)

categoryID

Category id of the category for search within a category. This should match the id field from Taxonomy API (see function taxonomywalmartR) (Optional)

start

Starting point of the results within the matching set of items - upto 10 items will be returned starting from this item (Optional)

sort

Sorting criteria, allowed sort types are [relevance, price, title, bestseller, customerRating, new]. Default sort is by relevance (Optional)

order

Sort ordering criteria, allowed values are [asc, desc]. This parameter is needed only for the sort types [price, title, customerRating].(Optional)

numItems

Number of matching items to be returned, max value 25. Default is 10 (Optional)

facet

Boolean flag to enable facets. Default value is off. Set this to on to enable facets (Optional)

facet_filter

Filter on the facet attribute values. This parameter can be set to <facet-name>:<facet-value> (without the angles). Here facet-name and facet-value can be any valid facet picked from the search API response when facets are on (Optional)

facet_range

Range filter for facets which take range values, like price. See usage above in the examples (Optional)

Value

Returns an RDS file named "item_search_output.RDS".

References

https://developer.walmartlabs.com/docs/read/Search_API

Examples

1
2
apikey = "YOUR API KEY"
item_search(apikey, query = "tv", facet = "on", facet_filter = "brand:Samsung")

Elkamao/walmartR documentation built on May 24, 2019, 5:02 a.m.