Skip to main content
Most Context.dev endpoints have a direct Prefetch equivalent. The main changes are the base URL, the auth header, snake_case parameters, and four behaviors worth checking before you switch: caching defaults, crawl regexes, async crawls and the industry taxonomy.

The basics

To keep Context.dev’s scrape caching, send max_age=259200000 (3 days, in milliseconds).

Endpoints

Prefetch also has endpoints with no Context.dev counterpart: /company, /classify with IAB categories, /screenshot, and batches of brand, enrich, company, classify, screenshot or styleguide.

Scrape

Reading the response

Map

Crawl

Context.dev’s /web/crawl answers in the same request. Prefetch crawls are async jobs: POST /crawl returns an id, and you read pages from GET /crawl/{id} or receive them by webhook.

Answers

The request is almost the same: See Answers.

Brand

Context.dev’s POST /brand/retrieve takes a type. Each type maps to a different Prefetch call:

Brand fields

Styleguide

Prefetch’s styleguide also returns exports.css and exports.tailwind, ready to paste. See Styleguide. Prefetch adds size (16 to 512 pixels), format (png, webp, jpeg) and greyscale. Get your token from GET /logo/token.

Batches

Context.dev reserves credits when you submit and refunds what’s unused. Prefetch charges results as they complete, and never for failed pages.

Monitors

See Monitors for targets, schedules and judging.

Webhooks

Both sign deliveries the same way: t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<raw body>">. Change the header you read from X-Context-Signature to X-Prefetch-Signature, and use the secret Prefetch returns when you create the job or monitor. See Verify signatures.

Errors

Both return a machine-readable error_code. Prefetch adds retryable, so you can decide whether to retry without a list of codes. A request over your credit balance returns 403 with CREDITS_EXHAUSTED on Prefetch, where Context.dev returns 402. See Error handling.

Checklist

  • Swap the base URL and the auth header.
  • Turn formats objects into lists, and rename parameters to snake_case.
  • Set max_age wherever you relied on Context.dev’s default caching.
  • Rewrite crawl regexes to match paths, and poll or webhook for crawl results.
  • Map EIC industries to IAB categories where you store them.
  • Update your webhook signature header and secrets.