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.
Search
Answers
The request is almost the same:
See Answers.
Brand
Context.dev’sPOST /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.
Logo Link
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-readableerror_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
formatsobjects into lists, and rename parameters to snake_case. - Set
max_agewherever 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.