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
| Parameter | Type | Required | Description |
|---|---|---|---|
domain | string | Yes | Domain 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 callsPython
client.brand.prefetch(domain="github.com")
# Data will be cached and ready for subsequent retrieve callsError Codes
| Code | Status | Description |
|---|---|---|
INPUT_VALIDATION_ERROR | 400 | Invalid or missing domain |
UNAUTHORIZED | 401 | Missing or invalid API key |
FORBIDDEN | 403 | Prefetch is only available on paid plans |
RATE_LIMITED | 429 | Rate 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).