Scrape a URL
Fetches a URL and returns the requested format(s): markdown, html, links, images, summary, json, branding, screenshot.
Dynamic pricing
(includesField(body.formats, 'type', 'markdown') ? 0.005 : 0) + (includesField(body.formats, 'type', 'html') ? 0.005 : 0) + (includesField(body.formats, 'type', 'links') ? 0.005 : 0) + (includesField(body.formats, 'type', 'images') ? 0.005 : 0) + (includesField(body.formats, 'type', 'summary') ? 0.005 : 0) + (includesField(body.formats, 'type', 'screenshot') ? 0.01 : 0) + (includesField(body.formats, 'type', 'json') ? 0.025 : 0) + (includesField(body.formats, 'type', 'branding') ? 0.125 : 0) + (get(body, 'fetchConfig.stealth', 0) ? 0.025 : 0)
Example code
// Using @orth/sdk - The simplest way to call APIs
// Install: npm install @orth/sdk
import Orthogonal from "@orth/sdk";
const orthogonal = new Orthogonal({
apiKey: process.env.ORTHOGONAL_API_KEY,
});
const output = await orthogonal.run({
api: "scrapegraphai",
path: "/api/scrape",
body: {
"url": "example"
}
});
console.log(output);Body parameters
URL to scrape
Output formats array. Each item has a type (markdown, html, screenshot, json, links, images, summary, branding) and optional mode (normal, reader, prune). Defaults to [{"type":"markdown","mode":"normal"}]
Force content type (text/html, application/pdf, image/jpeg, etc.)
Fetch options: mode (auto/fast/js), stealth (bool), timeout (ms), wait (ms), headers, cookies, country (2-letter), scrolls (0-100)
Response