# B\&H Product Scraper & Monitor (`codingfrontend/b-h-product-scraper`) Actor

Extract publicly visible B\&H Photo product metadata, specifications, prices, ratings, media, and stock status.

- **URL**: https://apify.com/codingfrontend/b-h-product-scraper.md
- **Developed by:** [Coding Frontned](https://apify.com/codingfrontend) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 96.4% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does B\&H Product Scraper do?

B\&H Product Scraper reads publicly accessible product, category, and search pages from [B\&H Photo](https://www.bhphotovideo.com/) and saves product details that appear in the returned pages. It can collect names, product links, prices, availability, ratings, images, features, and specifications when those details are present. With specifications enabled, it also opens each selected product page to collect its available details.

Use it to build product catalogs, compare public prices, monitor listed availability, or organize product details for research. The Actor reads only public pages. It does not sign in, use private APIs, solve access challenges, or bypass site restrictions.

### How to run the Actor

1. Open the Actor and select **Input**.
2. Add at least one B\&H Photo page URL in **Start URLs**. Use a product, category, or search results page. You can also paste a B\&H search URL that you opened in your browser.
3. Choose a product limit and any optional settings below.
4. Select **Start** to run the Actor.
5. When the run finishes, open **Output** to view the product dataset or **Output summary** to see the run status and saved-record count.

You can also run the Actor from the **API** tab or schedule runs in Apify. All examples and output values in this README are illustrative; they are not live extraction results.

### Input settings

All fields are optional in the input schema. At run time, provide at least one valid B\&H Photo URL in `startUrls` or `urls`. The Actor accepts HTTPS URLs on `bhphotovideo.com`, `www.bhphotovideo.com`, `bhphoto.com`, and `www.bhphoto.com`.

#### Page URLs and result limit

| Field | Type | Required? | Default | What it does |
| --- | --- | --- | --- | --- |
| `startUrls` | Array of objects with a `url` string | Optional; one of `startUrls` or `urls` must contain a URL | `[]` | Main input-form field. Add product, category, or search page URLs. Up to 20 entries are accepted. |
| `maxItems` | Integer | Optional | `10` (1–100) | Maximum number of product records saved across all supplied pages. This is one limit for the whole run, not a per-page limit. |

The Actor considers `startUrls` first, then `urls`, removes repeated URLs, and uses at most 20 supplied URLs per run. It reads each supplied page once; it does not follow a category page's next-page links. Product detail pages opened for specifications are separate from this supplied-URL limit. Results stop when the shared `maxItems` limit is reached. Repeated page requests are reused within the run.

#### Product information

| Field | Type | Required? | Default | What it does |
| --- | --- | --- | --- | --- |
| `includeSpecifications` | Boolean | Optional | `true` | Open selected product links from listing pages and include available specification tables or structured specification data. This also fills available brand, description, rating, and other existing product fields from those detail pages. Set to `false` to collect only the supplied pages without extra detail requests or specification objects. Feature bullets are collected independently. |
| `deduplicate` | Boolean | Optional | `true` | Skip repeated products by product identifier or product URL. |

#### Advanced settings (Developer Options)

| Field | Type | Required? | Default | What it does |
| --- | --- | --- | --- | --- |
| `timeoutSecs` | Integer | Optional | `45` (5–180 seconds) | Maximum wait for a direct HTTP request or browser navigation. |
| `maxRequestRetries` | Integer | Optional | `0` (0–3) | Number of bounded retries for temporary direct HTTP responses. Browser-rendered requests are not retried. |
| `requestDelayMs` | Integer | Optional | `0` (0–5000 milliseconds) | Wait between page requests, including product details. Cached pages do not require another request. |
| `renderJavaScript` | Boolean | Optional | `false` | Use a bounded headless browser when product content is rendered in the browser. This uses more run time than direct HTML requests. |
| `renderWaitMs` | Integer | Optional | `5000` (500–5000 milliseconds) | Maximum wait for product content after browser navigation. Used only when `renderJavaScript` is `true`. |

#### URL alias for integrations

| Field | Type | Required? | Default | What it does |
| --- | --- | --- | --- | --- |
| `urls` | Array of strings | Optional; one of `startUrls` or `urls` must contain a URL | `[]` | Compatibility alias for integrations that provide a plain string array of URLs. The same B\&H host and 20-URL run limit apply. |

The Actor does not accept keyword-only searches, price filters, sorting, pagination settings, fixture inputs, or diagnostic-output switches. To search, first open the desired search results page on B\&H Photo and provide its URL.

### Tips for better runs

- Copy the full product, category, or search results URL from B\&H Photo. A search phrase by itself is not an input.
- Start with a small `maxItems` value to confirm the chosen page returns product records.
- Add a `requestDelayMs` when supplying several pages to space out requests.
- Turn on `renderJavaScript` only when the page content is not present in its direct HTML response; browser rendering uses more compute time.
- Leave `includeSpecifications` enabled for product details from category or search results. Turn it off for faster listing-only collection.
- If optional product fields are missing, they may not be publicly displayed on that page. A failed detail request keeps the available listing product and marks the run as having limited results.

### Copyable input examples

#### Read a category or search page with a small limit

```json
{
  "startUrls": [
    { "url": "https://www.bhphotovideo.com/c/buy/Digital-Cameras/ci/9811" }
  ],
  "maxItems": 5
}
```

#### Read multiple pages and keep products unique

```json
{
  "startUrls": [
    { "url": "https://www.bhphotovideo.com/c/buy/Digital-Cameras/ci/9811" },
    { "url": "https://www.bhphotovideo.com/c/search?Ntt=mirrorless" }
  ],
  "maxItems": 20,
  "deduplicate": true,
  "requestDelayMs": 500
}
```

#### Collect listing information without extra product requests

```json
{
  "startUrls": [
    { "url": "https://www.bhphotovideo.com/c/buy/Digital-Cameras/ci/9811" }
  ],
  "includeSpecifications": false
}
```

#### Use the string-array URL alias

```json
{
  "urls": [
    "https://www.bhphotovideo.com/c/buy/Digital-Cameras/ci/9811"
  ],
  "maxItems": 10
}
```

#### Render a page that needs browser JavaScript

```json
{
  "startUrls": [
    { "url": "https://www.bhphotovideo.com/c/buy/Digital-Cameras/ci/9811" }
  ],
  "maxItems": 10,
  "renderJavaScript": true,
  "renderWaitMs": 3000
}
```

Replace the example URLs with the B\&H pages you want to read. A page may return an access challenge, change its layout, or contain no product details; those cases do not create product rows.

### What data can the Actor return?

Each dataset row represents one product. The Actor requires a product name and product URL; `dataType` is always `product`. Other fields are optional and appear only when the page contains usable values.

| Field | Type | Required? | Meaning |
| --- | --- | --- | --- |
| `productId` | String | Optional | Identifier derived from the product URL, SKU, or MPN when available. |
| `dataType` | String | Required | Always `product`. |
| `name` | String | Required | Public product name. |
| `url` | String | Required | Product page URL. |
| `brand` | String | Optional | Public brand name. |
| `manufacturer` | String | Optional | Public manufacturer name. |
| `sku` | String | Optional | B\&H stock keeping unit. |
| `mpn` | String | Optional | Manufacturer part number. |
| `category` | String | Optional | Public category or breadcrumb text. |
| `description` | String | Optional | Public product description with HTML formatting removed. |
| `features` | Array of strings | Optional | Public feature bullets. |
| `specifications` | Object of strings | Optional | Specification labels mapped to their public values when enabled. Multiple lines or structured values are joined with `\|`. |
| `images` | Array of strings | Optional | Public image URLs. |
| `price` | Number | Optional | Public numeric price; no value is added when a price is unavailable. |
| `currency` | String | Optional | Currency associated with the displayed price. |
| `availability` | String | Optional | Public availability value or text. |
| `rating` | Number | Optional | Public rating from 0 to 5. |
| `reviewCount` | Integer | Optional | Public review count. |
| `weight` | String | Optional | Public product weight. |
| `stockText` | String | Optional | Public stock or availability text. |

Illustrative business output JSON:

```json
{
  "dataType": "product",
  "productId": "EXCAM123",
  "name": "Example Mirrorless Camera",
  "url": "https://www.bhphotovideo.com/c/product/example-camera.html",
  "brand": "Example Imaging",
  "manufacturer": "Example Imaging Inc.",
  "sku": "EXCAM123",
  "mpn": "EX-CAM-123",
  "category": "Cameras > Mirrorless Cameras",
  "description": "Illustrative compact full-frame camera description.",
  "features": [
    "Illustrative 24-megapixel sensor",
    "Illustrative in-body image stabilization"
  ],
  "specifications": {
    "Sensor Resolution": "24 megapixels",
    "Lens Mount": "Example Mount",
    "Connections": "USB-C | HDMI"
  },
  "images": [
    "https://www.bhphotovideo.com/images/example-camera-front.jpg"
  ],
  "price": 1299.95,
  "currency": "USD",
  "availability": "https://schema.org/InStock",
  "rating": 4.6,
  "reviewCount": 128,
  "weight": "1.4 lb",
  "stockText": "In Stock"
}
```

This complete example shows the supported public fields and the shape of nested values. Actual rows may omit any optional field when B\&H does not show it or the page cannot be parsed. For example, manufacturer or category information may be absent even when specifications are available. If optional detail collection fails, available listing fields remain in the saved row; missing detail values are left out. The product name, product URL, and `dataType` are present on every saved row. Each selected product is saved once after detail collection, and enrichment does not create extra rows. The Actor does not add placeholder values or diagnostic records to real dataset rows.

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

### Run status and output summary

The run status is based on valid product records whose dataset writes completed.

| Run result | Meaning |
| --- | --- |
| **Succeeded** | At least one product record was saved and collection completed normally. |
| **Succeeded with limited results** | At least one product record was saved and a page request, optional product detail request, parse, or dataset write failed. Available products remain saved, including listing records whose details could not be loaded. |
| **Failed** | No valid product record was saved. Empty pages, blocked pages, invalid input, or failed writes do not create placeholder rows. |

The separate **Output summary** link opens `OUTPUT_SUMMARY` in the run's default **Key-value store**. This record is separate from the product dataset and contains exactly these fields:

| Field | Type | Required? | Meaning |
| --- | --- | --- | --- |
| `status` | String | Required | `SUCCEEDED` when at least one real product row was saved; otherwise `FAILED`. |
| `itemsStored` | Nonnegative integer | Required | Number of validated product records whose dataset writes completed. |
| `isPartial` | Boolean | Required | `true` when collection was interrupted or limited after saving at least one record. |

Illustrative completed-run summary:

```json
{
  "status": "SUCCEEDED",
  "itemsStored": 5,
  "isPartial": false
}
```

### Access limitations

The Actor reads ordinary public B\&H pages only. B\&H may limit access or return a challenge; the Actor does not bypass these restrictions, and a run with no saved products is marked failed. Respect B\&H's access rules and terms when choosing URLs; some paths, including search paths, may be restricted by its robots policy. The page layout and available product information can change, so fields vary between products. Detail requests use the same timeout, direct HTTP retry limit, and browser setting as supplied pages.

### Cost

There is no separate data-provider price set in this README. Apify compute usage and storage charges depend on your Apify plan, run duration, and amount of data stored. Browser rendering generally uses more compute time than direct HTTP requests. Check your Apify account for current rates.

### Support

Use collected information in line with B\&H's terms and applicable laws. For support, include the run link and the B\&H page URL you supplied. Do not include account credentials or private information.

# Actor input Schema

## `startUrls` (type: `array`):

B\&H Photo page URLs to read. Use this field in the Input form; at least one URL is required at run time across startUrls and urls.

## `urls` (type: `array`):

Optional string-array alias for integrations. URLs are combined with startUrls, deduplicated, and limited to 20 total per run.

## `maxItems` (type: `integer`):

Maximum number of valid product records saved across all supplied pages.

## `includeSpecifications` (type: `boolean`):

Include publicly visible specification tables when present. Feature bullets are collected independently.

## `timeoutSecs` (type: `integer`):

Maximum wait for each direct HTTP request or browser navigation.

## `maxRequestRetries` (type: `integer`):

Maximum bounded retries for temporary direct HTTP responses. Browser-rendered requests are not retried.

## `requestDelayMs` (type: `integer`):

Wait between supplied page requests. This can reduce request frequency on the public site.

## `renderJavaScript` (type: `boolean`):

Use a bounded headless browser for pages whose product content is rendered in the browser.

## `renderWaitMs` (type: `integer`):

Maximum bounded wait for product content after browser navigation.

## `deduplicate` (type: `boolean`):

Skip repeated products using their product identifier or product URL.

## Actor input object example

```json
{
  "startUrls": [],
  "urls": [],
  "maxItems": 10,
  "includeSpecifications": true,
  "timeoutSecs": 45,
  "maxRequestRetries": 0,
  "requestDelayMs": 0,
  "renderJavaScript": false,
  "renderWaitMs": 5000,
  "deduplicate": true
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset of validated public B\&H product records.

## `runSummary` (type: `string`):

Three-field run summary stored in the default key-value store under OUTPUT_SUMMARY.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("codingfrontend/b-h-product-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("codingfrontend/b-h-product-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call codingfrontend/b-h-product-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,codingfrontend/b-h-product-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ceJRQcewc9uIBA9WP/builds/wyEFlt909SLSHPpI6/openapi.json
