Recipe: AI-Powered Extraction
Use LLM extraction for pages that are hard to scrape with CSS or XPath: markup that changes every deploy, prices split across several elements, or facts buried in a paragraph. You describe the fields in plain English and Verid returns them as JSON, which the normal predicates can then compare check to check.
Create the monitor
curl -X POST https://api.verid.dev/v1/monitors \
-H "Authorization: Bearer $VERID_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Product Page AI Monitor",
"url": "https://example.com/product/42",
"schedule_interval_seconds": 86400,
"extract_config": {
"method": "prompt",
"prompt": "Extract the product name, current price (as a number without currency symbol), availability status, and any active discount percentage from this page. Use null for anything not shown.",
"schema": {
"name": "string",
"price": "number",
"available": "boolean",
"discount_pct": "number or null"
}
},
"diff_predicate": {
"type": "composite",
"operator": "OR",
"conditions": [
{ "type": "field_changes", "field": "available" },
{ "type": "field_decreases_by_percent", "field": "price", "threshold": 5 }
]
},
"deliveries": [
{ "type": "webhook", "url": "https://your-app.com/hooks/product-change" }
]
}'The composite OR fires when stock flips or the price falls by 5% or more. Asking for the price "as a number without currency symbol" matters: the percent predicate only works on numbers.
Webhook payload
{
"id": "uuid",
"version": "2026-05-01",
"monitor_id": "uuid",
"run_id": "uuid",
"fired_at": "2026-10-22T06:00:00Z",
"diff": {
"fields_changed": ["price", "discount_pct"],
"before": { "price": 129, "discount_pct": null },
"after": { "price": 99, "discount_pct": 23 }
},
"monitor": {
"url": "https://example.com/product/42",
"name": "Product Page AI Monitor"
}
}Only changed fields appear in diff. Verify the Verid-Signature header as shown on Webhooks.
Verify it worked
curl -X POST https://api.verid.dev/v1/monitors/$MONITOR_ID/run \
-H "Authorization: Bearer $VERID_API_KEY" \
-H "Content-Type: application/json" -d '{}'
curl "https://api.verid.dev/v1/monitors/$MONITOR_ID/runs?limit=1" \
-H "Authorization: Bearer $VERID_API_KEY"After a few seconds the run's extracted object should contain name, price, available and discount_pct with the types from your schema. Run it twice: the second run on an unchanged page is served from cache.
LLM extraction caching
LLM results are cached for 30 days using a hash of the page content, the prompt and the schema. If the page content doesn't change between runs, the cached result is returned at no LLM cost.
LLM calls are only counted against your monthly quota on cache misses. Plans include 50 AI calls on the trial, 250 on Lite, 500 on Starter, 5,000 on Pro and 25,000 on Scale.
Models used
Verid runs your prompt against a fast, JSON-capable LLM. If the primary model returns malformed JSON or is unreachable, Verid automatically falls back to a secondary model so extraction stays resilient. You don't pick the model - Verid manages this for you.
The page content sent to the model is truncated at 50,000 characters.
Prompt rules
- Minimum 10 characters, maximum 2,000 characters
- Be specific about the keys you want returned
- Mention how to handle missing fields (e.g. "use null if not listed")
- Provide a
schemawhen you need consistent output shape
Common failure
Related use cases
Prompt-based extraction powers Competitor tech-stack changes and competitor ad & landing copy tracking.