For the complete documentation index, see llms.txt. This page is also available as Markdown.

Best Buy

Learn how to start scraping Best Buy.

With Web Scraper API, you can scrape various types of Best Buy pages; below is an overview of all supported scrapers and their respective source values. The response returns the page HTML in content, in the standard response structure described in Realtime and Push-Pull. Product pages can also be returned as structured data with parse: true, see Product.

Source
Description

bestbuy_search

Search page for a search term of your choice.

bestbuy_product

Product page of a product ID of your choice. Dedicated parser available.

Any other Best Buy page can be scraped by passing its url alone, no source needed.

Besides the parameters listed below, you can include additional parameters such as user_agent_type, geo_location, render, and more to customize your scraping request. Read more here.

Request samples

curl 'https://realtime.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
        "source": "bestbuy_search",
        "query": "iphone 14",
        "domain": "com"
    }'
import requests
from pprint import pprint

# Structure payload.
payload = {
    'source': 'bestbuy_search',
    'query': 'iphone 14',
    'domain': 'com'
}

# Get response.
response = requests.request(
    'POST',
    'https://realtime.oxylabs.io/v1/queries',
    auth=('USERNAME', 'PASSWORD'),
    json=payload
)

# Instead of response with job status and results url, this will return the
# JSON response with the result.
pprint(response.json())

Request parameter values

Parameter
Description
Default Value

source

Sets the scraper.

bestbuy_search

query

The keyword or phrase to search for products.

-

start_page

Starting page number.

1

domain, fulfillment_type, store_id, delivery_zip

Optional localization and availability filters, see Localization and Filtering.

-

- mandatory parameter

Product

Request samples

Request parameter values

Parameter
Description
Default Value

source

Sets the scraper.

bestbuy_product

product_id

The product ID (SKU), the number at the end of the product page URL, e.g. bestbuy.com/product/-/6586591.

-

parse

Returns parsed data when set to true. Explore the output data dictionary.

false

domain, store_id, delivery_zip

Optional localization parameters, see Localization and Filtering.

-

- mandatory parameter

Response example

A parsed product page for product ID 6586591:

Output data dictionary

The table below presents a detailed list of each product page element we parse, along with its description and data type. The table also includes some metadata.

Key
Description
Type

url

The URL of the Best Buy product page.

string

price

The price object, containing price and currency information.

object

price.price

The price of the product.

float

price.currency

The currency in which the price is denominated.

string

title

The title of the product.

string

rating

The rating object, containing count and score of ratings.

object

rating.count

The number of ratings received for the product.

integer

rating.score

The rating score of the product.

float

product_id

The unique identifier for the product.

string

is_sold_out

Indicates whether the product is sold out.

boolean

additional_information

Additional product information, if present.

array

parse_status_code

The status code of the parsing job. You can see the parser status codes described here.

integer

created_at

The timestamp when the scraping job was created.

timestamp

updated_at

The timestamp when the scraping job was finished.

timestamp

page

The page number in the pagination of results.

integer

status_code

The HTTP status code of the scraped page.

integer

parser_type

The type of parser used to extract the data.

string

job_id

The ID of the job associated with the scraping job.

string

Localization and Filtering

Best Buy search results can be narrowed to what is available at a store or for shipping to a ZIP code, and product pages can be shown for a chosen store or ship-to ZIP code.

Parameter
Applies to
Description
Default

domain

bestbuy_search, bestbuy_product

Domain localization. Available values: com (both sources), ca (bestbuy_product only). The dedicated parser supports com only.

com

fulfillment_type

bestbuy_search

Filters the search results by availability. Available values: pickup (requires store_id), shipping (requires delivery_zip).

-

store_id

bestbuy_search, bestbuy_product

Store ID as an integer, the trailing number in the store's URL on stores.bestbuy.com, e.g. 552. On search pages it only takes effect together with fulfillment_type: pickup; on product pages it sets the pickup store.

-

delivery_zip

bestbuy_search, bestbuy_product

ZIP code as a string, e.g. "10001". On search pages it only takes effect together with fulfillment_type: shipping; on product pages it sets the ship-to location.

-

fulfillment_type without its companion parameter is rejected with HTTP 400. A store ID Best Buy does not recognize returns a results page with zero products, not an error.

Last updated

Was this helpful?