Thanks to visit codestin.com
Credit goes to docs.context.dev

Skip to main content
Prefetch starts a company or styleguide lookup in the background. Use it when you learn a domain or work email before the next step needs that data. The later request may then reuse a cached result.
Prefetch costs 0 API credits and requires a paid subscription. It still uses the ordinary authenticated API rate limit.

Supported lookups

POST /utility/prefetch accepts one type and exactly one identifier: Prefetch does not warm Markdown, HTML, screenshot, crawl, product, or structured-extraction operations.

Queue a prefetch

A successful response confirms that work was queued; it does not contain Brand or styleguide data. Treat the HTTP status and documented response fields as the contract rather than matching a human-readable message string.

Retrieve the result later

Prefetch is asynchronous. Do not block the user while waiting for it or assume the work has completed after a fixed delay. Retrieve the same company when the workflow needs it. The PHP example uses the SDK’s low-level Brand request.
The later request can still be a cache miss if prefetch has not finished, failed, or targeted a different cache key. Keep the same timeout and fallback behavior you would use without prefetch.

Good trigger points

  • A work email becomes valid and remains unchanged after a debounce.
  • A domain is saved on an earlier onboarding step.
  • A background import discovers companies before enrichment begins.
  • A user opens a workflow one step before Brand data is displayed.
Avoid starting prefetch on every keystroke or page render. Deduplicate work by normalized domain and do not prefetch consumer or disposable email providers.

Handle expected errors

Do not catch every exception and silently discard it. Record the category so a broken credential or persistent service failure is distinguishable from an expected consumer-email rejection.

Measure whether it helps

Track the later request’s:
  • cache_metadata.status and age_ms
  • End-to-end latency
  • Timeout rate
  • Prefetch-to-retrieve interval
  • Duplicate prefetch count per normalized domain
Prefetch is useful when it increases cache hits or reduces user-visible latency. It does not reduce the credit cost or rate-limit usage of the later retrieval.

Next steps

Prefetch API reference

Review request fields and responses for domain and email prefetching.

Rate limits

Account for prefetch calls in your request budget.

Retrieve brand data

Retrieve the company profile after prefetching its domain.