scrapfly.extractContent runs Scrapfly extraction on content you already have.
Returns
{ contentType, data }. JSON responses are decoded into JSON values; other content remains a string.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Extract prompted or structured data from supplied document content.
scrapfly.extractContent runs Scrapfly extraction on content you already have.
import { automation, onInvocation } from "automate.ax"
import { scrapfly } from "automate.ax/scrapfly"
export default automation("Extract price", () => {
onInvocation()
scrapfly.extractContent({
body: "<main><span>$42</span></main>",
contentType: "text/html",
prompt: "Return the price as JSON",
})
})
| Input | Type | Required | Default | Description |
|---|---|---|---|---|
body | string | Yes | — | HTML, Markdown, text, or XML document. |
contentType | 'text/html' | 'text/markdown' | 'text/plain' | 'text/xml' | Yes | — | Body media type. |
prompt, model, template, ephemeralTemplate | Extraction selector | Exactly one | — | Natural-language prompt, automatic model, saved template, or inline template. |
charset, url, timeout, webhookName | Optional controls | No | Provider defaults | Supply source metadata, timeout in seconds, or a dashboard webhook. |
{ contentType, data }. JSON responses are decoded into JSON values; other content remains a string.