# Product Page

Use the Best Buy Ecommerce Scraper to extract structured product data from Best Buy product pages.

{% hint style="info" %}
Right now, only **product page scraping** is supported.
{% endhint %}

### API Setup

#### Endpoint

```url
https://ecommerce-scraper.netnut.io/scrape
```

#### Authentication

Use HTTP Basic Authentication:

```
Authorization: Basic base64(username:password)
```

Where `base64(username:password)` is the Base64-encoded string of your NetNut credentials.

### Request Body

```json
{
  "url": "https://www.bestbuy.com/site/example-product/123456.p",
  "target": "bestbuy_products"
}
```

| Field    | Status   | Description                               |
| -------- | -------- | ----------------------------------------- |
| `url`    | Required | Full Best Buy product page URL to scrape. |
| `target` | Required | Set to `bestbuy_products`.                |

### Example Requests

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST https://ecommerce-scraper.netnut.io/scrape \
  -H "Content-Type: application/json" \
  -U "username:password" \
  -d '{
    "url": "https://www.bestbuy.com/site/example-product/123456.p",
    "target": "bestbuy_products"
  }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
from base64 import b64encode

headers = {
    "Authorization": "Basic " + b64encode(b"username:password").decode(),
    "Content-Type": "application/json"
}

body = {
    "url": "https://www.bestbuy.com/site/example-product/123456.p",
    "target": "bestbuy_products"
}

response = requests.post(
    "https://ecommerce-scraper.netnut.io/scrape",
    headers=headers,
    json=body
)

print(response.json())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const username = 'your_username';
const password = 'your_password';
const auth = Buffer.from(`${username}:${password}`).toString('base64');

const headers = {
  'Authorization': `Basic ${auth}`,
  'Content-Type': 'application/json'
};

const body = {
  url: 'https://www.bestbuy.com/site/example-product/123456.p',
  target: 'bestbuy_products'
};

fetch('https://ecommerce-scraper.netnut.io/scrape', {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(body)
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error.message));
```

{% endtab %}
{% endtabs %}

### Response schema

The Ecommerce Scraper returns structured JSON for product page requests.

```json
{
  "timestamp": "2026-05-20T15:56:16.205Z",
  "traceID": "11111111-2222-3333-4444-555555555555",
  "request_duration": 2.14,
  "process_duration": 2.14,
  "scraper": "ecommerce_products",
  "response": {
    "delivery_destination": null,
    "product_id": "demo-product-001",
    "parent_product_id": null,
    "variant_id": null,
    "sku": "demo-sku-001",
    "title": "Acme - 65\" UltraView 4K Smart TV",
    "product_name": "Acme - 65\" UltraView 4K Smart TV",
    "brand": "Acme",
    "brand_id": null,
    "brand_code": null,
    "url": "https://www.example-store.com/products/acme-ultraview-65",
    "slug": "acme-ultraview-65",
    "description": "Demo product description for documentation purposes.",
    "about_this_item": [
      "65-inch 4K display",
      "Smart TV interface",
      "HDR support"
    ],
    "price": 349.99,
    "price_initial": 499.99,
    "price_shipping": null,
    "price_buybox": 349.99,
    "discount_amount": 150,
    "discount_percent": 30,
    "currency": "USD",
    "currency_symbol": "$",
    "usd_price": 349.99,
    "usd_price_initial": 499.99,
    "availability": "In stock",
    "is_on_sale": true,
    "rating": 4.6,
    "reviews_count": 128,
    "reviews_count_display": null,
    "top_review": "Great picture quality, simple setup, and solid value for the price.",
    "sales_count": null,
    "sales_count_display": null,
    "category": [
      "Demo Store",
      "Electronics",
      "TVs",
      "Smart TVs"
    ],
    "category_id": null,
    "category_name": "Smart TVs",
    "images": [
      "https://cdn.example.com/images/demo-product-001/main.jpg",
      "https://cdn.example.com/images/demo-product-001/gallery-1.jpg",
      "https://cdn.example.com/images/demo-product-001/gallery-2.jpg"
    ],
    "featured_seller": "Demo Store",
    "coupon": {
      "is_coupon_applied": false,
      "coupon_code": null,
      "coupon_discount_value": null,
      "after_coupon_price": null,
      "after_coupon_discount_price": null,
      "coupon_end_time": null
    },
    "inventory": {
      "quantity": 24,
      "inventory_status": "available",
      "real_inventory_status": "in_stock",
      "quick_ship": false
    },
    "media": {
      "primary_image": "https://cdn.example.com/images/demo-product-001/main.jpg",
      "gallery": [
        "https://cdn.example.com/images/demo-product-001/main.jpg",
        "https://cdn.example.com/images/demo-product-001/gallery-1.jpg",
        "https://cdn.example.com/images/demo-product-001/gallery-2.jpg"
      ],
      "variant_swatches": []
    },
    "series": [],
    "labels": {
      "selling_point_tags": [],
      "display_labels": []
    },
    "metadata": {
      "store_id": null,
      "merchant_id": null,
      "merchant_model": null,
      "source_product_ref": "demo-product-001",
      "ranking_metadata": null
    },
    "page_context": {
      "page_num": null,
      "page_size": null,
      "total": null,
      "has_next_page": null,
      "source_page_type": null
    }
  }
}
```

#### Key fields

* `timestamp`, `traceID`, `request_duration`, and `process_duration` describe the request.
* `scraper` identifies the scraper type.
* `response` contains the structured product data.
* `price`, `price_initial`, `discount_amount`, and `discount_percent` describe pricing.
* `rating`, `reviews_count`, and `top_review` summarize review data.
* `category`, `images`, `coupon`, `inventory`, `media`, `metadata`, and `page_context` provide product context and supporting details.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.netnut.io/netnut-documentation/netnut-scraper-apis/ecommerce-scraper-api/best-buy/product-page.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
