
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@buywhere/sdk
Advanced tools
Official TypeScript/JavaScript SDK for BuyWhere product search, compare, price history, key rotation, and webhooks.
npm install @buywhere/sdk
import { createClient } from '@buywhere/sdk';
const client = createClient('bw_live_your_api_key');
const results = await client.search.search('wireless headphones', {
country: 'US',
limit: 5,
});
const comparison = await client.compare(['sku_123', 'sku_456']);
const history = await client.priceHistory('sku_123', {
limit: 30,
since: '2026-01-01T00:00:00Z',
});
const webhook = await client.webhooks.create(
'https://example.com/webhooks/buywhere',
['price_drop', 'product_update'],
);
console.log(results.items.length, comparison.products.length, history.price_history.length, webhook.id);
import { BuyWhereSDK } from '@buywhere/sdk';
const client = new BuyWhereSDK({
apiKey: 'bw_live_your_api_key',
baseUrl: 'https://api.buywhere.ai',
timeout: 30000,
defaultCurrency: 'USD',
defaultCountry: 'US',
retry: {
maxRetries: 3,
initialDelayMs: 1000,
maxDelayMs: 10000,
backoffMultiplier: 2,
},
});
import type {
CompareResponse,
PriceHistoryResponse,
RotateApiKeyResponse,
Webhook,
} from '@buywhere/sdk';
const client = createClient('bw_live_your_api_key');
const compareResult: CompareResponse = await client.compare(['sku_123', 'sku_456']);
const historyResult: PriceHistoryResponse = await client.priceHistory('sku_123', {
limit: 14,
since: '2026-04-01T00:00:00Z',
});
const rotation: RotateApiKeyResponse = await client.rotateApiKey();
const createdWebhook = await client.webhooks.create(
'https://example.com/webhooks/buywhere',
['price_drop'],
);
const webhooks: Webhook[] = await client.webhooks.list();
await client.webhooks.delete(createdWebhook.id);
The existing namespaced helpers still work:
const categoryComparison = await client.compare.compareByCategory('electronics');
const product = await client.products.getProduct(12345);
const deals = await client.deals.getDeals({ country: 'US', limit: 10 });
import { BuyWhereError, createClient } from '@buywhere/sdk';
const client = createClient('bw_live_your_api_key');
try {
await client.compare(['sku_123', 'sku_456']);
} catch (error) {
if (error instanceof BuyWhereError) {
console.error(error.statusCode);
console.error(error.errorCode);
console.error(error.requestId);
console.error(error.message);
}
}
BuyWhereError normalizes the API error payload into:
statusCodeerrorCoderequestIdmessageThe package ships dual ESM + CJS builds with typed exports:
import { createClient } from '@buywhere/sdk';
const { createClient } = require('@buywhere/sdk');
npm run build
npm test
FAQs
Official BuyWhere SDK for product search, price comparison, and deals
The npm package @buywhere/sdk receives a total of 1 weekly downloads. As such, @buywhere/sdk popularity was classified as not popular.
We found that @buywhere/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.