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/v1

Authentication

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.

POST/v1/demo/preview

Request

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

Click "Send Request" to see the 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.changed

Triggered when a variant's price changes

stock.changed

Triggered when stock quantity changes

restocked

Triggered when an out-of-stock item is restocked

product.disabled

Triggered 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.

PlanRequests/minuteRequests/day
Free601,000
Pro30050,000
EnterpriseUnlimitedUnlimited

Rate Limit Headers

X-RateLimit-Limit: 300
X-RateLimit-Remaining: 299
X-RateLimit-Reset: 1705330800