API Reference
Brand Intelligence
Prefetch

Prefetch

Warm the cache by triggering background brand data extraction for a domain. Returns immediately — data is populated asynchronously.

Endpoint: POST /v1/brand/prefetch Credits: 0 (free — paid plans only)

Request Body

ParameterTypeRequiredDescription
domainstringYesDomain to prefetch (e.g., github.com)

Request Example

{
  "domain": "github.com"
}

Response Schema

202 Accepted

{
  "success": true,
  "message": "Prefetch triggered. Brand data will be available shortly.",
  "domain": "github.com",
  "credits_used": 0,
  "request_id": "c9d0e1f2-a3b4-5678-2345-789012345678"
}

Code Examples

cURL

curl -X POST "https://api.orsa.dev/v1/brand/prefetch" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "domain": "github.com" }'

TypeScript

await client.brand.prefetch({
  domain: 'github.com',
});
 
// Data will be cached and ready for subsequent retrieve calls

Python

client.brand.prefetch(domain="github.com")
 
# Data will be cached and ready for subsequent retrieve calls

Error Codes

CodeStatusDescription
INPUT_VALIDATION_ERROR400Invalid or missing domain
UNAUTHORIZED401Missing or invalid API key
FORBIDDEN403Prefetch is only available on paid plans
RATE_LIMITED429Rate limit exceeded

Notes

  • Free plans cannot use prefetch. Upgrade to any paid plan to access this endpoint.
  • No credits are charged — this is a free cache-warming operation.
  • The request returns immediately (202). Brand extraction happens asynchronously in the background.
  • Typical extraction takes 15-60 seconds depending on the website complexity.
  • Use this before a batch of retrieve calls to ensure instant responses.
  • Prefetching a domain that's already cached is a no-op (no extra work is triggered).