API Reference
The ProdSpy API allows you to programmatically access product data, track price changes, and monitor stock across e-commerce stores.
Fast & Reliable
Low latency with 99.9% uptime SLA.
Secure
All requests encrypted with TLS 1.3. API keys with scoped permissions.
Real-time
Webhooks for instant notifications on price and stock changes.
Base URL
https://api.prodspy.com/v1Authentication
Authenticate your API requests by including your API key in the Authorization header.
curl https://api.prodspy.com/v1/stores \
-H "Authorization: Bearer YOUR_API_KEY"Keep your API key secure
Never expose your API key in client-side code or public repositories. Use environment variables to store your key securely.
Try It
Test the API directly from your browser. Enter a store URL below to see live product data.
/v1/demo/previewRequest
cURL
curl -X POST https://api.prodspy.com/v1/demo/preview \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"url": "https://allbirds.com",
"limit": 5
}'Response
Endpoints
Webhooks
Receive real-time notifications when prices change, stock levels update, or products come back in stock. Configure webhooks in your dashboard.
Available Events
price.changedTriggered when a variant's price changes
stock.changedTriggered when stock quantity changes
restockedTriggered when an out-of-stock item is restocked
product.disabledTriggered when a product is removed or disabled
Payload Example
{
"event": "price.changed",
"timestamp": "2024-01-15T14:30:00Z",
"data": {
"variant_id": "var_001",
"product_id": "prd_xyz789",
"store_id": "str_abc123",
"old": {
"price": 110.00
},
"new": {
"price": 98.00
}
},
"idempotency_key": "evt_abc123def456"
}Webhook Security
All webhook payloads are signed using HMAC-SHA256. Verify the signature using the X-ProdSpy-Signature header.
const crypto = require('crypto');
function verifyWebhook(payload, signature, secret) {
const expected = crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
);
}Rate Limits
API requests are rate limited based on your plan. Rate limit information is included in response headers.
| Plan | Requests/minute | Requests/day |
|---|---|---|
| Free | 60 | 1,000 |
| Pro | 300 | 50,000 |
| Enterprise | Unlimited | Unlimited |
Rate Limit Headers
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 299
X-RateLimit-Reset: 1705330800