Batch Scrape
Batch Scrape works the same as regular scrape, except instead of a single URL, you can provide a list URLs to scrape at once.
import { ScrapingCrawl } from "@scrapeless-ai/sdk";
// Initialize the client
const client = new ScrapingCrawl({
apiKey: "your-api-key", // Get your API key from https://scrapeless.com
});
(async () => {
const result = await client.batchScrapeUrls(
["https://example.com", "https://scrapeless.com"],
{
formats: ["markdown", "html", "links"],
onlyMainContent: false,
timeout: 15000,
browserOptions: {
proxyCountry: "ANY",
sessionName: "Crawl",
sessionRecording: true,
sessionTTL: 900,
},
}
);
console.log(result);
})();
For a full reference on the scrape endpoint, checkout the API Reference.