A Cloudflare Worker that extracts recipe data from any URL using AI.
- Extracts recipe name, author, prep time, cook time, ingredients, and instructions
- Uses Cloudflare Workers AI with Llama 3.3 for structured extraction
- Uses Browser Rendering to handle JavaScript-heavy recipe sites
- Automatic fallback: tries
networkidle2first, falls back to simple request if it times out
GET /?url=<recipe-url>&key=<api-key>
| Parameter | Description |
|---|---|
url |
The URL of the recipe page (required) |
key |
Your API key (required) |
{
"name": "Classic Homemade Meatloaf",
"author": "Christina",
"prep_time_in_minutes": 15,
"cook_time_in_minutes": 60,
"ingredients": [
"1 tbsp olive oil",
"1 medium onion, diced",
"..."
],
"instructions": [
"Preheat oven to 350°F.",
"..."
]
}npm installwrangler secret put API_KEY
wrangler secret put CLOUDFLARE_ACCOUNT_ID
wrangler secret put CLOUDFLARE_API_TOKEN- API_KEY: Your custom API key for authentication
- CLOUDFLARE_ACCOUNT_ID: Your Cloudflare account ID
- CLOUDFLARE_API_TOKEN: API token with "Browser Rendering - Edit" permissions
npm run deploynpm run dev # Start local dev server
npm run deploy # Deploy to Cloudflarecurl "https://recipe-extractor.your-subdomain.workers.dev/?url=https://www.budgetbytes.com/classic-homemade-meatloaf/&key=YOUR_API_KEY"- Cloudflare Workers
- Workers AI - Llama 3.3 70B
- Browser Rendering - For JavaScript rendering