# B&H Photo Video Search ## Overview | Property | Value | |----------|-------| | **Status** | active | | **Method** | `GET` | | **Endpoint** | `/v2/bhphotovideo/search` | | **Base URL** | `https://api.piloterr.com` | | **Credit Cost** | 1 credit per call | | **Documentation** | https://www.piloterr.com/library/bhphotovideo-search | ## Description Search B&H Photo Video by keyword or search URL. Returns BH numbers, dollar prices, and a next page URL. ## Authentication - **Key Name:** `x-api-key` - **Location:** HTTP Header - **Get an API key:** https://app.piloterr.com/register ## Example Request ```bash curl --location --request GET 'https://api.piloterr.com/v2/bhphotovideo/search' \ --header 'Content-Type: application/json' \ --header 'x-api-key: YOUR_API_KEY' ``` ## Example Response ### B&H search for sandisk extreme pro ```json { "results": [ { "mpn": "SDSDXXJ-128G-GSCIN", "sku": "SA128EPSD", "url": "https://www.bhphotovideo.com/c/product/1948568-REG/sandisk_sdsdxxj_128g_gscin_128gb_extreme_pro_uhs_i.html", "price": 51.99, "title": "SANDISK 128GB Extreme PRO UHS-I SDXC Memory Card", "currency": "USD", "product_id": "1948568-REG", "review_count": 25, "price_display": "$51.99", "original_price": 52.99, "original_price_display": "$52.99" } ], "pagination": { "next": "https://www.bhphotovideo.com/c/search?pn=2&q=sandisk%20extreme%20pro", "page": 1, "per_page": 28, "total_pages": null, "total_results": null } } ``` ## Documentation ## Overview Search B&H Photo Video. `query` is a keyword. `page` starts at 1. ## Quickstart ``` GET https://api.piloterr.com/v2/bhphotovideo/search?query=sandisk+extreme+pro ``` ``` GET https://api.piloterr.com/v2/bhphotovideo/search?query=tripod&page=2 ``` ## Parameters | Parameter | Type | Required | Description | |---|---|---|---| | `query` | string | yes | Example: `sandisk extreme pro` | | `page` | integer | no | Example: `2` | ## Response fields `price` is a number. `price_display` is `$51.99`. `next` is a URL or null. ## Use cases - Collect BH numbers and manufacturer parts. - Compare sale price and strikethrough price. - Walk pages with `pn` or `next`. ## Error codes - 400: empty query or another host. - 404: no cards. - 500: fetch failed.