0

I'm searching for a particular item that is listed as available for in-store pickup only, but not in my area.

I'd like to use the API to find out which stores do have that item in stock so I can phone a friend that lives in one of those areas and get them to pick it up.

So... How can I list the stores that have a particular item in stock?

Answer

The geographic center of the United States is 39°50' (39.8333), -98°35' (-98.5833)

The width United States is approximately 3,000 miles.

So if we search a radius of 2000 miles in any direction from that point we get:

http://api.remix.bestbuy.com
  /v1/stores(area(39.8333,-98.5833,2000mi))
  +products(sku=YOUR_SKU_ID)
  ?format=json
  &pageSize=100
  &page=1
  &show=storeId,storeType,city,region,name,products.name,products.sku,products
  &apiKey=YOUR_API_KEY

http://api.remix.bestbuy.com/v1/stores(area(39.8333,-98.5833,2000mi))+products(sku=6461052)?format=json&pageSize=100&page=1&show=storeId,storeType,city,region,name,products.name,products.sku,products&apiKey=YOUR_API_KEY

And you'll be surprised that while 1419 stores have Black Ink'd Skullcandy Earbuds in stock the day before Christmas, 0 of them have the Marth Amiibo, and 67 have the Star Fox Amiibo... who knew?

coolaj86
  • 74,004
  • 20
  • 105
  • 125

1 Answers1

3

The API does provide a way to check for product availability in specific stores. Here is an example query (you need to substitute in your own apiKey) that uses coordinates and a radius within which to search:

http://api.remix.bestbuy.com/v1/stores(area(44.882942,-93.2775,10mi))+products(sku=6461052)?apiKey=yourApiKey&format=json&show=storeId,storeType,city,region,name,products.name,products.sku,products

There is documentation about this feature here: https://developer.bestbuy.com/documentation/stores-api#documentation/stores-api-in-store-availability

You will find in the documentation that you can also search for availability at a specific store, or use a postal code. But I think using the coordinates may fit the case described in your question best.

coolaj86
  • 74,004
  • 20
  • 105
  • 125
tcox5698
  • 111
  • 2
  • Actually, it appears that I can search all 3,000 miles across the country (or at least 142 stores have skull candy ear buds in stock) and that the flag for available in store is mistaken about the product I'm searching for. – coolaj86 Dec 23 '14 at 23:20
  • @CoolAJ86 Are you saying you discovered a problem in the availability flag? If you're willing, please email developer@bestbuy.com with the details and we'll take a look at it. There are however some caveats with the store availability information - these caveats are described in the docs at https://developer.bestbuy.com/documentation/stores-api#documentation/stores-api-in-store-availability. Note that the documentation states "Filtering using the attribute inStoreAvailability will tell you if a product is sold in stores but not if it's available at a particular store." – tcox5698 Dec 31 '14 at 16:24
  • Ahhh... that must be it. However, I've noticed that on the bestbuy website it often says "pick up today" when the item either hasn't reached its embargo date or the item is already sold and being held for pre-order pickup (on pages like this http://bit.ly/bestbuy-available-for-store-pickup). – coolaj86 Dec 31 '14 at 21:39