Credit monitoring
Display remaining credits and rate class in internal dashboards.
Developer docs
Use this endpoint to read credit balance, rate class, scrape limits, plan data, and recent usage rows for the authenticated client.
{
"clientCode": "demo-client",
"rateClass": "standard",
"creditsRemaining": 2480,
"scrapeLimits": {
"maxInFlightPerClient": 8,
"maxInFlightPerToken": 4
},
"recent": []
}API reference
Single requests send productUrl. Bulk requests send items[].productUrl. Bearer auth is required for product and usage routes.
| Use case | Endpoint | Request body | Returns |
|---|---|---|---|
| Usage and credits | GET /v1/usage | No request body | Returns credit balance, rate class, limits, plan data, and recent usage rows for the authenticated token. |
Code examples
Put your API token in PIA_API_TOKEN, replace the example URL with a product page from a supported store, and run the snippet. API tokens are in your account console.
Errors return error.code, error.message, error.requestId, and error.retryable. When retryable is true, wait for the Retry-After seconds, then send the request again. Only successful requests use credits.
The OpenAPI reference lists every field and status code.
curl -sS "https://api.productinformationapi.com/v1/usage?recent=3" \
-H "Authorization: Bearer $PIA_API_TOKEN"// Node.js 18+, no packages. Run: PIA_API_TOKEN=your-token node usage.mjs
const response = await fetch("https://api.productinformationapi.com/v1/usage?recent=3", {
headers: { Authorization: `Bearer ${process.env.PIA_API_TOKEN}` },
signal: AbortSignal.timeout(30_000),
});
const data = await response.json();
if (!response.ok) {
const { code, message, requestId } = data.error ?? {};
throw new Error(`${response.status} ${code}: ${message} (request ${requestId})`);
}
console.log({
creditsRemaining: data.creditsRemaining,
rateClass: data.rateClass,
scrapeLimits: data.scrapeLimits,
});
console.log(data.recent);# Python 3.8+ with requests (pip install requests). Run: PIA_API_TOKEN=your-token python usage.py
import os
import requests
response = requests.get(
"https://api.productinformationapi.com/v1/usage",
headers={"Authorization": f"Bearer {os.environ['PIA_API_TOKEN']}"},
params={"recent": 3},
timeout=30,
)
data = response.json()
if not response.ok:
error = data["error"]
raise SystemExit(f"{response.status_code} {error['code']}: {error['message']} (request {error['requestId']})")
print({
"creditsRemaining": data["creditsRemaining"],
"rateClass": data["rateClass"],
"scrapeLimits": data["scrapeLimits"],
})
print(data["recent"])Response fields
Exact fields depend on the endpoint, the product page, and the store's coverage.
Use cases
Typical jobs teams build on these endpoints.
Display remaining credits and rate class in internal dashboards.
Check in-flight limits and recent usage before submitting larger batches.
Review recent rows when finance or operations teams audit consumption.
Limitations
Coverage is enabled by supported retailer, marketplace, and product page URL.
Polling cadence belongs to the client integration and is discussed during onboarding.
The API is not an official marketplace partner API and does not promise unlimited collection.
FAQ
Answers to the questions teams ask before they integrate.
No. Callers send productUrl for single requests or items[].productUrl for bulk requests. Internal identifiers are derived by the API when the URL is supported.
Use product-stock for availability and offers, and product-information for catalog details.
Yes. Dedicated stock and information bulk endpoints accept arrays of product page URLs and return per-item results.
Share target retailers or marketplaces, expected volume, required fields, and sample product URLs during onboarding.