richmondteo-code/buywhere-py
Official Python SDK for the BuyWhere Product Catalog API
Platform-specific configuration:
{
"mcpServers": {
"buywhere-py": {
"command": "npx",
"args": [
"-y",
"buywhere-py"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
Official Python SDK for the BuyWhere Product Catalog API — the agent-native product search API for Singapore.
pip install buywhere-sdkOr from source:
pip install -e sdk/python/from buywhere import BuyWhereClient
client = BuyWhereClient(api_key="key_xxx", base_url="http://143.198.87.39:8000")
# Search products in Singapore
results = client.products.search(q="iphone 15", country="sg", limit=10)
for r in results.results:
print(r.title, r.price.amount, r.price.currency)from buywhere import BuyWhereClient
client = BuyWhereClient(api_key="key_xxx")
# Search products
results = client.products.search(q="iphone 15", country="sg", limit=10)
# Get product by ID
product = client.products.get(product_id="abc123")
# Compare prices across merchants
prices = client.products.compare_prices(product_id="abc123")
print(prices.best_price)
# List categories
categories = client.categories.list()
# Category detail
electronics = client.categories.get("electronics")
print(electronics.subcategories)import asyncio
from buywhere import AsyncBuyWhereClient
async def main():
async with AsyncBuyWhereClient(api_key="key_xxx") as client:
results = await client.products.search(q="airfryer", country="sg")
for r in results.results:
print(r.title, r.price.amount)
asyncio.run(main())results = client.products.search(q="laptop", limit=10)
while results.has_more:
results = client.products.search(q="laptop", limit=10, cursor=results.next_cursor)
for r in results.results:
print(r.title)results = client.products.search(
q="headphones",
category="electronics/audio",
price_min=50.0,
price_max=300.0,
platform="shopee",
sort="price_asc",
limit=20,
)Loading reviews...