This is a small python wrapper implementation for BestBuy API.
- Query Bulk BestBuy API
- Query Stores BestBuy API
- Query Products BestBuy API
- Query Categories BestBuy API
- Obtain queries result in JSON or XML
- Environment variable support via
python-dotenv - Modern development workflow with
uvandpre-commit
We recommend using uv for package management:
uv add bestbuyapiOr with pip:
pip install bestbuyapiYou can use a .env file to store your API key:
BESTBUY_API_KEY=your_api_key_herefrom bestbuyapi import BestBuyAPI
# If not provided, it will look for BESTBUY_API_KEY in environment variables
bb = BestBuyAPI()
a_prod = bb.products.search(query="sku=9776457", format="json")
a_cat = bb.category.search_by_id(category_id="abcat0011001", format="json")
all_categories = bb.bulk.archive("categories", "json")Tests are executed via pytest. We use pytest-cov for coverage reporting.
uv run pytest --cov=bestbuyapiOur CI pipeline in GitHub Actions runs tests across multiple Python versions. Coverage reports are generated during the test phase and can be shared or uploaded to services like Codecov.
We use pre-commit to ensure code quality. It runs ruff for linting and formatting.
uv run pre-commit run --all-files- Is there any difference between /api.bestbuy.com/ and api.remix.bestbuy.com? A: There is no difference, they serve the same data - we just consolidated domains. The official url to use is api.bestbuy.com.
Any questions please feel free to email me at: luis@lv10.me