Scrape anything
Try in
import ContextDev from 'context.dev';const client = new ContextDev({ apiKey: 'YOUR_API_KEY' });const page = await client.web.scrape({  url: 'https://linear.app',  formats: {    markdown: true,    html: true,    screenshot: true,  },  sharedParams: { mainContentOnly: true },});console.log(page.markdown.data);console.log(page.screenshot.data);
Map domains
import ContextDev from 'context.dev';const client = new ContextDev({ apiKey: 'YOUR_API_KEY' });const { urls } = await client.web.mapUrls({  domain: 'stripe.com',  includeSubdomains: true,  maxLinks: 100,});for (const page of urls) {  console.log(page.url, page.title, page.description);}
Run batches
import ContextDev from 'context.dev';const client = new ContextDev({ apiKey: 'YOUR_API_KEY' });const batch = await client.batch.submit({  input: {    mode: 'scrape',    data: {      format: 'markdown',      urls: urls.map((url) => ({ url })),    },  },});console.log(batch.id, batch.status);
Create monitors
import ContextDev from 'context.dev';const client = new ContextDev({ apiKey: 'YOUR_API_KEY' });const monitor = await client.monitors.create({  name: 'Linear pricing changes',  target: { type: 'page', url: 'https://linear.app/pricing' },  change_detection: { type: 'exact' },  schedule: { type: 'interval', frequency: 6, unit: 'hours' },  webhook: { url: 'https://example.com/webhooks/context' },});console.log(monitor.id);