Extraction recipe
Pricing Page
Product and page titles, billing currency, plan names with price tokens, free-tier indicator and enterprise call-to-action indicator.
Field extractors
Each field names the extractor that produces it and the target it reads from.
| Field | Extractor | Target | Transforms | Required |
|---|---|---|---|---|
| productName | css | meta[property="og:site_name"] | — | required |
| pageTitle | css | h1 | — | required |
| currency | css | [data-currency] | — | required |
| plans | css | .plan, .pricing-plan, [data-plan] | — | required |
| hasFreeTier | regex | \bfree\b | — | required |
| hasEnterpriseCta | regex | contact sales|enterprise | — | required |
Zod rules
The output schema is projected to JSON Schema to build this table, so the documentation always matches the runtime validation.
| Field | Type | Constraints | Required |
|---|---|---|---|
| productName | string | string | yes |
| pageTitle | string | string, min length 1 | yes |
| currency | string | null | string, nullable | yes |
| plans | array | array, min items 1, items: object | yes |
| hasFreeTier | boolean | boolean | yes |
| hasEnterpriseCta | boolean | boolean | yes |
JSON output
The real record produced by the real engine for the sample document of this recipe. The Zod schema accepted it.
{
"productName": "Northwind Analytics",
"pageTitle": "Simple pricing that scales with you",
"currency": "USD",
"plans": [
{
"name": "Free",
"price": "$0",
"priceTokens": [
"$0"
],
"isFree": true
},
{
"name": "Team",
"price": "$29 per user / month",
"priceTokens": [
"$29"
],
"isFree": false
},
{
"name": "Enterprise",
"price": "Custom pricing",
"priceTokens": [],
"isFree": false
}
],
"hasFreeTier": true,
"hasEnterpriseCta": true
} CLI invocation
crawlforge fetch https://crawl.cesarcai.dev/pricing --recipe pricing-page --json
Add --db to store the Snapshot, then use
crawlforge diff to compare two revisions of the same page.