Skip to content
Scrappa Get API key
B&H Photo API 1 credit / request

B&H Photo Search API Documentation

GET https://scrappa.co/api/bhphoto/search

B&H Photo Search API Documentation Search public B&H products by keyword or category id. Filter by price range, brand, sort and page. Every item has the product id, name, brand, sale price, original price, discount, rating, review count, availability and a full-size photo. Product ids work unchanged in the product endpoint. The answer has the total result count and the page count. Every requested filter is checked on every item. A one-word query that B&H answers with a category page is followed to the product list of the matching category. Queries that return only editorial articles get 422 NO_PRODUCTS and are not billed. 1 credit per successful request. An empty result and a failed request are not billed. Not affiliated with B&H Photo.

B&H Photo Search API Documentation 1 credit / request

Endpoint

Request preview
GET
https://scrappa.co/api/bhphoto/search
Auth header
x-api-key
Cost
1 credit / request
Response preview
200 OK
{
    "data": {
        "site": "bh",
        "items": [
            {
                "id": "1948568-REG",
                "mpn": "3382C002",
                "sku": "1948568",
                "url": "https://www.bhphotovideo.com/c/product/1948568-REG/canon_eos_r6_mirrorless_camera.html",
                "brand": "Canon",
                "image": "https://static.bhphoto.com/images/images2500x2500/1948568_1.jpg",
                "price": {
                    "amount": 1999,
                    "currency": "USD"
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

This endpoint has no required query parameters.

8 optional filters available.

query string Optional

Search words, up to 100 characters. Required without category.

Example value coffee shops
category integer Optional

B&H category id, the number after /ci/ in a B&H category url, for example 60095 Mini PCs, 9811 Digital Cameras or 16158 Mirrorless Cameras. Required without query.

Example value 10
sort string Optional

relevance (default), price_asc or rating. price_asc sorts the fetched page by ascending price. rating sorts by rating then review count, unrated last.

Example value relevance
min_price number Optional

Lowest price.

Example value 10
max_price number Optional

Highest price. Must not be lower than min_price.

Example value 10
brand string Optional

Brand name filter, checked on every item.

Example value example
page integer Optional

Page number, 1 or higher.

Example value 1
site string Optional

bh only. Other sites return 422.

Example value example

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Response fields

38 fields
Field Type
data.site string
data.items array
data.items[].id string
data.items[].mpn string
data.items[].sku string
data.items[].url string
data.items[].brand string
data.items[].image string
data.items[].price.amount integer
data.items[].price.currency string
data.items[].title string
data.items[].images array
data.items[].images[] string
data.items[].rating number
data.items[].in_stock boolean
data.items[].availability string
data.items[].review_count integer
data.items[].original_price.amount integer
data.items[].original_price.currency string
data.items[].discount_percent integer
data.filters.sort string
data.filters.brand null
data.filters.query string
data.filters.category null
data.filters.max_price null
data.filters.min_price null
data.currency string
data.pagination.has_more boolean
data.pagination.per_page integer
data.pagination.total_items integer
data.pagination.total_pages integer
data.pagination.current_page integer
data.pagination.matched_items integer
data.pagination.page_item_count integer
meta.credits integer
meta.billable boolean
meta.endpoint_family string
success boolean
JSON Response
200 OK
{
    "data": {
        "site": "bh",
        "items": [
            {
                "id": "1948568-REG",
                "mpn": "3382C002",
                "sku": "1948568",
                "url": "https://www.bhphotovideo.com/c/product/1948568-REG/canon_eos_r6_mirrorless_camera.html",
                "brand": "Canon",
                "image": "https://static.bhphoto.com/images/images2500x2500/1948568_1.jpg",
                "price": {
                    "amount": 1999,
                    "currency": "USD"
                },
                "title": "Canon EOS R6 Mirrorless Camera",
                "images": [
                    "https://static.bhphoto.com/images/images2500x2500/1948568_1.jpg"
                ],
                "rating": 4.8,
                "in_stock": true,
                "availability": "In Stock",
                "review_count": 312,
                "original_price": {
                    "amount": 2299,
                    "currency": "USD"
                },
                "discount_percent": 13
            }
        ],
        "filters": {
            "sort": "relevance",
            "brand": null,
            "query": "camera",
            "category": null,
            "max_price": null,
            "min_price": null
        },
        "currency": "USD",
        "pagination": {
            "has_more": true,
            "per_page": 28,
            "total_items": 4229,
            "total_pages": 152,
            "current_page": 1,
            "matched_items": 28,
            "page_item_count": 28
        }
    },
    "meta": {
        "credits": 1,
        "billable": true,
        "endpoint_family": "search"
    },
    "success": true
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

A query parameter is missing or invalid. This response is not billable.

{
    "errors": {
        "query": [
            "Send a query or a category id."
        ]
    },
    "message": "The request validation failed"
}
422

No Product List

B&H has no product list for this query, filters and page. When the query or category opens a B&H category page without products (for example query=monitor), error.categories lists that page's categories with id, name, group and url. Repeat the search with one of these ids as category. This response is not billable.

{
    "meta": {
        "billable": false,
        "retryable": false,
        "endpoint_family": "search"
    },
    "error": {
        "code": "NO_PRODUCTS",
        "message": "B&H publishes no product list for this query. Use a product-specific query or a category."
    },
    "success": false
}
503

Upstream Unavailable

The upstream service is temporarily unavailable. Please retry shortly.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "search"
    },
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "B&H is temporarily unavailable. Please retry."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.