PriceBell 0.1.0
dotnet add package PriceBell --version 0.1.0
NuGet\Install-Package PriceBell -Version 0.1.0
<PackageReference Include="PriceBell" Version="0.1.0" />
<PackageVersion Include="PriceBell" Version="0.1.0" />
<PackageReference Include="PriceBell" />
paket add PriceBell --version 0.1.0
#r "nuget: PriceBell, 0.1.0"
#:package PriceBell@0.1.0
#addin nuget:?package=PriceBell&version=0.1.0
#tool nuget:?package=PriceBell&version=0.1.0
PriceBell .NET SDK
The official .NET SDK for the PriceBell Google Shopping price tracking API.
Track Google Shopping prices in 33 countries with a scheduled watchlist, price history, sellers, cross-country comparison and alerts.
The SDK exposes 14 typed async methods, one per documented endpoint (with required properties checked at compile time), plus ClearTargetPriceAsync and a generic RequestAsync.
Requirements
- .NET 8 or newer
Installation
dotnet add package PriceBell
Get your API key
Sign up for PriceBell or sign in, then copy your API key from the dashboard. new PriceBellClient() reads the PRICEBELL_API_KEY environment variable.
Quick start
using PriceBell;
using var client = new PriceBellClient();
var response = await client.SearchGoogleShoppingAsync(new SearchGoogleShoppingParams { Query = "airpods pro 2" });
Console.WriteLine(response.Json);
Parameter classes mirror the API reference. Use response.Deserialize<MyType>() to map the JSON onto your own types.
HTTP methods
Each method uses the HTTP verb of its endpoint. GET and DELETE send parameters in the query string; POST and PATCH send them as a JSON body, except wait on /products/{id}/check, which stays in the query string. Null values are never sent: to remove a product's target price, call ClearTargetPriceAsync(id), which sends {"target_price": null}.
Any endpoint
var response = await client.RequestAsync("GET", "/account");
Errors
try
{
await client.SearchGoogleShoppingAsync(new SearchGoogleShoppingParams { Query = "airpods pro 2" });
}
catch (PriceBellApiException exception)
{
Console.Error.WriteLine($"{exception.StatusCode} {exception.ErrorCode}: {exception.Message}");
}
ErrorCode is the API's error.code (such as rate_limited, product_limit or not_found), or null when the body has none.
| Exception | When |
|---|---|
PriceBellConfigurationException |
Missing API key, invalid options or unsupported method. |
PriceBellSerializationException |
A required parameter is missing or a value can't be sent. |
PriceBellTransportException |
Network failure or timeout. |
PriceBellApiException |
Non-2xx status (StatusCode, ErrorMessage, ErrorCode, ResponseBody, RawResponse). |
PriceBellResponseDecodingException |
A success response could not be decoded. |
All of them derive from PriceBellException. Caller cancellation surfaces as OperationCanceledException.
Retries
Requests are retried up to 3 times after a network error, a 408, 500, 502, 503 or 504. Other statuses, such as 400, 401, 402, 404 or 429, and client-side timeouts are not retried: the API's rate limits last until the hour (or the day) is over, and on the free plan every retry would count as a request. The delay starts at 1 second and grows 1.5× per retry (capped at 30 seconds); a Retry-After header wins.
using var client = new PriceBellClient(new PriceBellClientOptions { MaxRetries = 5, RetryDelay = TimeSpan.FromMilliseconds(500) });
await client.SearchGoogleShoppingAsync(new SearchGoogleShoppingParams { Query = "airpods pro 2" }, new RequestOptions { MaxRetries = 0 }); // one request without retries
Batch requests
BatchAsync runs a function per item with at most 10 in flight (concurrency) and returns one BatchResult per item, in input order. A failing item never stops the others.
string[] inputs = { "airpods pro 2", "nintendo switch 2", "dyson v15" };
var results = await client.BatchAsync(inputs, (value, ct) =>
client.SearchGoogleShoppingAsync(new SearchGoogleShoppingParams { Query = value }, cancellationToken: ct), concurrency: 5);
foreach (var result in results)
{
if (result.Ok)
{
Console.WriteLine(result.Value!.Json);
}
else
{
Console.Error.WriteLine($"{inputs[result.Index]}: {result.Error!.Message}");
}
}
| Constant | Default | Description |
|---|---|---|
PriceBellClient.DefaultConcurrency |
10 |
Tasks run at the same time by batch |
PriceBellClient.DefaultTimeout |
TimeSpan.FromSeconds(120) |
Request timeout |
PriceBellClient.MaxRetries |
3 |
Retry attempts after a network error, a 408/5xx |
PriceBellClient.RetryBackoffFactor |
1.5 |
Exponential backoff multiplier |
PriceBellClient.DefaultRetryDelay |
TimeSpan.FromSeconds(1) |
Delay before the first retry |
Configuration
using var client = new PriceBellClient(new PriceBellClientOptions
{
ApiKey = Environment.GetEnvironmentVariable("PRICEBELL_API_KEY"),
Timeout = TimeSpan.FromSeconds(60), // default 120 s
HttpClient = myHttpClient, // optional, you keep ownership
});
Endpoints
14 methods, generated from the OpenAPI document, plus ClearTargetPriceAsync.
| Method | HTTP | Description |
|---|---|---|
CheckProductAsync |
POST /products/{id}/check |
Asks for a check right away (1 credit), at most once per 5 minutes; earlier calls return the product unchanged. A paused product has to be… |
CompareRegionsAsync |
GET /products/{id}/compare |
The same product tracked in several countries, cheapest first: each country's local price, the price converted into the comparison's curren… |
ClearTargetPriceAsync |
PATCH /products/{id} |
Removes the product's target price (sends {"target_price": null}). |
DeleteProductAsync |
DELETE /products/{id} |
Removes the product and its price history. |
GetAccountAsync |
GET /account |
Your plan, the credits left (monthly allowance and packs), how many products you track and the credits they use per month, the credits each… |
GetGoogleProductHistoryAsync |
GET /history |
Every price PriceBell read for a product ID on a marketplace over the period, whoever tracks it, oldest first, with the lowest, highest and… |
GetProductAsync |
GET /products/{id} |
The product's latest state and every price read of the period, oldest first. The history covers every read of this product ID on this marke… |
GetSellersAsync |
GET /products/{id}/sellers |
The sellers of a tracked product at its latest check, cheapest first: each offer that is the product as sold new (accessories, used, refurb… |
LeaveComparisonAsync |
DELETE /products/{id}/compare |
The product leaves its comparison and stays tracked on its own. |
ListProductsAsync |
GET /products |
Your watchlist, newest first, with each product's latest state and its recent prices (trend). Filter with google_product_id (and marketplac… |
SearchGoogleShoppingAsync |
GET /search |
Google Shopping search results (sponsored included), to find the product ID of a product. Free, limited to 30 searches per hour. |
TrackInRegionsAsync |
POST /products/{id}/compare |
Tracks the same product in other countries, each one a product of your watchlist (its own checks and credits, within your plan's product li… |
TrackProductAsync |
POST /products |
Adds a product ID or a Google Shopping link to your watchlist. A product ID alone works only for a product PriceBell already knows in that… |
UpdateComparisonAsync |
PATCH /products/{id}/compare |
The currency prices are converted into, and the "cheaper in another country" alert: an email (and chat channels) when another country's con… |
UpdateProductAsync |
PATCH /products/{id} |
Target price, drop alerts, check interval, or pause. Send only what changes. On the free plan, alerts (price drop, offered again, target pr… |
All PriceBell SDKs
| SDK | Package | Install |
|---|---|---|
| Node.js | @pricebell/sdk |
npm install @pricebell/sdk |
| Python | pricebell |
pip install pricebell |
| Go | pricebell-go |
go get github.com/pricebelldev/pricebell-go |
| .NET | PriceBell |
dotnet add package PriceBell |
| Ruby | pricebell |
gem install pricebell |
| PHP | pricebell/sdk |
composer require pricebell/sdk |
| Java | pricebell-java |
build from source, see its README |
| CLI | @pricebell/cli |
npm install -g @pricebell/cli |
| MCP server | @pricebell/mcp |
npx -y @pricebell/mcp |
Trademarks
Google and Google Shopping are trademarks of Google LLC. PriceBell is not affiliated with, endorsed or sponsored by Google.
License
MIT — see LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 0 | 12/5/2026 |