import ContextDev from 'context.dev';
const client = new ContextDev({
apiKey: process.env['CONTEXT_DEV_API_KEY'], // This is the default and can be omitted
});
const response = await client.web.webScrapeHTML({ url: 'https://example.com' });
console.log(response.html);{
"success": true,
"html": "<string>",
"url": "<string>"
}Scrapes the given URL and returns the raw HTML content of the page. Uses automatic proxy escalation to handle blocked sites.
import ContextDev from 'context.dev';
const client = new ContextDev({
apiKey: process.env['CONTEXT_DEV_API_KEY'], // This is the default and can be omitted
});
const response = await client.web.webScrapeHTML({ url: 'https://example.com' });
console.log(response.html);{
"success": true,
"html": "<string>",
"url": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Full URL to scrape (must include http:// or https:// protocol)
Was this page helpful?