Crawl a site in three steps.

Point it at a domain, choose the formats, and read every page back as clean Markdown.

  1. 1Get an API keySign up and copy your key from the dashboard.
  2. 2Start a crawlSend the start URL and how many pages to follow.
  3. 3Read the pagesEach page comes back as Markdown, HTML or JSON.
npm install context.dev
Read the crawl docs

Free to start: 1,000 credits a month, no card needed.

crawl.ts
import ContextDev from 'context.dev';const client = new ContextDev({ apiKey: process.env.CONTEXT_DEV_API_KEY });const crawl = await client.web.crawl({  url: 'https://docs.stripe.com',  maxPages: 500,  formats: { markdown: true },});for (const page of crawl.pages) {  console.log(page.url, page.markdown.length);}

From URL to answer.

  1. 1

    Search

    Find the pages that answer the question.

    const results = await client.web.search({  query: 'stripe usage based billing',});
  2. 2

    Scrape

    Read each result as Markdown.

    const page = await client.web.scrape({  url: results[0].url,  formats: { markdown: true },});
  3. 3

    Answer

    Hand the pages to your model with their sources.

    const answer = await model.generate({  context: page.markdown.data,});