Learn R Programming

walmartAPI (version 0.1.5)

lookup: Looks up product information

Description

lookup gives access to item price and availability in real-time.

Usage

lookup(key = auth_cache$KEY, lsPublisherId = NULL, id = NULL,
  upc = NULL, list_output = FALSE)

Arguments

key

Your API access key.

lsPublisherId

Your LinkShare Publisher Id.

id

vector of item ids.

upc

upc of the item.

list_output

Indicator for list output.

Value

A tibble with 15 columns in base response format.

Details

An API key will be required to run this function and can be acquired by creating an account on the following website https://developer.walmartlabs.com/member.

For more information refer to the original documentation https://developer.walmartlabs.com/docs/read/Home.

Response formats are described at the url https://developer.walmartlabs.com/docs/read/Item_Field_Description.

Examples

Run this code
# NOT RUN {
key <- "************************"

## Up to 20 ids can be called at once.
lookup(id = c(12417882:12417937), key = key)

lookup(id = 12417832, key = key)

lookup(upc = 10001137891, key = key)

## First argument will be used with conflicting arguments.
lookup(id = 12417837, upc = 10001137891, key = key)

lookup(id = 12417832, key = key, list_output = TRUE)
# }

Run the code above in your browser using DataLab