Recipes
Price Monitoring
Track competitor pricing on a schedule with batch extract
Define your schema once, run on a cron, diff against the last snapshot. Suitable for retail, e-commerce, SaaS pricing pages, and travel rates.
Schema
{
"type": "object",
"properties": {
"name": { "type": "string" },
"price": { "type": "number" },
"currency": { "type": "string" },
"discountPercent": { "type": "number" },
"inStock": { "type": "boolean" }
},
"required": ["name", "price"]
}Implementation
Submit through /batch/extract with the URLs of every product you track. Pair with a webhook so your worker only fires when fresh data lands.
curl -X POST https://openapi.thunderbit.com/openapi/v1/batch/extract \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d @payload.jsonWhere payload.json carries the URL list, the schema above, and your webhook config.
Diffing
Hash each (url, name) pair, store the price + timestamp, and surface meaningful deltas (e.g. price drops over 10%) to Slack or email.
Tips
- Pin a
countryCodeif the target site shows different prices per geo - Use
renderMode: "basic"for SPAs that hydrate the price asynchronously - For sites behind anti-bot, see Anti-bot & JS Rendering
Related
This recipe is being expanded with a complete cron + diff worker example — check back soon.